Arithmetic Logic Unit

  • DESCRIPTION

    The ALU performs eight functions: addition, subtraction, and, or, shift right, shift left, negation and copy (the value in one register into another. It also has an accumulator in the form of latches which store each output bit and a temporary input latch. The first operand is latched into the ALU while the second operand is passed directly to the ALU. When there is only one operand, it is passed directly to the ALU.

    The ALU was constructed using the mpla program. We called mpla without the -I -O extensions so that it would leave off the input/output latches, allowing us to use our own. Each alubit contained one of these PLAs plus one latch for the accumulator and one temporary latch.

    Tha ALU is also responsible for calculating branch conditions. The four branch conditions in this CPU are zero, negative, overflow and carry. Each branch condition subset contains a branch condition detect and a latch for holding the result. For branch on negative and branch on carry, the detection is very easy. Out3 is routed directly to the branch negative latch and the carry out is routed directly to the branch on carry latch. Branch on zero is detected by passing all of the bits of the result through a NOR gate, which implements pseudo-NMOS technology. This result is then latched in the branch on zero latch. The conditions for overflow are slightly more complicated. The conditions for overflow are:

    (from _Computer Organization and Design_ by John L. Hennessy and David A. Patterson)

    Checking for these conditions has been incorporated in to a single pseudo-NMOS gate.



  • LAYOUT


    Last modified: Thu Dec 18 00:08:39 CST 1997