Task Pipelining in the Matrix Multiply Example

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.

  1. Create a new SDx project (lab5) by selecting File > New > Xilinx SDx Project. Enter the project name lab5, select the ZC702 Platform and Linux System Configuration, and click Next.
  2. The Templates page appears, containing source code examples for the selected platform. From the list of application templates, select Empty Application and click Finish.
  3. 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).
  4. 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.
  5. Change the build configuration to Release.
  6. 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.
  7. Build the project.
  8. 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.