主要内容

基本 HDL 算法

使用基本 Simulink® 模块创建简单 HDL 设计

HDL Coder 模块库包含许多基本模块,您可将其添加到 Simulink 建模环境并开发 HDL 算法。这些模块包括输入源、输出信宿及执行基础到复杂数学和三角运算的模块。

要过滤 Simulink 库浏览器以仅显示 HDL 支持的模块,请输入 hdllib。本节列出的模块包括仅在 HDL Coder 库中可用的模块。AddProduct 等模块在库浏览器的 Simulink 库中提供。

有关过滤后的支持 HDL 代码生成的 Simulink 模块的列表,请参阅 Simulink 模块列表(HDL 代码生成)

函数

hdllibDisplay blocks that are compatible with HDL code generation

模块

全部展开

Bit ConcatConcatenates up to 128 input words into single output
Bit ReduceAND, OR, or XOR bit reduction on all input signal bits to single bit
Bit RotateRotate input signal by bit positions
Bit ShiftLogical or arithmetic shift of input signal
Bit SliceReturn field of consecutive bits from input signal
Bits to WordConvert vector of bits to integer (自 R2023a 起)
Word to BitsConverts real numbers to vector of bits (自 R2023a 起)
Sine HDL Optimized and Cosine HDL OptimizedImplement fixed-point sine and cosine wave by using lookup table approach optimized for HDL code generation
HDL CounterFree-running or count-limited hardware counter
Atan2Compute Atan2 operation using CORDIC approximation method and simulate with latency
SinCompute sine operation using CORDIC approximation method and simulate with latency
CosCompute cosine operation using CORDIC approximation method and simulate with latency
Cos+jSinCompute Cos+jSin operation using CORDIC approximation method and simulate with latency
SinCosCompute SinCos operation using CORDIC approximation method and simulate with latency
rSqrtCompute reciprocal square-root operation and simulate with latency
SqrtCompute Sqrt operation and simulate with latency
DivideCompute division operation and simulate with latency
ReciprocalCompute reciprocal operation and simulate with latency

主题

基础建模

数据类型支持

精选示例