Download PERQ CPU Technical Reference Manual

Transcript
ALU field ALU F ALU M ALU fn
0
1111 1
F=A
1
1010 1
F=B
2
0000 1
F=!A
3
0101 1
F=!B
4
1110 1
F=A.B
5
1101 1
F=A.!B
6
0001 1
F=!(A.B)
7
1011 1
F=A+B
10
0111 1
F=A+!B
11
0100 1
F=!(A+B)
12
1001 1
F=A xor B
13
0110 1
F=A xnor B
15
1001 0
F=A add B
17
0110 0
F=A sub B
ArithX
0
0
0
0
0
0
0
0
0
0
0
0
0
1
ArithY
0
0
0
0
0
0
0
0
0
0
0
0
1
0
CN<0>
0
0
0
0
0
0
0
0
0
0
0
0
!(Old carry)
!(Old carry)
The Carry signal is forced low except for the A+B+carry (ALU field = 15)
and A-B-carry (ALU field = 17) operations. Here, the ALD16.1 PROM inverts the old carry signal and feeds it to the ALU carry input. This inversion
compensates for the inversion perfomed by U165c in the carry path. The
ArithX and Arith Y signals are used to tell the condition code logic that an
add or subtract was the last ALU function performed. ArithX is high for a
subtraction, and ArithY for an addition. Both signals are low for all other
operations. These signals are also set automatically on the additions and subtractions used in multiply and divide instructions, which will be described
next.
3.6.2
Multiply and divide control of the ALU
3.6.2.1
The Add Instruction
The Add instruction is selected when the ALU field contains 14 (Octal).
When the MDR<0,1> signals select either no operation, or unsigned divide
(i.e. when MDR<1>=0), then the signals are set as follows :
ALU field ALU F ALU M ALU fn
14
1001 0
F=A add B
30
ArithX ArithY CN<0>
0
1
0