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:
Click on the drop down arrow next to the green run icon
and select
C Simulationand then clickOKin the popped up window.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
Force the depth of all FIFOs to be the max value reported by C simulation. You can do this by clicking the
Solutionlink in the top menu and selectingSolution Settings(as shown below)In the
Solution Settingswindow, underGeneral, scroll to findconfig_dataflowin the Configuration Settings (as shown below), select theoverride_user_fifo_depthsetting and set the value to 40. ClickOKto set this new configuration setting.Click on the green Run command (
) to rerun C Synthesis.
Rerun C/RTL Cosimulation by selecting
Co-Simulationfrom the drop down menu next to the green Run command (). Click
OKin the window that pops open.This time, no deadlock will be observed and C/RTL co-simulation finishes without error.
Go to the
Co-simulation Reportand right click on the top function that has the dataflow icon next to it and selectOpen Dataflow Viewerto relaunch the Dataflow viewer.Now look at the channel table in the Dataflow viewer and compare the depths in the
Cosim Max DepthandDepthcolumns. The correct depths can be observed in theCosim Max Depthcolumn (as seen below). This is the needed depths for all the FIFOs in this design.You can now manually back-annotate the observed
Cosim Max Depthas pragma settings in the source code.