![Texas Instruments C2000 Piccolo LaunchPad Workshop Manual And Lab Manual Download Page 193](http://html.mh-extra.com/html/texas-instruments/c2000-piccolo-launchpad/c2000-piccolo-launchpad_workshop-manual-and-lab-manual_1094583193.webp)
IQmath
C2000 Microcontroller Workshop - Numerical Concepts
8 - 17
The IQmath approach enables the seamless portability of code between fixed and floating-point
devices. This approach is applicable to many problems that do not require a large dynamic range,
such as motor or digital control applications.
IQ Fractions: uniform distribution (same precision everywhere)
0
+
∞
-
∞
Number Line Insight
Distributions
Both floating-point and IQ formats have 2
32
possible
values on the number line
It’s how each distributes these values that differs
Floating-Point: non-uniform distribution (variable precision)
0
+
∞
-
∞
Traditional “Q” Math Approach
Traditional 32-bit “Q” Math Approach
y = mx + b
Y = ((int64) M * (int64) X + (int64) B << Q) >> Q;
in C:
Note: Requires support for 64-bit integer data type in compiler
<< 24
Align Binary
Point for Add
I8 Q24
M
X
B
Y
I8 Q24
I8 Q24
I16 Q48
ssssssssssssssssssI8 Q24
ssssI8 Q48
I16 Q48
sssssssssssssssssI16 Q24
I8 Q24
>> 24
Align Binary
Point for Store
Summary of Contents for C2000 Piccolo LaunchPad
Page 74: ...Interrupts 4 18 C2000 Microcontroller Workshop Reset and Interrupts ...
Page 100: ...Lab 5 System Initialization 5 26 C2000 Microcontroller Workshop System Initialization ...
Page 218: ...Lab 8 IQmath FIR Filter 8 42 C2000 Microcontroller Workshop Numerical Concepts ...
Page 334: ...F28069 controlCARD A 4 C2000 Microcontroller Workshop Appendix A Experimenter s Kit SW2 ...
Page 336: ...F28035 controlCARD A 6 C2000 Microcontroller Workshop Appendix A Experimenter s Kit SW2 SW3 ...