State Control

Specify synchronous reset and enable behavior for blocks with state


HDL Coder™ / HDL Subsystems


The State Control block in Synchronous mode improves the HDL simulation behavior of blocks with state, or blocks that have reset or enable ports. The simulation behavior in Classic mode is the same as when you do not add the State Control block inside the subsystem.

When use the Synchronous mode of the block, the Simulink® simulation behavior closely matches that of the digital hardware.

If you have HDL Coder installed, you can generate cleaner HDL code with the Synchronous mode of the State Control block. For more information, see State Control.


State control

Specify whether to use synchronous or classic semantics. The default is Synchronous.


The following limitations apply to using the State Control block in Simulink. For information about this block in HDL Coder, see State Control in the HDL Coder documentation.

Block-Level Limitations

  • For synchronous semantics in S-function blocks, set the method ssSetStateSemanticsClassicAndSynchronous to true.

  • Discrete-Time Integrator blocks with a reset port do not support synchronous semantics.

  • All action subsystems connected to If and Switch Case blocks must have the same semantics, either classic or synchronous.

  • The following blocks are not allowed in synchronous mode:

    • Continuous time blocks and blocks with continuous rate

    • Simulink blocks with Input processing set to Columns as channels (frame based), where this parameter applies.

    • Trigger block

    • From Workspace block

    • The set of unit delay blocks in the Additional Math & Discrete > Additional Discrete sublibrary in Simulink, such as the Unit Delay Resettable and Unit Delay External IC blocks

Subsystem-level Limitations

  • Conditional subsystems using classic semantics cannot have subsystems with synchronous semantics inside them.

  • Conditional subsystems must be single rate when you use the State Control block in synchronous mode.

  • Synchronous Enabled Subsystem cannot contain reset subsystems or a reset parameter port. For example, you cannot have a Delay block with an external reset port inside the subsystem.

  • These blocks are not supported in synchronous mode:

Model-Level Limitations

  • Variable-size signals are not supported with synchronous semantics.

  • Synchronous semantics do not propagate across model boundaries. If your parent model has synchronous semantics, any referenced model must have synchronous semantics explicitly specified. At the root level of each referenced model, add a State Control block with the State control parameter set to Synchronous.

Introduced in R2016a