Global FIFO Sizing - 2023.2 English

Vitis Tutorials: Hardware Acceleration (XD099)

Document ID
XD099
Release Date
2023-11-13
Version
2023.2 English

In order to use the Global FIFO sizing flow, it will require you to restart from the beginning. Exit the Vitis HLS GUI and restart it by executing the following at the command line:

vitis_hls -p script.tcl

Next, follow these steps:

  1. Click on the drop down arrow next to the green run icon Run Icon and select C Simulation and then click OK in the popped up window.

  2. Verify that csim completes successfully and without warnings

    • Watch for and write down the maximum depth of any hls::stream printed out by the C simulator to the console, e.g.

       The maximum depth reached by any of the 26 hls::stream() instances in the design is 40 
    
  3. Force the depth of all FIFOs to be the max value reported by C simulation. You can do this by clicking the Solution link in the top menu and selecting Solution Settings (as shown below).

    Solution Settings

  4. In the Solution Settings window, under General, scroll to find config_dataflow in the Configuration Settings (as shown below), select the override_user_fifo_depth setting and set the value to 40. Click OK to set this new configuration setting.

    Global Settings

  5. Click on the green Run command (Run Icon) to rerun C Synthesis.

  6. Rerun C/RTL Cosimulation by selecting Co-Simulation from the drop down menu next to the green Run command (Run Icon). Click OK in the window that pops open.

  7. This time, no deadlock will be observed and C/RTL co-simulation finishes without error.

  8. Go to the Co-simulation Report and right click on the top function that has the dataflow icon next to it and select Open Dataflow Viewer to relaunch the Dataflow viewer.

  9. Now look at the channel table in the Dataflow viewer and compare the depths in the Cosim Max Depth and Depth columns. The correct depths can be observed in the Cosim Max Depth column (as seen below). This is the needed depths for all the FIFOs in this design.

    Global Settings

  10. You can now manually back-annotate the observed Cosim Max Depth as pragma settings in the source code.