Functional Description

The user of the ALU must do the following:

  1. Drive input pins
  2. Provide STROBEA signal to latch input A into register A
  3. Provide STROBEB signal to latch input B into register B
  4. Drive opcode pins
  5. Provide STR_OP signal to indicate that the opcode is active and stable
  6. Wait for the OE signal
  7. Read the output values on OE signal going HIGH
  8. Repeat the above steps for the next operation

Design Choices

It should be noted that we have only eight input pins. The user should load A and B operands sequentially by providing STROBEA and STROBEB signals. On the output side we provide nine pins including the Carry Out (CO) pin for the ADD operation. For the MULTIPLY operation we provide the 16 bit output in two stages. The MULTL instruction triggers the actual MULTIPLY operation and provides the lower byte of the result on completion. The higher byte (whic h is latched in the output register) can be retrieved using the MULTH instruction.

Opcode table

OpcodeOperationInputsCycles
0000ANDA,B1
0001NOTA1
0010MULTLA,B16
0011XORA,B1
0100ADDA,B1
0101SUBA,B1
0110ORA,B1
0111MULTH1
1000SL0A,B1
1001SL1A,B1
1010RLA,B1
1100RRA,B1
1101ASRA,B1
1110SR0A,B1
1111SR1A,B1

Pin Layout