Arithmetic Logic Unit (ALU)
2-18
ADSP-2126x SHARC Processor Hardware Reference
the ALU operation returns two results, and in compare operations, the
ALU operation returns no result (only flags are updated). ALU results can
be returned to any location in the register file.
The DSP transfers input operands from the register file during the first
half of the processor cycle and transfers results to the register file during
the second half of the cycle. With this arrangement, the ALU can read and
write the same register file location in a single cycle. If the ALU operation
is fixed-point, the inputs are treated as 32-bit fixed-point operands. The
ALU transfers the upper 32 bits from the source location in the register
file. For fixed-point operations, the result(s) are always 32-bit fixed-point
values. Some floating-point operations (
Logb
,
Mant
and
Fix
) can also yield
fixed-point results.
The DSP transfers fixed-point results to the upper 32 bits of the data reg-
ister and clears the lower eight bits of the register. The format of
fixed-point operands and results depends on the operation. In most arith-
metic operations, there is no need to distinguish between integer and
fractional formats. Fixed-point inputs to operations such as scaling a float-
ing-point value are treated as integers. For purposes of determining status
such as overflow, fixed-point arithmetic operands and results are treated as
twos-complement numbers.
ALU Saturation
When the
ALUSAT
bit is set (=1) in the
MODE1
register, the ALU is in satura-
tion mode. In this mode, all positive fixed-point overflows return the
maximum positive fixed-point number (0x7FFF FFFF), and all negative
overflows return the maximum negative number (0x8000 0000).
When the
ALUSAT
bit is cleared (=0) in the
MODE1
register, fixed-point
results that overflow are not saturated; the upper 32 bits of the result are
returned unaltered.
The ALU overflow flag reflects the ALU result before saturation.
Содержание ADSP-21261 SHARC
Страница 30: ...Contents xxx ADSP 2126x SHARC Processor Hardware Reference ...
Страница 40: ...Register Diagram Conventions xl ADSP 2126x SHARC Processor Hardware Reference ...
Страница 58: ...Differences From Previous SHARCs 1 18 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 112: ...Secondary Processing Element PEy 2 54 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 178: ...Summary 3 66 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 204: ...DAG Instruction Summary 4 26 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 322: ...Setting Up DMA 7 32 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 436: ...SPORT Programming Examples 9 86 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 521: ...ADSP 2126x SHARC Processor Hardware Reference 11 31 Input Data Port rts IDP_ISR end ...
Страница 522: ...Input Data Port Programming Example 11 32 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 590: ...Timer Programming Examples 14 20 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 796: ...I O Processor Registers A 174 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 800: ...B 4 ADSP 2126x SHARC Processor Core Manual ...
Страница 846: ...Index I 36 ADSP 2126x SHARC Processor Hardware Reference ...