Task Pipelining in the Matrix Multiply Example

The SDx IDE includes a matrix multiply pipelined example that demonstrates the use ofasyncpragmas 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 selectingFile>New>Xilinx SDx Project. Enter the project namelab5, select theZC702Platform andLinuxSystem Configuration, and clickNext.
  2. The Templates page appears, containing source code examples for the selected platform. From the list of application templates, selectEmpty Applicationand clickFinish.
  3. Using your operating system file manager, navigate to/SDx/2017.0/samples/mmult_pipelinedand copy the source files in that directory (mmult_accel.cpp,mmult_accel.h, andmmult.cpp) into thesrcfolder of the newly created project (for example./lab5/src).
  4. Click onlab5in SDx and from the context menu selectRefresh. This adds all the copied sources in the previous step to the project.
  5. Change the build configuration toRelease.
  6. Mark the functionmmult_accelin the filemmult_accel.cppfor hardware using theAdd HW Functions...icon in theSDx Project SettingsorToggle HW/SWin theProject Explorer.
  7. Build the project.
  8. Copy the files obtained in thesd_cardfolder 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.