メインコンテンツ

MATLAB と Simulink における固定小数点算術演算

R2026b
効率的な C/C++ コードと HDL コードのための CORDIC ベースおよびその他の組み込み最適化算術演算

Fixed-Point Designer™ のブロックのライブラリには、一般的な算術演算や行列演算について、CORDIC などのアルゴリズムを使用したハードウェア効率に優れた実装が用意されています。HDL Coder™ を使用して、これらのブロックを含む設計の HDL コードを生成します。Fixed-Point Designer の関数のライブラリには、除算、指数演算、三角関数などの算術演算の CORDIC ベースおよびその他のハードウェア効率に優れた実装が含まれています。コーダーを使用して、それらの関数を組み込む設計用の C/C++ コードを生成します。

CORDIC (COordinate Rotation DIgital Computer) ベースのアルゴリズムには反復的なシフト加算演算のみを必要とするので、ハードウェア効率が最も高いアルゴリズムです。CORDIC アルゴリズムは、明示的な乗数を必要とせず、さまざまな関数を計算するのに適しています。

MATLAB® と Simulink® における行列演算 (線形システム ソルバーや行列分解を含む) の CORDIC ベースの実装については、MATLAB での固定小数点行列演算およびSimulink での固定小数点行列演算を参照してください。

関数

すべて展開する

cordicsigmoidCORDIC-based approximation of sigmoid activation (R2023b 以降)
ceilDiv除算結果の正の無限大方向への丸め
fixDiv除算結果のゼロ方向への丸め
floorDiv除算結果の負の無限大方向への丸め
nearestDiv除算結果の最も近い整数方向への丸め
modByConstant定数分母による除算後のモジュラス
embblk.divide.cordicDivideCORDIC-based fixed-point divide with bit-exact results to Real Divide HDL Optimized and Complex Divide HDL Optimized blocks (R2026a 以降)
fixed.cordicDivideCORDIC ベースの固定小数点の除算
fixed.cordicReciprocalCORDIC ベースの固定小数点の逆数
embblk.lookupTableReciprocalLookup table-based fixed-point reciprocal (R2026b 以降)
embblk.realReciprocalSqrtCompute reciprocal of square root of real input (R2026b 以降)
cordicsqrt平方根の CORDIC ベースの近似
cordicabsCORDIC ベースの絶対値
cordicangleCORDIC ベースの位相角
cordiccexp複素指数の CORDIC ベース近似
cordicacos逆余弦の CORDIC ベース近似
cordicasin逆正弦の CORDIC ベース近似
cordicatan2CORDIC ベースの 4 象限逆正接
cordiccos余弦の CORDIC ベース近似
cordicsin正弦の CORDIC ベース近似
cordicsincos正弦および余弦の CORDIC ベース近似
cordicsinhcoshCORDIC-based approximation of hyperbolic sine and cosine (R2023b 以降)
cordictanhCORDIC ベースの双曲線正接
cordiccart2pol直交座標から極座標への CORDIC ベースの変換
cordicpol2cart極座標から直交座標への変換の CORDIC ベースの近似
cordicrotate入力の回転の CORDIC ベース近似

ブロック

すべて展開する

CORDIC Sigmoid HDL Optimized blockCORDIC Sigmoid HDL OptimizedCORDIC ベースのシグモイド活性化を計算して最適化された HDL コードを生成 (R2024a 以降)
Complex Divide HDL Optimized blockComplex Divide HDL OptimizedCORDIC アルゴリズムを使って入力を別の入力で除算して最適化された HDL コードを生成
Real Divide HDL Optimized blockReal Divide HDL OptimizedCORDIC アルゴリズムを使って実数入力を別の実数入力で除算して最適化された HDL コードを生成
Divide by Constant HDL Optimized blockDivide by Constant HDL Optimized入力を定数で除算して整数に丸め、最適化された HDL コードを生成
Divide by Constant and Round blockDivide by Constant and Round入力を定数で除算して整数に丸める
Modulo by Constant HDL Optimized blockModulo by Constant HDL Optimized定数分母でのモジュロ演算を実行して最適化された HDL コードを生成
Modulo by Constant blockModulo by Constant定数分母でのモジュロ演算の実行
Normalized Reciprocal HDL Optimized blockNormalized Reciprocal HDL OptimizedCORDIC アルゴリズムを使って正規化逆数を計算して最適化された HDL コードを生成
Real Reciprocal HDL Optimized blockReal Reciprocal HDL OptimizedCORDIC アルゴリズムを使って逆数を計算して最適化された HDL コードを生成
Real Reciprocal Square Root HDL Optimized blockReal Reciprocal Square Root HDL OptimizedCompute reciprocal of square root of real input and generate optimized HDL code (R2026b 以降)
CORDIC Square Root HDL Optimized blockCORDIC Square Root HDL OptimizedCORDIC-based approximation of square root (R2024a 以降)
Complex to Magnitude-Angle blockComplex to Magnitude-AngleCompute magnitude and phase angle of complex signal using CORDIC algorithm
Magnitude-Angle to Complex blockMagnitude-Angle to Complex振幅信号と位相角信号の両方またはどちらか一方を複素信号に変換
Exp HDL Optimized blockExp HDL OptimizedCompute base-e exponential of input (R2026b 以降)
Log10 HDL Optimized blockLog10 HDL OptimizedCompute base-10 logarithm of input (R2026b 以降)
Log2 HDL Optimized blockLog2 HDL OptimizedCompute base-2 logarithm of input (R2026b 以降)
Logarithm HDL Optimized blockLogarithm HDL OptimizedCompute arbitrary-base logarithm of input (R2026b 以降)
Natural Logarithm HDL Optimized blockNatural Logarithm HDL OptimizedCompute natural (base-e) logarithm of input (R2026b 以降)
Pow10 HDL Optimized blockPow10 HDL OptimizedCompute base-10 exponential of input (R2026b 以降)
Pow2 HDL Optimized blockPow2 HDL OptimizedCompute base-2 exponential of input (R2026b 以降)
Power HDL Optimized blockPower HDL OptimizedCompute arbitrary-base exponential of input (R2026b 以降)
Hyperbolic Tangent HDL Optimized blockHyperbolic Tangent HDL OptimizedCORDIC ベースの双曲線正接を計算して最適化された HDL コードを生成
Trigonometric Function blockTrigonometric Function入力に対する指定された三角関数
Screenshot of Euler to NED Transformation HDL Optimized blockEuler to NED Transformation HDL OptimizedComputes Euler to North-East-Down transformation using pipelined or burst architecture and generates optimized HDL code (R2022b 以降)
Extract MSB block with one input and one output port.Extract MSBExtract most significant bit (MSB) of input (R2026b 以降)

トピック

注目の例