AN 957: Time-Sensitive Networking for Drive-on-Chip Design Example

ID 683707
Date 10/30/2021
Public
Document Table of Contents

3.8. Compiling the Drive-on-Chip Design Software in Nios II Software Build Tools

  1. In Intel Quartus Prime, click Tools > Nios II Software Build Tools for Eclipse.
  2. Set the workspace to <project_location>/software/
  3. In Nios II Eclipse, click File > Import…
  4. In the window expand General, Existing Projects into Workspace. then Browse... and click Select root directory.
    Figure 29. Import project into Nios II Software Build Tools
  5. Select the project directory and the bsp directory.
  6. In Nios II Eclipse GUI, right click into the BSP directory and click Nios II > BSP Editor…
  7. Check that the SOPC Information file is set to <project_location>/DOC_TANDEM_CVSX_NIOS_TSN_QSYS.sopcinfo
  8. In the Drivers tab, select enable_jtag_uart_ignore_fifo_full_error. This is the only non-default option to turn on.
  9. Click Generate.
  10. In the Nios II Eclipse SBT, right click in the BSP directory, click Nios II > Generate BSP. The BSP generates.
    If you see errors because of the TTTech TSN IP during the Nios II software compilation or BSP generation, create a separate Qsys system without the de_ip_solution_scv_0 block (TSN IP) and compile the Nios II using the .sopcinfo file.
  11. Apply the following changes in the source code <project_location/software/DOC_TANDEM_CVSX_NIOS_TSN>:
    • Inside /platform/common/platform.h add another family of device name for example: #define SYSID_CVSX_NIOS 6
    • The device family should match the System ID set in the 0x005046fe sysid_0 block in Qsys.
    • Add the definition to platform.c in the variable device_family_t and TANDEM_FAMILIES
    • Add the family in other locations where device_family definition might appear, for example in motor_task.c
    • Inside demo_cfg.h, change the ACDS_MAJOR_VERSION to 5 or any other number, but that matches the System ID's sixth digit (e.g. 0x005046fe).
  12. In Nios II Eclipse, right click in the project directory, and click Build Project.
  13. Generate the .hex file for the EPCQ memory that is in the .jic: right click in the project directory and click Make Targets > Build….
  14. In the window select mem_init_generate and click Build
The .hex file to include in the .jic file generation is in <project_location>/software/DOC_TANDEM_CVSX_NIOS_TSN/mem_init/epcq.hex