100%(9)9 out of 9 people found this document helpful
This preview shows page 1 - 10 out of 79 pages.
The preview shows page 9 - 10 out of 79 pages.
CoE3DR4Computer OrganizationChapter 4
Introduction•Performance of a machine is determined by three factors:instruction count, clock cycle time, and clock cycles perinstruction (CPI)•The complier and ISA determine the instruction countrequired for a given program•Clock cycle time and number of CPI are determined byprocessor implementation•In this chapter we construct the datapath and control unit fortwo different implementation of MIPS instruction set
Introduction•The datapath is the interconnection of the components that make up theprocessor.–The datapath must provide connections for moving bits between memory,registers and the ALU.•The control is a collection of signals that enable/disable the inputs/outputsof the various components.•You can think of the control as the brain, and the datapath as the body.–the datapath does only what the brain tells it to do.•We will implement a subset of core MIPS :–lw and sw–add, sub, and, or and slt–beq and j•Effect of different implementation choices on clock rate and CPI
Implementation overview•Two identical first step for every instruction1.Send PC to memory and fetch the instruction from thatlocation2.Read one or two registers, selected by fields of instructionopcode (one register for lw, two for most of the otherinstructions)•Perform the actions to accomplish the instruction–Actions are largely the same, independent of exact opcode–Holds for each instruction class: memory reference, arithmetic-logic,and branch
Implementation overview•All instruction classes (except jump) use ALU after readingregisters–Memory reference instructions use ALU for address calculations–Arithmetic-logic instructions use ALU for operation execution–Branch instructions use ALU for comparison•Post-ALU execution of instructions–Memory-reference instruction needs to access memory for load orstore–Arithmetic-logic instruction must write data to a register–Branch instruction needs to change the PC for next instruction addressbased on comparison•Figure 4.1–High level view of a MIPS implementation
Implementation overview•Two important aspects of instruction execution are missing:•1. Data going to a particular unit is coming from two sources–We have to use multiplexer–Control lines of the multiplexers are set based on information takenfrom the instruction being executed•2. Several of the units must be controlled depending on thetype of instruction–Example: data memory must read on a load and write on a store–Example: ALU must perform one of several operations•These operations are directed by control lines that are set onthe basis of various fields in the instruction
Implementation overview•A control unit that has the instructions as an input is used todetermine how to set the control lines for the functional unitsand two of the multiplexers•