Hierarchical Designs and Synchronous Hardware Behavior - MATLAB & Simulink (original) (raw)

Create subsystems and hierarchical HDL designs with State Control block

The HDL Coder block library contains many blocks that you can add to your Simulink® modeling environment and develop your HDL algorithm. To model large designs, you can divide your model into subsystems and create hierarchical designs. For synchronous hardware behavior and to generate hardware-friendly HDL code, use the State Control block inside the subsystems.

To filter the Simulink Library Browser to show only HDL-supported blocks, enterhdllib. The blocks listed in this section include those blocks that are only available in theHDL Coder library. Blocks such as Foreach Subsystem and Atomic Subsystem are available in the Simulink library in the Library Browser.

For a filtered list of Simulink blocks supported for HDL code generation, see Simulink Block List (HDL Code Generation).

Functions

hdllib Display blocks that are compatible with HDL code generation

Checks

expand all

Check for obsolete Unit Delay Enabled/Resettable Blocks
Check for invalid top level subsystem

Blocks

expand all

Unit Delay Enabled Synchronous Delay input signal by one sample period when external Enable signal is true
Unit Delay Resettable Synchronous Delay input signal by one sample period when external Reset signal is false
Unit Delay Enabled Resettable Synchronous Delay input signal by one sample period when external Enable signal is true and external Reset signal is false
Tapped Delay Enabled Synchronous Delay scalar signal multiple sample periods and output all delayed versions when external Enable signal is true (Since R2023a)
Tapped Delay Resettable Synchronous Delay scalar signal multiple sample periods and output all delayed versions when external Reset signal is false (Since R2023a)
Tapped Delay Enabled Resettable Synchronous Delay scalar signal multiple sample periods and output all delayed versions when external Enable signal is true and external Reset signal is false (Since R2023a)
Enabled Delay Delay input signal by fixed or variable sample periods when external enable signal is true (Since R2024b)
Enabled Resettable Delay Delay input signal by fixed or variable sample periods when external Enable signal is true and external Reset signal is false (Since R2024b)
State Control Specify synchronous reset and enable behavior for blocks with state
Synchronous Subsystem Represent subsystem that has synchronous reset and enable behavior
Enabled Synchronous Subsystem Represent enabled subsystem that has synchronous reset and enable behavior
Resettable Synchronous Subsystem Represent resettable subsystem that has synchronous reset and enable behavior

Topics

Using the State Control Block to Generate More Efficient Code with HDL Coder

Using the State Control Block to Generate More Efficient Code with HDL Coder

Use the State Control block to generate hardware-friendly HDL code using HDL Coder™.

Resettable Subsystem Support in HDL Coder

Resettable Subsystem Support in HDL Coder

Use Resettable Subsystems in HDL Coder™.

Using ForEach Subsystems in HDL Coder

Using ForEach Subsystems in HDL Coder

Use a For Each Subsystem to implement a streaming square root algorithm by cascading identical CORDIC iterations. You can then generate code for the algorithm by using HDL Coder™.

Field-Oriented Control of a Permanent Magnet Synchronous Machine

Field-Oriented Control of a Permanent Magnet Synchronous Machine

Generate HDL code for a Field-Oriented Control (FOC) algorithm for a Permanent Magnet Synchronous Machine (PMSM).

Simulate and Generate HDL Code for Tapped Delay Enabled Resettable Synchronous Block

Simulate and Generate HDL Code for Tapped Delay Enabled Resettable Synchronous Block

Implement the Tapped Delay Enabled Resettable Synchronous block in a Simulink® model that a delays scalar signal multiple sample periods and output all delayed versions when external Enable signal is true and external Reset signal is false. You also generate HDL code for the model.

Generate HDL Code When Using Vector Data Type Inputs with Enable Signal Port

Generate HDL Code When Using Vector Data Type Inputs with Enable Signal Port

Generate HDL code for the Unit Delay Enabled Synchronous block when using vector data inputs with Enable signal port.

Simulate and Generate HDL Code for Unit Delay Resettable Synchronous Block

Simulate and Generate HDL Code for Unit Delay Resettable Synchronous Block

Simulate and generate HDL code for the Unit Delay Resettable Synchronous block.