Visible to Intel only — GUID: phb1488868140932
Ixiasoft
1.1.4.2. Hardware Test for Nios Control Design Example
Follow the instructions below to run the hardware test for the Nios Control design example.
- 1. Launch the Nios II Software Build Tools for Eclipse tool from Intel® Quartus® Prime (Tools > Nios II Software Build Tools for Eclipse).
- In the Select a workspace dialog box, navigate to the software workspace <design example>/software.
- Create a new Nios II application and board support package (BSP) from the template (File > New > Nios II Application and BSP From Template ).
- In the Nios II Application and BSP From Template window, enter the following information:
- SOPC Information File Name: <design example>/altera_jesd204_ed_qsys_RX_TX/altera_jesd204_ed_qsys_RX_TX.sopcinfo
- Project name: <software project>
- User default location: Checked
- Templates: Blank Project
- Click Next. Verify that the default BSP name is <software project>_bsp, then click Finish. The Nios II application project and BSP appears in the Project Explorer window.
- In the Project Explorer window, right-click the <software project>_bsp project, navigate to Nios II and click Generate. This regenerates the BSP files based on your most current compiled Intel® Quartus® Prime project settings.
Note: Whenever you modify and recompile the Intel® Quartus® Prime project, you must regenerate the BSP files.
- Import the design example source (*.c) and header (*.h) files into the application directory. In the Project Explorer window, right click on the <software project> project and click Import.
- In the Import window, select General > File System as the import source and click Next.
- Browse to the <design example>/software/source directory. Check the source box on the left panel. This selects all the source and header files in the source directory. Verify that the list of source and header files are as follows:
- altera_jesd204_regs.h
- functions.h
- macros.h
- main.h
- macros.c
- main.c
- Verify that the destination folder is <software project>. Click Finish.
All the source and header files should be imported into the <software project> project directory.
- Right-click the <software project>_bsp project, navigate to Nios II > BSP Editor . Under the Drivers tab, check the enable_small_driver box of the altera_avalon_jtag_uart_driver group and click Generate. This setting allows the compilation to proceed without connecting the interrupt ports of the JTAG UART module. After the BSP files have been generated, click Exit.
- Expand the <software project> application project in the Project Explorer window and verify that the folder contains all the source and header files.
- To compile the C code, navigate to Project > Build All.
The compiler now compiles the C code into executable code.
- To download the executable code to the development board, navigate to the Run > Run Configurations. In the Run Configurations window, double-click Nios II Hardware on the left panel.
- Verify that all run configurations are correct, then click Run.
The Intel® Quartus® Prime software downloads the executable code onto the board and the Nios II processor executes the code. The code performs the JESD204B link initialization sequence and exits. You can view the code execution results on the Nios II Console tab. The Nios II Console is the standard input/output for the executable code. At the end of the initialization sequence, the code prints the JESD204B link status to the console. The following figure illustrates the expected result from a successful link initialization.
The following tables list the expected values of the link status register report.
Bit | Name | Description | Expected Binary Value |
---|---|---|---|
[0] | SYNC_N value | 0: Receiver is not in sync 1: Link is in sync |
1 |
[2:1] | Data Link Layer (DLL) state | 00: Code Group Synchronization (CGS) 01: Initial Lane Alignment Sequence (ILAS) 10: User Data Mode 11: D21.5 test mode |
10 |
Bit | Name | Description | Expected Binary Value |
---|---|---|---|
[0] | SYNC_N value | 0: Receiver is not in sync 1: Link is in sync |
1 |
Others | N/A | N/A | Don’t care |