HDL Coding Standards
Industry coding standards recommend using certain HDL coding guidelines. HDL Coder™ generates code that follows industry standard rules and generates a report that shows how well your generated HDL code conforms to industry coding standards. See HDL Coding Standard Report.
HDL Coder checks for conformance of your Simulink® model or MATLAB® algorithm to the HDL coding standard rules.
The coder can also generate third-party lint tool scripts to use to check your generated HDL code. The industry standard rules fall under the following three sections:
Section 1: Basic Coding Practices.
Section 2: RTL Description Rules and Checks.
Section 3: RTL Design Methodology Guidelines.
When generating a coding standard report, HDL Coder adds a prefix to the rules. The rule prefix depends on whether you generate the report from MATLAB or Simulink. The rule prefix for MATLAB is CGML and for Simulink is CGSL.
To fix errors or warnings related to these rules, update your model design. You can customize some of the coding standard rules. See HDL Coding Standard Customization Properties.
HDL coding standards provide language-specific code usage rules to help you generate more efficient, portable, and synthesizable HDL code, such as coding guidelines for:
Ports, reset, and clocks
Combinatorial and synchronous logic
Finite state machines
Conditional statements and operators