Computer Architecture

Start Lecture #13

The Control for the Datapath

We start with our last figure, which shows the data path and then add the missing mux and show how the instruction is broken down.

We need to set the muxes.

We need to generate the three ALU cntl lines: 1-bit Bnegate and 2-bit OP

    And     0 00
    Or      0 01
    Add     0 10
    Sub     1 10
    Set-LT  1 11
  

Homework: What happens if we use 1 00 for the three ALU control lines? What if we use 1 01?

What information can we use to decide on the muxes and alu cntl lines?

The instruction!

So no problem, just do a truth table.

A Two-Stage Approach

We will let the main control (to be done later) summarize the opcode for us. From this summary we determine the control lines for the muxes. Specifically, the main control will generate a 2-bit field ALUOp

    ALUOp   Action needed by ALU

    00      Addition (for load and store)
    01      Subtraction (for beq)
    10      Determined by funct field (R-type instruction)
    11      Not used