English
Language : 

AK7712A-VT Datasheet, PDF (35/87 Pages) Asahi Kasei Microsystems – Built-in 20-bit ADC/DAC Sophisticated Audio DSP
ASAHI KASEI
[AK7712A-VT]
4) ALU
ALU can execute 34-bit arithmetic operation and 24-bit arithmetic•logical operation as follows.
<List of ALU Command>
* 34-bit arithmetic operation * 24-bit arithmetic•logical operation
-
: A-B
$
: OR
+
: A+B
&
: AND
<<
: B through
#
: Exclusive-OR
<1
: B through + 1
!
: NOT
||
: the absolute value
1-
: A-1
/20, /18, /16 : round
1+
: A+1
ALU outputs three flags mentioned below, holds the last flag's state at ALU-NOP.
* SGF: This flag shows MSB(+4 bits) of ALU. SGF flag shows "0" when the result is zero or positive,
and shows "1" when the result is negative.
* OVF: This flag shows the overflow(exceeding the 0-th bit) of operated result of ALU. When overflow is
occurred, it shows "1" else "0".
The data is output to DBUS as follows at overflow;
positive overflow: 7FFFFF(HEX) , negative overflow: 800000(HEX).
In addition, when the data exceed the overflow margin on the way of calculation, this flag is held on "1",
output the above data to DBUS.
* ZRF: This flag shows "1" when the result of 24-bit(0∼-23) calculation at ALU is "0".
The 20,18 and 16-bit rounding is prepared. 20-bit rounding execute the addition of "1" to -20th bit( if LSB = all "0"
then +0), and execute half-adjust. In the same way, 18-,16-bit rounding add "1" to -18th, -16th bit respectively. The
through +1 adds "1" to -24th bit, for the calculation data to be obtained as data rounded to 24-bit in advance, then
the execution step for rounding can be omitted. The location of addition point of "1" for 20-bit rounding is shown
below.
"<1" (B through +1) adds "1" to -25th bit of the input data. In the case that the calculated data is output on DBUS,
the data is rounded off to 24bits.
<Example program for 24-bit data output>
,OP,CR*DR,
,,,,
,;
,OP,CR*DR,
,,,,
,;
,OP,CR*DR,IDR0=SH0 <1 ,,,,
,;
,OP,
,IDR0=SH0 + LDR0 ,,,,
,;
,OP,
,IDR0=SH0 + LDR0 ,,,,
,;
,OP,
,
,,,,
,;
,OP,
,
,,,,ODR0, ;ODR0 is the rounded value of calculated data
0180-E-02
- 35 -
1997/12