The modification adds the Carry IN from the ALU board's input buses to the board's output bus so that Cin can form part of the input into the shifter and flags board. Cin is used by the shifter when shifting.
The Eagle CAD schematic for ALU Design v0.2 can be downloaded here.
The Eagle CAD board for ALU Design v0.2 can be downloaded here.
Post manufacture of the board I realised it would be better for the OR and AND controls to be swapped around so that OR is selected by the control input 00 rather than AND. This is so that zero in the microcode can be used when the intention is to pass a value straight through the ALU. Given the pin out of the AND and OR ICs are the same it is a simple job to just swap the ICs around.
Control input
The control input consists of 8 signals
- C0 (lsb) - Combined with C1 used to select ALU operation to output; 00 = OR, 01=AND, 10=XOR, 11=ADDER
- C1 - see above
- CIN - Carry input from the Control Register
- LBUSINPUTSELECT - select between the external left bus (L) or hardcoded zero (H) for the ALU's left input
- RBUSINPUTSELECT - select between the external right bus (L) or hardcoded zero (H) for the ALU's right input
- CINPUTSEL0 - combined with CINPUTSEL1to select the carry input into the adder; 00 = 0, 01=1, 10 = CIN, 11 = 0
- CINPUTSEL1 - see above
- INVB (msb) - If enabled (H) inverts the ALU's right input. Used for performing subtraction.
Data Input
There are two bus data inputs consisting of 4 bits each, bits 0 to 3.- L_0 (lsb) - left bus bit 0
- L_1 - left bus bit 1
- L_2 - left bus bit 2
- L_3 - left bus bit 3
- R_0 - right bus bit 0
- R_1 - right bus bit 1
- R_2 - right bus bit 2
- R_3 (msb) - right bus bit 3
Ouput
The output consists of 8 bits- Z0 - output bus bit 0
- Z1 - output bus bit 1
- Z2 - output bus bit 2
- Z3 - output bus bit 3
- Cout - Carry out from the adder. NB the carry is always calculated but only makes sense when an Add or Subtract operation is being performed
- L_3 - left input bit 3 pass through. This is used by the down stream Shifter and Flag board to calculate the overflow flag.
- R_3 - right input bit 3 pass through.
- Cin - pass through of Cin to the down stream Shifter and Flag board.
The three pass through outputs are a convenience as they make the physical connection to the Shifter and Flag board simpler as all the inputs are gathered together and can be connected with a single 8 line ribbon cable from the second ALU board.
No comments:
Post a Comment