pragma HLS reset
Description
Adds or removes resets for specific state variables (global or static).
The reset port is used in an FPGA to restore the registers and block RAM connected to the reset port to an initial value any time the reset signal is applied. The presence and behavior of the RTL reset port is controlled using theconfig_rtl
configuration file. The reset settings include the ability to set the polarity of the reset, and specify whether the reset is synchronous or asynchronous, but more importantly it controls, through the reset option, which registers are reset when the reset signal is applied. SeeClock, Reset, and RTL Outputin theVivado Design Suite User Guide: High-Level Synthesis(UG902) for more information.
Greater control over reset is provided through theRESET
pragma. If a variable is a static or global, theRESET
pragma is used to explicitly add a reset, or the variable can be removed from the reset by turningoff
the pragma. This can be particularly useful when static or global arrays are present in the design.
Syntax
Place the pragma in the C source within the boundaries of the variable life cycle.
#pragma HLS reset variable=off
Example 1
a
in function
foo
even when the global reset setting is
none
or
control
:
void foo(int in[3], char a, char b, char c, int out[3]) { #pragma HLS reset variable=a
Example 2
Removes reset from variablea
in functionfoo
even when the global reset setting isstate
orall
.
void foo(int in[3], char a, char b, char c, int out[3]) { #pragma HLS reset variable=a off
See Also
- Vivado Design Suite User Guide: High-Level Synthesis(UG902)