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: Blocks in 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: Blocks in Logic and Bit Operations Library

Guidelines 2.3: Lookup Table and Signal Routing Blocks

Guideline IDTitleSeverityAssociated Model Check/Coding Standard Rule
2.3.1Generate FPGA Block RAM from Lookup Tables Strongly RecommendedNone
2.3.2Recommended Block Parameter Settings of Multiport Switch Block for Numeric and Enumerated TypesRecommendedNone

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 BlockMandatoryModel Check: Check for infinite and continuous sample time sources

Guideline 2.6: Delay Blocks

Guideline 2.7: Blocks for Multiplication and Accumulation Operations

Guideline 2.8: MATLAB Function Blocks

Guideline 2.9: Stateflow Charts

Guidelines 2.10: Data Types

Guideline IDTitleSeverityAssociated Model Check/Coding Standard Rule
2.10.1Use Boolean for Logical Data and Ufix1 for Numerical Data MandatoryNone
2.10.2Specify Data Type of Gain BlocksRecommendedNone
2.10.3Enumerated Data Type RestrictionsMandatoryNone

Related Topics