config_dataflow - 2023.1 English

Vitis High-Level Synthesis User Guide (UG1399)

Document ID
UG1399
Release Date
2023-07-17
Version
2023.1 English

Description

  • Specifies the default behavior of dataflow pipelining (implemented by the set_directive_dataflow command).
  • Allows you to specify the default channel memory type and depth.

Syntax

config_dataflow [OPTIONS]

Options

-default_channel [fifo | pingpong]
By default, a RAM memory, configured in pingpong fashion, is used to buffer the data between functions or loops when dataflow pipelining is used. When streaming data is used (that is, the data is always read and written in consecutive order), a FIFO memory is more efficient and can be selected as the default memory type.
Tip: Set arrays to streaming using the set_directive_stream command to perform FIFO accesses.
-disable_fifo_sizing_opt
Disable FIFO sizing optimizations that increase resource usage and may improve performance and reduce deadlocks.
-fifo_depth <integer>
Specifies the default depth of the FIFOs. The default depth is 2.

This option has no effect when ping-pong memories are used. If not specified, the default depth is 2, or if this is an array converted into a FIFO, the default size is the size of the original array. In some cases, this might be too conservative and introduce FIFOs that are larger than necessary. Use this option when you know that the FIFOs are larger than required.

CAUTION:
Be careful when using this option. Insufficient FIFO depth might lead to deadlock situations.
-override_user_fifo_depth <value>

Use the specified depth for every hls::stream, overriding any user settings.

Note: This is useful for checking if a deadlock is due to insufficient FIFO depths in the design. By setting it to a very large value (for example, the maximum depth printed by co-simulation at the end of simulation), if there is no deadlock, then you can use the FIFO depth profiling options of co-simulation and the GUI to find the minimum depth that ensures performance and avoids deadlocks.
-scalar_fifo_depth <integer>
Specifies the minimum for scalar propagation FIFO.

Through scalar propagation, the compiler converts the scalar from C/C++ code into FIFOs. The minimal sizes of these FIFOs can be set with -start_fifo_depth. If this option is not provided, then the value of -fifo_depth is used.

-start_fifo_depth <integer>
Specifies the minimum depth of start propagation FIFOs.

This option is only valid when the channel between the producer and consumer is a FIFO. This option uses the same default value as the-fifo_depth option, which is 2. Such FIFOs can sometimes cause deadlocks, in which case you can use this option to increase the depth of the FIFO.

-strict_mode [off | warning | error]
Set the severity for messages related to dataflow canonical form.
-strict_stable_sync[=true|false]
Force synchronization of stable ports with ap_done.
-task_level_fifo_depth <integer>
Specifies the depth of the task level FIFO.

A FIFO is synchronized by ap_ctrl_chain. The write is the ap_done of the producer, the read is the ap_ready of the consumer. Like a PIPO in terms of synchronization, and like a FIFO in terms of access.

Examples

Changes the default channel from ping-pong memories to FIFOs:

config_dataflow -default_channel fifo

Changes the default channel from ping-pong memories to FIFOs with a depth of 6:

config_dataflow -default_channel fifo -fifo_depth 6
CAUTION:
If the design implementation requires a FIFO with greater than six elements, this setting results in a design that fails RTL verification. Be careful when using this option, because it is a user override.

To find the cause of deadlocks, try to increase all the FIFO depths significantly, especially those that are reported by C/RTL co-simulation. If the deadlock disappears with a large "N", then it is due to insufficient FIFO depths. You can test this as follows:

config_dataflow -fifo_depth N -start_fifo_depth N -scalar_fifo_depth N -task_level_fifo_depth N