Main Content

Guidelines for Supported Blocks and Data Types - By Numbered List

The HDL modeling guidelines are a set of recommended guidelines that you can follow when creating Simulink® model for code generation with HDL Coder™. The guidelines for supported blocks and data types consist of guidelines for using various blocks in the HDL Coder block library, and about the supported data types. Each modeling guideline for HDL code generation has a different level of severity that indicates the levels of compliance requirements. To learn more about these severity levels, see HDL Modeling Guidelines Severity Levels.

These tables list the guidelines for supported data types in HDL Coder and for various blocks in the HDL Coder block library. The guidelines start from 2.1 and are divided into subsections. In the table, you see that certain guidelines have an associated model check. You can follow the modeling pattern recommended for these guidelines by running that check in the HDL Code Advisor. To learn more about the HDL Code Advisor, see Check HDL Compatibility of Simulink Model Using HDL Code Advisor.

Guidelines 2.1: HDL RAMs and HDL Operations Library

Guideline IDTitleSeverityAssociated Model Check/Coding Standard Rule
2.1.1RAM Block Access ConsiderationsRecommendedNone
2.1.2Serial to Parallel ConversionRecommendedNone

Guidelines 2.2: Logic and Bit Operations Library

Guideline IDTitleSeverityAssociated Model Check/Coding Standard Rule
2.2.1Logical and Arithmetic Bit Shift OperationsInformativeNone
2.2.2Usage of Logical Operator, Bitwise Operator, and Bit Reduce BlocksInformativeNone
2.2.3Use Boolean Output for Compare to Constant and Relational Operator BlocksStrongly RecommendedNone

Guidelines 2.3: Lookup Table and Signal Routing Blocks

Guidelines 2.4: Ports and Subsystems

Guideline 2.5: Rate Change and Constant Blocks

Guideline IDTitleSeverityAssociated Model Check/Coding Standard Rule
2.5.1Usage of Rate Conversion Blocks RecommendedNone
2.5.2Use Discrete and Finite Sample Time for Constant BlockRecommendedModel Check: Check for infinite and continuous sample time sources
2.5.3Dynamically Change Sample Offset for Downsample BlockInformativeNone

Guideline 2.6: Delay Blocks

Guideline 2.7: Multiplication and Accumulation Operations

Guideline 2.8: MATLAB Function Blocks

Guideline 2.9: Stateflow Charts

Guidelines 2.10: Data Types

Guidelines 2.11: Square Root Operations

Guideline IDTitleSeverityAssociated Model Check/Coding Standard Rule
2.11.1Use SqrtFunction Architecture for Square Root Block RecommendedNone

Related Topics