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

no-image

ST20-C1

Manufacturer Part Number
ST20-C1
Description
Instruction Set Reference Manual
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
5.6.3
The initial accumulator value must be loaded into the accumulator for the start of the
smacloop instruction. The initial accumulator is either in Q31 format ( LongMode ), or
Q15 format ( ShortMode ) and is handled accordingly.
In LongMode ,
In ShortMode ,
Note that rounding is achieved by adding half of the least significant bit to the initial
value, which by associativity is equivalent to adding it to the final value.
5.6.4
The biquad instruction starts with an empty accumulator. Since the result is always
Q15 (equivalent to ShortMode ), rounding is achieved by loading the accumulator with
2
5.6.5
At the end of a smacloop instruction the final accum ulator value is saturated and
scaled to the appropriate format, according to mac_mode.
If either the overflow or underflow bits in the status register are set, then the final value
is set to the appropriate exceptional value from Table 5.6. Note that this does not
involve testing the accumulator value, which is considered to be invalid if either of
these status register bits are set.
Otherwise, when the status register reports no overflow or underflow, bits 38 to 47
inclusive of the accumulator are tested for mutual equality. If they are all the same, the
accumulator value is well-formed and post-scaling is applied to produce the final accu-
mulator value.
In LongMode ,
In ShortMode ,
22
(which is half of the least significant bit of the result).
Pre-scaling and rounding - smacloop
left shift by 7 places
sign extend from bit 38 to the most significant bit
set bit 6 = 1 (for rounding)
left shift by 23 places
sign extend from bit 38 to the most significant bit
set bit 22 = 1 (for rounding)
Pre-scaling and rounding - biquad
Post-scaling and saturation - smacloop
arithmetic right shift by 7 places(left 1 + right 8)
truncate to low 32 bits
arithmetic right shift by 23 places (right 15 + right 8)
truncate to low 32 bits
(right 1 + left 8)
(left 15 + left 8)
5 Multiply accumulate
63/205

Related parts for ST20-C1