The 4-bit ALUMODE controls the behavior of the second stage
adder/subtracter/logic unit. ALUMODE = 0000
selects add operations of the form Z + (W + X + Y + CIN). CIN is the output of the
CARRYIN MUX (see Figure 1). ALUMODE = 0011
selects subtract operations of the form Z – (W + X + Y + CIN). ALUMODE = 0001
can implement –Z + (W + X + Y + CIN) – 1. ALUMODE
= 0010
can implement –(Z + W + X + Y + CIN) – 1,
which is equivalent to not (Z + W + X + Y + CIN). The negative of a two’s complement
number is obtained by performing a bitwise inversion and adding one, for example, –k
= not (k) + 1.
DSP Operation | OPMODE[8:0] | ALUMODE[3:0] | |||
---|---|---|---|---|---|
3 | 2 | 1 | 0 | ||
Z +W + X + Y + CIN | Any legal OPMODE |
0
|
0
|
0
|
0
|
Z – (W + X + Y + CIN) | Any legal OPMODE |
0
|
0
|
1
|
1
|
–Z + (W + X + Y + CIN) – 1 = not (Z) + W + X + Y + CIN | Any legal OPMODE |
0
|
0
|
0
|
1
|
not (Z +W + X + Y + CIN) = –Z – W – X – Y – CIN – 1 |
Any legal OPMODE |
0
|
0
|
1
|
0
|
|