EasyManuals Logo

Texas Instruments C28 Series Student Guide

Texas Instruments C28 Series
342 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #180 background imageLoading...
Page #180 background image
IQmath Library
IQmath Library
IQmath
IQmath
Library:
Library:
math & trig functions (v1.4)
math & trig functions (v1.4)
Accuracy of functions/operations approx ~28 to ~31 bits
IQsin
IQsin
(A),
(A),
IQcos
IQcos
(A)
(A)
IQsinPU
IQsinPU
(A),
(A),
IQcosPU
IQcosPU
(A)
(A)
IQatan(A),IQatan2(A,B)
IQatan(A),IQatan2(A,B)
IQatan2PU(A,B)
IQatan2PU(A,B)
IQsqrt
IQsqrt
(A),
(A),
IQisqrt
IQisqrt
(A)
(A)
IQmag
IQmag
(A,B)
(A,B)
_
_
IQsin
IQsin
(A), _
(A), _
IQcos
IQcos
(A)
(A)
_
_
IQsinPU
IQsinPU
(A), _
(A), _
IQcosPU
IQcosPU
(A)
(A)
_
_
IQatan
IQatan
(A), _IQatan2(A,B)
(A), _IQatan2(A,B)
_IQatan2PU(A,B)
_IQatan2PU(A,B)
_
_
IQsqrt
IQsqrt
(A), _
(A), _
IQisqrt
IQisqrt
(A)
(A)
_
_
IQmag
IQmag
(A,B)
(A,B)
sin(A),
sin(A),
cos
cos
(A)
(A)
sin(A*2pi),cos(A*2pi)
sin(A*2pi),cos(A*2pi)
atan(A),atan2(A,B)
atan(A),atan2(A,B)
atan2(A,B)/2pi
atan2(A,B)/2pi
sqrt(A),1/sqrt(A)
sqrt(A),1/sqrt(A)
sqrt
sqrt
(A*A + B*B)
(A*A + B*B)
trig
trig
functions
functions
IQsat
IQsat
(A,Pos,
(A,Pos,
Neg
Neg
)
)
_
_
IQsat
IQsat
(A,Pos,
(A,Pos,
Neg
Neg
)
)
if(A > Pos) A = Pos
if(A > Pos) A = Pos
if(A <
if(A <
Neg
Neg
) A =
) A =
Neg
Neg
saturation
saturation
A
A
B
B
A
A
-
-
B
B
A
A
-
-
B
B
substract
substract
>, >=, <, <=, ==, |=, &&, ||
>, >=, <, <=, ==, |=, &&, ||
>, >=, <, <=, ==, |=, &&, ||
>, >=, <, <=, ==, |=, &&, ||
>, >=, <, <=, ==, |=, &&, ||
>, >=, <, <=, ==, |=, &&, ||
boolean
boolean
A + B
A + B
A + B
A + B
A + B
A + B
add
add
A / B
A / B
_
_
IQdiv
IQdiv
(A , B)
(A , B)
A / B
A / B
divide
divide
A * B
A * B
_
_
IQmpy
IQmpy
(A , B)
(A , B)
A * B
A * B
multiply
multiply
A = IQ(1.2345)
A = IQ(1.2345)
A = _IQ(1.2345)
A = _IQ(1.2345)
A = 1.2345
A = 1.2345
constant
constant
iq
iq
A, B;
A, B;
_
_
iq
iq
A, B;
A, B;
float A, B;
float A, B;
type
type
“IQmath” in C++
“IQmath” in C++
“IQmath” in C
“IQmath” in C
Floating
Floating
-
-
Point
Point
Operation
Operation
Additionally, the "IQmath" library contains DSP library modules for filters (FIR & IIR) and Fast
Fourier Transforms (FFT & IFFT).
IQmath
IQmath
Library:
Library:
Conversion Functions (v1.4)
Conversion Functions (v1.4)
IQmath.lib > contains library of math functions
IQmathLib.h > C header file
IQmathCPP.h > C++ header file
atoIQ
atoIQ
(char)
(char)
_
_
atoIQ
atoIQ
(char)
(char)
atof
atof
(char)
(char)
string to
string to
iq
iq
IQtoQN
IQtoQN
(A)
(A)
_
_
IQtoQN
IQtoQN
(A)
(A)
A
A
iq
iq
to
to
qN
qN
QNtoIQ
QNtoIQ
(A)
(A)
_
_
QNtoIQ
QNtoIQ
(A)
(A)
A
A
qN
qN
to
to
iq
iq
IQmpyI32int(A,B)
IQmpyI32int(A,B)
_IQmpyI32int(A,B)
_IQmpyI32int(A,B)
(long) (A * (float) B)
(long) (A * (float) B)
integer(
integer(
iq
iq
*long)
*long)
IQmpyI32frac(A,B)
IQmpyI32frac(A,B)
_IQmpyI32frac(A,B)
_IQmpyI32frac(A,B)
A
A
-
-
(long) (A * (float) B)
(long) (A * (float) B)
fraction(
fraction(
iq
iq
*long)
*long)
IQtoF
IQtoF
(A)
(A)
_
_
IQtoF
IQtoF
(A)
(A)
A
A
IQ to float
IQ to float
IQmpyI32(A,B)
IQmpyI32(A,B)
_IQmpyI32(A,B)
_IQmpyI32(A,B)
A * (float) B
A * (float) B
iq
iq
=
=
iq
iq
*long
*long
IQfrac
IQfrac
(A)
(A)
_
_
IQfrac
IQfrac
(A)
(A)
A
A
(long) A
(long) A
fraction(
fraction(
iq
iq
)
)
IQint
IQint
(A)
(A)
_
_
IQint
IQint
(A)
(A)
(long) A
(long) A
integer(
integer(
iq
iq
)
)
IQNtoIQ
IQNtoIQ
(A)
(A)
_
_
IQNtoIQ
IQNtoIQ
(A)
(A)
A
A
iqN
iqN
to
to
iq
iq
IQtoIQN
IQtoIQN
(A)
(A)
_
_
IQtoIQN
IQtoIQN
(A)
(A)
A
A
iq
iq
to
to
iqN
iqN
“IQmath” in C++
“IQmath” in C++
“IQmath” in C
“IQmath” in C
Floating
Floating
-
-
Point
Point
Operation
Operation
8 - 24 C28x - Numerical Concepts & IQmath

Table of Contents

Other manuals for Texas Instruments C28 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments C28 Series and is the answer not in the manual?

Texas Instruments C28 Series Specifications

General IconGeneral
BrandTexas Instruments
ModelC28 Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals