Viewing the Dataflow Graph after RTL Co-Simulation - 2023.1 English

Vitis Tutorials: Hardware Acceleration (XD099)

Document ID
Release Date
2023.1 English

After synthesis, you must run co-simulation. For more information, refer to C/RTL Co-Simulation in Vitis HLS in the Vitis HLS Flow of the Vitis Unified Software Platform Documentation (UG1416).

  1. From the menu, select the Solution > Run C/RTL Co-Simulation command. The Co-simulation dialog box displays as shown in the folowing figure.

    RTL Co-Sim

  2. Enable the Channel (PIPO/FIFO) Profiling checkbox.

  3. Click OK.

    After co-simulation completes, the tool opens the Co-simulation Report which reports whether your simulation testbench passed or not.

    In the case of Dataflow analysis, your testbench needs to call the synthesized function more than once to get the performance data from multiple iterations, and to make sure the design is flushing the FIFOs. When it comes to performance, one function call gives you latency, two or more calls to the function can give you the initiation interval (II).

  4. After the co-simulation completes, select Analysis in the upper right hand corner of the screen to switch to the Analysis perspective.

    If the Dataflow Graph view is open, the report is updated (or back-annotated) with performance data generated by the RTL co-simulation, as shown in the following figure.

    TIP: If it is not open, right click the top-level diamond function in the Module Hierarchy view, and select Open Dataflow Viewer.

    Open Dataflow Viewer

    After running C/RTL co-simulation, the elements of the graph are filled out with performance data, and the Process and Channel tables beneath the graph are also filled out (as shown below). Without the performance data provided by RTL co-simulation, the graph and tables will have NA values to reflect the missing values. For more information, refer to Dataflow Viewer in the Vitis HLS Flow of the Vitis Unified Software Platform Documentation (UG1416).

    Process Table

    Pay specific attention to the Dataflow Process Table (shown above). Cosim Stalling Time column indicates what percentage of the simulation time was spent stalling for this particular process. Additionally, Cosim Read Block Time or Cosim Write Block Time shows the percentage of time blocked from reading or writing to the process’s channels. Cosim Stall No Start and Cosim Stall No Continue indicates forward and back pressure respectively:

    • Forward pressure implies that you are prevented from starting another execution iteration by the block handshaking protocols

    • Back pressure implies that a consumer process is still processing the data that this process has produced and is not yet ready for the next set of data.

    These are important indicators that point out potential problems inside the dataflow region and are indicative of the typical producer-consumer rate issues that can result in lower performance and/or in some cases, deadlock.

    Channel Table

    Similarly, the channel table (shown above) also tracks the read block and write block times for each channel (and indicated by Cosim Read Block Time and Cosim Write Block Time). The channel table also shows the depth (Depth), type of channel (Type) and the maximum depth achieved during the simulation (Cosim Max Depth) by the channel. Typically, these data fields are useful for FIFO channels. The following sections will describe in more detail how these fields can be used to accurately size the FIFO depths and to resolve deadlocks due to incorrect FIFO sizing.

    Additionally, the Cosim Category column in the Process and Channel tables is used to categorize the processes/channels into one of the four possible self-explanatory states: “none”, “read_block”, “write_block” and “read_block and write_block.”