08/01/2005
Designing MIPS Processor
(Single-Cycle)
Presentation G CSE 675.02: Introduction to Computer Architecture
Gojko Babić
- g. babic
Presentation G 2
- We're now ready to look at an implementation of the system
that includes MIPS processor and memory.
- The design will include support for execution of only:
– memory-reference instructions: lw & sw, – arithmetic-logical instructions: add, sub, and, or, slt & nor, – control flow instructions: beq & j, – exception handling: illegal instruction & overflow.
- But that design will provide us with principles, so many more
instructions could be easily added such as: addu, lb, lbu, lui, addi, adiu, sltu, slti, andi, ori, xor, xori, jal, jr, jalr, bne, beqz, bgtz, bltz, nop, mfhi, mflo, mfepc, mfco, lwc1, swc1, etc.
Introduction
- g. babic
Presentation G 3
- We shall first design a simpler processor that executes each
instruction in only one clock cycle time.
- This is not efficient from performance point of view, since:
– a clock cycle time (i.e. clock rate) must be chosen such that the longest instruction can be executed in one clock cycle and – that makes shorter instructions execute in one unnecessary long cycle.
- Additionally, no resource in the design may be used more than
- nce per instruction, thus some resources will be duplicated.
- Because of that, the singe cycle design will require:
– two memories (instruction and data), – two additional adders.
Single Cycle Design
- g. babic
Presentation G 4
Elements for Datapath Design
16 32 Sign extend
- g. Sign-extension unit
32 32
- h. Shift left 2
Shift Left 2 P C a . P ro g ra m c o u n te r 32 32 RegWrite Registers Write register Read data 1 Read data 2 Read register 1 Read register 2 Write data Data Data Register numbers
- b. Register File
5 5 5 32 32 32 c . A L U A L U c o n tr o l A L U r e s u lt A L U Z e r o 4 32 32 32 A dd S u m
- d. A d d e r
32 32 32 MemRead MemWrite Data memory Write data Read data
- e. Data memory unit
Address 32 32 32 In struction m em ory In struc tio n ad dres s Instru ctio n f . In struction m em ory 32 32 MemRead=1 MemWrite =0