HDL 导入
使用 HDL 导入将可综合的 HDL 代码导入 Simulink 建模环境中。运行 importhdl 函数时,HDL 导入会解析输入 HDL 文件并生成 Simulink 模型。生成模型时,将删除不直接影响输出的未连接组件。该模型将从功能和行为方面直观地表示 HDL 代码。您可以编译并运行模型以验证 HDL 代码的功能。
不推荐使用 HDL 导入进行往返代码生成。不要使用 HDL 导入来导入先前通过 HDL Coder™ 软件从 Simulink 模型生成的 HDL 代码。您创建的 Simulink 模型通常处于更高抽象级别。通过 HDL 导入生成的模型可能处于较低抽象级别。从这个模型生成的 HDL 代码可能不能用于生产代码。
要生成产品级 HDL 代码,请使用 Simulink 模块、MATLAB® 代码或 Stateflow® 图开发您的算法。然后,使用 HDL Coder 生成代码。
函数
importhdl | Import Verilog or VHDL code and generate Simulink model |
主题
- Import HDL Code and Generate Simulink Model
Import HDL code in a Simulink environment and generate Simulink model.
- Supported Verilog Constructs for HDL Import
Supported Verilog® constructs that you can import into the model-based design environment.
- Supported VHDL Constructs When Generating Simulink Models from VHDL Code
Supported VHDL constructs that you can import into the model-based design environment.
- Verilog Dataflow Modeling with HDL Import
Supported HDL dataflow patterns that you can use when importing the HDL code into the model-based design environment.
- Supported Synthesizable RTL Constructs and Keywords in HDL Coder
Supported Synthesizable VHDL® and Verilog RTL Constructs and keywords in HDL Coder for code generation.
