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 Simulation
and then clickOK
in 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
Solution
link in the top menu and selectingSolution Settings
(as shown below)In the
Solution Settings
window, underGeneral
, scroll to findconfig_dataflow
in the Configuration Settings (as shown below), select theoverride_user_fifo_depth
setting and set the value to 40. ClickOK
to set this new configuration setting.Click on the green Run command () to rerun C Synthesis.
Rerun C/RTL Cosimulation by selecting
Co-Simulation
from the drop down menu next to the green Run command (). ClickOK
in 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 Report
and right click on the top function that has the dataflow icon next to it and selectOpen Dataflow Viewer
to relaunch the Dataflow viewer.Now look at the channel table in the Dataflow viewer and compare the depths in the
Cosim Max Depth
andDepth
columns. The correct depths can be observed in theCosim Max Depth
column (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 Depth
as pragma settings in the source code.