Description
Configures the default behavior of front-end compiling.
Syntax
config_compile [OPTIONS]
Options
-
-enable_auto_rewind[=true|false]
- When TRUE uses alternative HLS implementation of pipelined loops which enables automatic loop rewind. This accepts values of TRUE or FALSE. The default value is TRUE.
-
-ignore_long_run_time[=true|false]
- Do not report the "long runtime" warning. This accepts values of TRUE or FALSE. The default value is FALSE.
-
-name_max_length <value>
- Specifies the maximum length of function names. If the length of the name is longer than the threshold, the last part of the name is truncated, and digits are added to make the name unique when required. The default is 256.
-
-no_signed_zeros[=true|false]
- Ignores the signedness of floating-point zero so that the compiler can
perform aggressive optimizations on floating-point operations. This accepts values of
TRUE or FALSE. The default value is FALSE.Important: Using this option might change the result of any floating point calculations and result in a mismatch in C/RTL co-simulation. Please ensure your test bench is tolerant of differences and checks for a margin of difference, not exact values.
-
-pipeline_flush_in_task <always | never | ii1>
- Specifies that pipelines in
hls::tasks
will be flushing (flp
) by default to reduce the probability of deadlocks in C/RTL Co-simulation. This option applies to pipelines that achieve an II=1 with the default option ofii1
. However, you can also specify it as applyingalways
to enable flushing pipelines in eitherhls::tasks
or dataflow, or can be completely disabled usingnever
. For more information refer to Flushing Pipelines and Pipeline Types. -
-pipeline_loops <threshold>
-
Specifies the lower limit for automatically pipelining loops and nested loops. In the case of a single un-nested loop, the loop will be pipelined if the trip count of the loop is greater than the specified threshold. The default value is 64, causing Vitis HLS to automatically pipeline loops with a trip count greater than 64. For example, a loop with a trip count of 65 will be pipelined with the default threshold, but not a loop with a trip count of 64.
For nested loops, the loops are evaluated in pairs starting with the innermost loop. If the inner loop trip count exceeds the specified threshold it is marked for pipelining, and the analysis continues to the parent loop of the pair. If the trip count of the parent loop exceeds the specified threshold then it is also marked for pipelining, and the inner loop (previously marked for pipelining) is unrolled into the parent loop. The analysis continues upward if there are additional loops.
However, other optimizations affect the analysis, and can prevent the pipeline behavior you are looking for. For example, you might need to use
loop_flatten off
to prevent flattening and facilitate loop pipeline. -
-pipeline_style <stp | flp | frp>
- Specifies the default type of pipeline used by Vitis HLS for the PIPELINE pragma or directive, or for loop
pipelining due to the
-pipeline_loops
threshold specified above. For more information on pipeline styles, refer to Flushing Pipelines and Pipeline Types.Important: This is a hint not a hard constraint. The tool checks design conditions for enabling pipelining. Some loops might not conform to a particular style and the tool reverts to the default style (stp) if necessary.-
flp
- Flushable pipeline architecture: flushes when input data is not available then stalls waiting for new data.
-
frp
- Free-running, flushable pipeline. Runs even when input data is not available. Use this when you need better timing due to reduced pipeline control signal fanout, or when you need improved performance to avoid deadlocks. However, this pipeline style can consume more power, as the pipeline registers are clocked even if there is no data.
-
stp
- Stall pipeline. Runs only when input data is available otherwise it stalls. This is the default style when a flushable pipeline is not required, such as when there are no performance or deadlock issue due to stalls.
-
-
-pragma_strict_mode[=true|false]
- Enable error messages for misplaced or misused pragmas.
-
-pre_tcl <arg>
- Specify a Tcl script to run prior to starting the
csynth_design
command. -
-unsafe_math_optimizations[=true|false]
- Ignores the signedness of floating-point zero and enables associative
floating-point operations so that compiler can perform aggressive optimizations on
floating-point operations. This accepts values of TRUE or FALSE. The default value is
FALSE.Note: Using this option might change the result of any floating point calculations and result in a mismatch in C/RTL co-simulation. Please ensure your test bench is tolerant of differences and checks for a margin of difference, not exact values.
Examples
Pipeline the innermost loop with a tripcount higher than 30, or pipeline the parent loop of the innermost loop when its tripcount is less than or equal 30:
config_compile -pipeline_loops 30
Ignore the signedness of floating-point zero:
config_compile -no_signed_zeros
Ignore the signedness of floating-point zero and enable the associative floating-point operations:
config_compile -unsafe_math_optimizations