Control
The design in the book splits the control into a main
controller, and a smaller controller that targets only the ALU. We've followed
that convention.
Module: ALUControl
This controller takes a 2 bit input from the
main controller, as well as the function code from the instruction and generates
the 4 bit ALUctl code.
|
|
Port Description:
|
|
Name |
Dir |
Width |
Description |
ALUOp |
In |
2 |
00 = ADD, 01 = SUB, 10 = FUNC |
Func |
In |
5 |
function field defines what to
do |
ALUCtl |
Out |
4 |
operation to perform |
|
|
|
|
Module: ALUControl2
This controller is designed to support the
MIPSALU_2 component. Where ALUControl had only three choices, we now have the
chance to choose ALUctl based on the opcode of the instruction. This does mean
that we need a mux on the Func input to select between the Func and Opcode
fields of the instruction.
|
|
Port Description:
|
|
Name |
Dir |
Width |
Description |
ALUOp |
In |
2 |
00 = ADD, 01 = SUB, 10 = FUNC,
11 = Opcode |
Func |
In |
5 |
function field defines what to
do |
ALUCtl |
Out |
4 |
operation to perform |
|
|
|
|