Академический Документы
Профессиональный Документы
Культура Документы
A Two-Stage Approach
ALUOp Action needed by ALU
11 Not used
We will let the main control (to be done later) summarize the opcode for us. From this
summary and the 6-bit funct field, we shall determine the control lines for the ALU.
Specifically, the main control will summarize the opcode as the 2-bit field ALUOp,
whose meaning is shown on the right
Some Simplifications
1. First find the minterms, i.e., the cases in which that output bit is asserted.
2. Then produce a circuit for each miniterm (an AND of literals).
3. Finally, construct an OR of these ANDs.
Looking again at the full (7-row) table, we notice that, in the 5 rows with ALUOp=1x,
F1=1 is enough to distinugish the two rows where Bnegate is asserted. This gives the
last table for BNegate:
ALUOp | Funct
1 0 | 5 4 3 2 1 0
------+-------------
x 1 | x x x x x x
1 x | x x x x 1 x
Op0
Now we apply the same technique to determine when OP0 is asserted and begin by
listing on the right the rows in the full table where its bit (the rightmost output bit) is
set.
ALUOp | Funct
1 0 | 5 4 3 2 1 0
------+------------
1 x | x x 0 1 0 1
1 x | x x 1 0 1 0
As with BNegate, we look back at the full table and study all the rows where
ALUOp=1x, and, within that group of rows, those rows where OP0 is asserted (the
last two rows).
ALUOp | Funct
1 0 | 5 4 3 2 1 0
------+------------
1 x | x x x x x 1
1 x | x x 1 x x x
We see that the rows where OP0 is asserted are characterized by just two Function
bits (3 and 0), which reduces the table to that on the right.
Op1
Finally, we determine when is OP1 asserted using the same technique. However, we
shall see that this bit is more inspiring than the first two. Once again the procedure
begins by listing on the right those rows where the relevant bit (the middle output bit)
is one.
ALUOp | Funct
1 0 | 5 4 3 2 1 0
------+------------
0 0 | x x x x x x
x 1 | x x x x x x
1 x | x x 0 0 0 0
1 x | x x 0 0 1 0
1 x | x x 1 0 1 0
Right away we get a hint that we have more work to do as five rows pop up.
As before we study the 5 rows in the original 7-row table that have ALUOp=1x, and,
within that group, those rows where OP1 is asserted (rows 3, 4, and 7).
We again find that one Funct bit distinguishes when OP1 is asserted, namely Funct bit
2 (in this case OP1 is asserted when Funct bit 2 is false).
As a result the truth table for OP1 reduces to the 3-row version shown below:
ALUOp | Funct
1 0 | 5 4 3 2 1 0
------+------------
0 0 | x x x x x x
x 1 | x x x x x x
1 x | x x x 0 x x
Although this truth table would yield a fairly small circuit, we shall to simplify it
further.
Recall from the original table, that the x 1 in the second row is really 0 1.
Last, we can use the first row to enlarge the scope (and hence simplify the
implementation) of the last row resulting in the final table on the right.
ALUOp | Funct
1 0 | 5 4 3 2 1 0
------+------------
0 x | x x x x x x
x x | x x x 0 x x