Tracing a Linux Project
-
Create a new project.
- Select File > New > Xilinx SDx Project.
- In the New Project wizard, name the project mmult_linux_trace and click Next.
- Select zc702 as the Hardware Platform. Click Next.
- For System configuration select Linux.
- Click Next.
- Select Matrix Multiplication Data Size as the template for this project and click Finish.
-
In the Project Explorer, expand the various folders by clicking on the
triangle
, then open the
mmult.cpp file under the
src folder.

-
Change the number of tests symbol NUM_TESTS from
256 to 10, then save and close the
file.

- In the SDx Project Settings (in the mmult_linux_trace tab), notice that the mmult_accel in the HW Functions section of the project overview is already marked for implementation in hardware.
-
Configure the project to enable the Trace feature in the SDx IDE.
- In the Project Overview window, click the checkbox for Enable Event Tracing under the Options section.
-
Build the project.
- Click the Build button to start building the project. (This will take a while.)
Important: The build process might take approximately 30 to 45 minutes to complete. Instead of building the project you can save time and instead use the pre-built project. (To minimize disk usage in the SDx installation, the imported project might contain fewer files than a project you build, but it includes the files required to complete the tutorial.) To import a pre-built project: select File > Import and then select General > Existing Projects into Workspace and click Next. Click Select archive file and browse to find the lab7b_mmult_trace_linux.zip file provided in the project files folder (<path to install>/SDSoC/2017.1/docs/labs/lab7b_mmult_trace_linux.zip). Click Open. Click Finish. In the Project Explorer, double-click the project.sdx file to open the SDx Project Settings. Uncheck the Generate bitstream option.After all the hardware functions are implemented in the Vivado HLS, and after the Vivado IP Integrator design is created, you will seeInserted # hardware monitor coresdisplayed in the console. This message validates that the trace feature is enabled for your design and tells you how many hardware monitor cores have been inserted automatically for you.
-
Run the application on the board.
- When the build is finished, copy the files in the sd_card directory onto an SD card and insert into the SD card socket on the board.
- Connect an Ethernet cable to the board (connected to your network, or directly to the PC).
- Connect the USB/UART port to the PC and open a serial console by clicking the + button on the SDx Terminal tab.
- Connect the USB/JTAG port to the PC and boot Linux on the board.
-
Check the IP address of the zc702 board by looking at the SDx Terminal
log.

- From the Target Connections view, set up the Linux TCF Agent in the same manner as in Using the Performance Estimation Flow With Linux.
-
Right-click on the project in the Project Explorer and select Run As > Trace Application (SDSoC Debugger).
Note: Be sure not to select Debug As, because it will enable breakpoints. If your program breakpoints during execution, the timing will not be accurate (because the software will stop, the hardware will continue running, and the trace timer used for timestamping will continue to run).
When you click on the Trace Application (SDSoC Debugger) option, the GUI downloads the ELF over the Ethernet TCF Agent connection, starts the application, and then begins collecting the trace data produced until the application exits. After the application finishes (or any error in collecting the trace data occurs) the trace data collected is displayed.
Note: The application must exit successfully for trace data to be collected successfully. If the application does not exit normally (i.e., hangs in hardware or software, or the Linux kernel crashes), the trace data might not be collected correctly.
-
View the trace data.
- After the application exits, all trace data is collected and displayed.