主要内容

MATLABSimulink 中的定点数学运算

基于 CORDIC 和其他嵌入式优化的数学运算,用于高效的 C/C++ 和 HDL 代码

Fixed-Point Designer™ 模块库使用 CORDIC 等算法提供常见数学和矩阵运算的硬件高效实现。使用 HDL Coder™ 为包含这些模块的设计生成 HDL 代码。Fixed-Point Designer 函数库包括基于 CORDIC 和其他硬件高效的数学运算实现,如除法、指数运算和三角函数。使用代码生成器为包含这些函数的设计生成 C/C++ 代码。

基于 CORDIC(坐标旋转数字计算方法)的算法是硬件效率最高的算法之一,因为它们只需进行迭代移位相加运算。CORDIC 算法不需要显式乘数,它适合计算各种函数。

有关 MATLAB® 和 Simulink® 中矩阵运算(包括线性系统求解器和矩阵分解)的基于 CORDIC 的实现,请参阅MATLAB 中的定点矩阵运算Simulink 中的定点矩阵运算

函数

全部展开

cordicsigmoidCORDIC-based approximation of sigmoid activation (自 R2023b 起)
ceilDiv将除法结果向正无穷方向舍入 (自 R2021a 起)
fixDiv将除法的结果向零方向舍入 (自 R2021a 起)
floorDiv将除法结果向负无穷方向舍入 (自 R2021a 起)
nearestDiv将除法的结果向最接近的整数舍入 (自 R2021a 起)
modByConstant除以常量分母后的模数 (自 R2021a 起)
fixed.cordicDivideCORDIC-based fixed-point divide
fixed.cordicReciprocalCORDIC-based fixed-point reciprocal (自 R2021b 起)
cordicsqrtCORDIC-based approximation of square root
cordicabs基于 CORDIC 的绝对值
cordicangle基于 CORDIC 的相位角
cordiccexpCORDIC-based approximation of complex exponential
cordicacosCORDIC-based approximation of inverse cosine
cordicasinCORDIC-based approximation of inverse sine
cordicatan2基于 CORDIC 的四象限反正切
cordiccosCORDIC-based approximation of cosine
cordicsin基于 CORDIC 的正弦逼近
cordicsincosCORDIC-based approximation of sine and cosine
cordicsinhcoshCORDIC-based approximation of hyperbolic sine and cosine (自 R2023b 起)
cordictanhCORDIC-based hyperbolic tangent
cordiccart2polCORDIC-based transformation of Cartesian coordinates to polar
cordicpol2cartCORDIC-based approximation of polar-to-Cartesian conversion
cordicrotateCORDIC-based approximation of rotation of input

模块

全部展开

CORDIC Sigmoid HDL Optimized计算基于 CORDIC 的 sigmoid 激活并生成优化的 HDL 代码 (自 R2024a 起)
Complex Divide HDL OptimizedDivide one input by another using CORDIC algorithm and generate optimized HDL code (自 R2021a 起)
Real Divide HDL OptimizedDivide one real input by another using CORDIC algorithm and generate optimized HDL code (自 R2021a 起)
Divide by Constant HDL Optimized将输入除以常量并舍入到整数并生成优化的 HDL 代码 (自 R2021a 起)
Divide by Constant and Round将输入除以常量并舍入到整数 (自 R2021a 起)
Modulo by Constant HDL OptimizedPerform mod operation with a constant denominator and generate optimized HDL code (自 R2021a 起)
Modulo by Constant用常量分母执行取模运算 (自 R2021a 起)
Normalized Reciprocal HDL OptimizedComputes normalized reciprocal using CORDIC algorithm and generates optimized HDL code
Real Reciprocal HDL OptimizedCompute reciprocal using CORDIC algorithm and generate optimized HDL code (自 R2021a 起)
CORDIC Square Root HDL OptimizedCORDIC-based approximation of square root (自 R2024a 起)
Complex to Magnitude-AngleCompute magnitude and phase angle of complex signal using CORDIC algorithm
Magnitude-Angle to Complex将幅值和/或相位角信号转换为复信号
Hyperbolic Tangent HDL Optimized计算基于 CORDIC 的双曲正切并生成优化的 HDL 代码
Trigonometric Function指定应用于输入信号的三角函数
Euler to NED Transformation HDL OptimizedComputes Euler to North-East-Down transformation using pipelined or burst architecture and generates optimized HDL code (自 R2022b 起)

主题

精选示例