주요 콘텐츠

MATLAB 및 Simulink에서의 고정소수점 수학 연산

R2026b
효율적인 C/C++ 및 HDL 코드를 위한 CORDIC 기반 수학 연산과 다른 임베디드 최적화 수학 연산

Fixed-Point Designer™ 블록 라이브러리는 CORDIC와 같은 알고리즘을 사용하여 일반적인 수학 연산과 행렬 연산에 대한 하드웨어 효율적인 구현을 제공합니다. 이러한 블록을 통합하는 설계를 위한 HDL 코드를 HDL Coder™를 사용하여 생성할 수 있습니다. 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나눗셈 결과를 0 방향으로 반올림
floorDiv나눗셈 결과를 음수 무한대 방향으로 내림
nearestDiv나눗셈 결과를 가장 가까운 정수 방향으로 반올림
modByConstantModulus after division by a constant denominator
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-based fixed-point divide
fixed.cordicReciprocalCORDIC-based fixed-point reciprocal
embblk.lookupTableReciprocalLookup table-based fixed-point reciprocal (R2026b 이후)
embblk.realReciprocalSqrtCompute reciprocal of square root of real input (R2026b 이후)
cordicsqrtCORDIC-based approximation of square root
cordicabsCORDIC-based absolute value
cordicangleCORDIC-based phase angle
cordiccexpCORDIC-based approximation of complex exponential
cordicacosCORDIC-based approximation of inverse cosine
cordicasinCORDIC-based approximation of inverse sine
cordicatan2CORDIC-based four quadrant inverse tangent
cordiccosCORDIC-based approximation of cosine
cordicsinCORDIC-based approximation of sine
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 blockCORDIC Sigmoid HDL OptimizedCORDIC 기반 시그모이드 활성화 계산 및 최적화된 HDL 코드 생성 (R2024a 이후)
Complex Divide HDL Optimized blockComplex Divide HDL OptimizedDivide one input by another using CORDIC algorithm and generate optimized HDL code
Real Divide HDL Optimized blockReal Divide HDL OptimizedDivide one real input by another using CORDIC algorithm and generate optimized HDL code
Divide by Constant HDL Optimized blockDivide by Constant HDL OptimizedDivide input by a constant and round to integer and generate optimized HDL code
Divide by Constant and Round blockDivide by Constant and Round입력값을 상수로 나누고 정수로 반올림
Modulo by Constant HDL Optimized blockModulo by Constant HDL OptimizedPerform mod operation with a constant denominator and generate optimized HDL code
Modulo by Constant blockModulo by Constant상수 분모로 모듈로 연산 수행
Normalized Reciprocal HDL Optimized blockNormalized Reciprocal HDL OptimizedComputes normalized reciprocal using CORDIC algorithm and generates optimized HDL code
Real Reciprocal HDL Optimized blockReal Reciprocal HDL OptimizedCompute reciprocal and generate optimized HDL code
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 ComplexConvert magnitude and/or a phase angle signal to complex signal
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 이후)

도움말 항목

추천 예제