The SDx IDE includes a matrix multiply pipelined example that demonstrates the use of
async pragmas to implement task-level pipelining. This exercise allows
you to see the runtime improvement that comes from using this technique.
-
Create a new SDx project (lab5) by selecting . Enter the project name
lab5, select the
ZC702 Platform and Linux System
Configuration, and click Next.
-
The Templates page appears, containing source code examples for the selected platform.
From the list of application templates, select Empty Application
and click Finish.
-
Using your operating system file manager, navigate to <path to
install>/SDx/2017.0/samples/mmult_pipelined and copy the source files in that
directory (mmult_accel.cpp, mmult_accel.h, and
mmult.cpp) into the src folder of the newly
created project (for example ./lab5/src).
-
Click on lab5 in SDx and from the context menu select
Refresh. This adds all the copied sources in the previous step to
the project.
-
Change the build configuration to Release.
-
Mark the function
mmult_accel in the file
mmult_accel.cpp for hardware using the Add HW
Functions... icon in the SDx Project Settings or
Toggle HW/SW in the Project
Explorer.
-
Build the project.
-
Copy the files obtained in the sd_card folder to an SD card, set
up a terminal and run the generated application on the board. You need to specify the
pipeline depth as an argument to the application. Run the application with pipeline depth
of 1, 2, and 3 and note the performance obtained.