AN 755: Implementing JESD204B IP Core System Reference Design with ARM HPS As Control Unit (Baremetal Flow)

ID 683776
Date 12/30/2015
Public
Document Table of Contents

1.2.4. Setting up the Software Command Line Environment

  1. Create a software workspace in a project directory of your choice. For ease of reference, this document will assume the software workspace name of <your project directory> /software.
  2. Launch the SoC EDS ARM® DS-5 Altera Edition tool.
  3. In the Select a workspace dialog box, navigate to the software workspace, <your project directory> /software and click OK.
  4. Import the software archive project into your workspace. On the File menu, click Import.
  5. In the Import/Select window, select General > Existing Projects into Workspace and click Next >.
  6. In the Import/Import Projects window, check the Select archive file radio button.
  7. Browse to the software archive project location, select the archive project file, jesd204b_soc_baremetal_gnu.tar.gz and click OK. The software archive project file is in the location where you unzipped the reference design, jesd204b_av_soc_ref_design.zip.
  8. Verify that the jesd204b_soc_baremetal_gnu check box is checked in the Projects panel and click Finish. The ARM® DS-5 tool restores the archived software project into your workspace.
  9. In the Project Explorer tab of the main Eclipse window, expand the jesd204b_soc_baremetal_gnu project file list and verify that you see all the files listed in the Reference Design Files section.
  10. To compile the source code, right-click on the jesd204b_soc_baremetal_gnu project in the Project Explorer tab and select Build Project. This action executes the software build project Makefile.
  11. When recompiling the source code after the first compile, right-click on the jesd204b_soc_baremetal_gnu project and select Clean Project before building the project. This clears the project workspace of object files and other project executables from the previous project build.
  12. Whenever you add or remove any *.c source files from the project, in addition to adding or removing the file from the Project Explorer window, you must update the source file list in the software build project Makefile accordingly. To update the source file list in the Makefile, double-click the Makefile file under the jesd204b_soc_baremetal_gnu project in the Project Explorer tab. In the Makefile editor window, locate the 'EXAMPLE_SRC' variable and add or remove your *.c source file from the list. Save the file and proceed to build the project.
  13. View the build project log in the Console tab and verify that there are no errors during the build project operation.
  14. To download the project executable file to the ARM® HPS and execute the code in semi-hosting debug mode, right-click on the jesd204b_soc_baremetal_gnu project in the Project Explorer tab and select Debug As > Debug Configurations.
  15. In the Debug Configurations window, on the left panel, select DS-5 Debugger > jesd204b_soc_baremetal_gnu. On the right panel, under the Connection tab, in the Select target panel, select Arria V SoC > Bare Metal Debug > Debug Cortex-A9_0. Ensure that all the other connections settings in the Connection tab are set according to your system configurations.
  16. Click Debug. The tool downloads the executable code onto the ARM® HPS and launches the Debugger interface.
  17. Execution of the code is halted on the first executable line of the main.c code. To continue execution without interruption until the end of the code, click the Continue button in the Debug Control window. To step through the code line by line, use the stepping buttons in the Debug Control window.

The App Console window is the main user interface portal that you can view printed messages and enter commands to the main execution code.

Figure 2.  ARM® DS-5 - App Console GUI

The main execution code executes the JESD204B link initialization sequence and prints a command prompt for you to enter commands to the ARM® HPS. View the printed messages from the JESD204B link initialization sequence in the App Console window. Verify that the link is initialized successfully and the TX/RX status registers display the expected values. Tables below describe the expected values of the link status register report.

Table 3.  TX Status 0 Register

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

Table 4.  RX Status 0 Register

Bit

Name

Description

Expected Binary Value

[0]

SYNC_N value

0: Receiver is not in sync

1: Link is in sync

1

Others

Don’t care

The code also reports the status of the pattern checker comparison. Any pattern checker errors that occur during the initialization period is flagged to the console window. Verify that the console displays this message to indicate no pattern checker errors were detected:

INFO: No pattern checker error detected on link 0