ST20-C1 STMICROELECTRONICS [STMicroelectronics], ST20-C1 Datasheet - Page 67

no-image

ST20-C1

Manufacturer Part Number
ST20-C1
Description
Instruction Set Reference Manual
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
Memory access
A Q15 stored in memory may be loaded to Areg with a lsxinc instruction which will
automatically sign-extend the value. Similarly a Q15 may be written to memory with a
ssinc instruction (which will discard the top 16 bits).
Saturation
A well-formed Q15 value is sign extended to the width of the field, and so bits 15 to 31
inclusive will all be identical. Conversely, if the bits from 15 to 31 inclusive are not all
identical, then the value is not well-formed. It has either overflowed (if b31=0, so
positive) or underflo wed (if bit31=1, so negative).
A Q15 value in Areg may be saturated with the sequence:
5.7.6
Q31 format is a 32-bit signed fractional value in the range -1
stored in two’s-complement form with a sign bit (bit 31), an implied binary point
between bits 31 and 30, and 31 significant fractional bits (bit 30 to bit 0).
A Q31 value in a 32-bit field is organiz ed as shown in Figure 5.9.
The minimum and maximum representable values are as shown in Table 5.11.
Bit position
ldc 00007FFF;
order;
ldc FFFF8000;
order;
rev;
Q31 format
-(2
Most significant
31
0
sign bit
)
binary point
2
30
-1
Maximum
Minimum
2
29
-2
Table 5.10 Q15 limiting values
Figure 5.9 Q31 data format
2
28
-3
2
27
-4
Hex Value
FFFF8000
00007FFF
2
26
-5
Decimal Value
+0.9999
-1
5 Multiply accumulate
n < 1. The value is
2
Least significant
-29
2
2
-30
1
2
0
-31
67/205

Related parts for ST20-C1