Cirrus Logic EP93xx User Manual
Page 75

DS785UM1
3-5
Copyright 2007 Cirrus Logic
MaverickCrunch Co-Processor
EP93xx User’s Guide
3
3
3
With saturation enabled (the default), the maximum representable value is returned on
overflow and the minimum representable value is returned on underflow. The maximum and
minimum values depends on the operand size and whether the UI bit in the DSPSC is set, as
shown in
.
To disable saturation on overflow and underflow, set the ISAT bit in the DSPSC.
Normally, arithmetic instructions that write to an accumulator do not saturate their results on
overflow or underflow. These instructions are:
•
CFMADD32 and CFMSUB32
•
CFMADDA32 and CFMSUBA32
However, the SAT[1:0] bits in the DSPSC may be set to select one of several kinds of
saturation to occur on the results of these instructions before they are written to an
accumulator.
Note:This action does not affect the operation of instructions that do not write their result to an
accumulator.
Enabling saturation also modifies the representation of data stored in the accumulator. The
three supported bit formats and their maximum and minimum saturation values are shown in
The bit format x.yy represents x binary bits before the decimal point and yy fraction bits after
the decimal point, as for example, when the bit format 2.62 has two binary bits and sixty-two
fraction bits. Though these formats utilize either 32- or 64-bit integers, the accumulators are
Table 3-1. Saturation for Non-accumulator Instructions
Overflow
Signed
32-bit
0x7FFF_FFFF
64-bit
0x7FFF_FFFF_FFFF_FFFF
Unsigned
32-bit
0xFFFF_FFFF
64-bit
0xFFFF_FFFF_FFFF_FFFF
Underflow
Signed
32-bit
0x8000_0000
64-bit
0x8000_0000_0000_0000
Unsigned
32-bit
0x0000_0000
64-bit
0x0000_0000_0000_0000
Table 3-2. Accumulator Bit Formats for Saturation
Bit Format
Maximum Value (hex)
Minimum Value (hex)
2.62
64 bits - 0x3FFF FFFF FFFF FFFF
64 bits - 0xC000 0000 0000 0000
1.63
64 bits - 0x7FFF FFFF FFFF FFFF
64 bits - 0x8000 0000 0000 0000
1.31
32 bits - 0x7FFF FFFF
32 bits - 0x8000 0000