%OFFSET_type_STATE%

The index of the first state variable in the type array. type can be any of BOOL, INT and REAL.

Each of the arrays (one for each of the basic types boolean, integer and real) is partitioned into input signals, output signals, local signals and state variables. This key provides the index of the first state variable in the array. Hence, the index of the n:th boolean state variable in the boolean array is %OFFSET_BOOLEAN_LOCAL% + n.

A state variable is the holder of a value from the previous cycle, corresponding to a Pre block. State variables don't exist explicitly in the abstract RTflow model, but are necessary in the generated implementation code. See %STATE_UPDATE_EQUATIONS% for details about how state variables are used.

Generators

C/C++/Java, VHDL