Multiple Clock Cycle CPU - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Multiple Clock Cycle CPU

Description:

We will use Register-Transfer-Language (RTL) to describe these steps ... target is a new state element (temp register) ... Required a few new state elements ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 20
Provided by: Tullse
Category:
Tags: cpu | clock | cycle | multiple

less

Transcript and Presenter's Notes

Title: Multiple Clock Cycle CPU


1
Multiple Clock Cycle CPU
  • Last Time
  • Control for a single cycle CPU
  • Instruction sequence, instruction classes,
    different operations
  • Today
  • Quiz 4
  • Multiple Cycle CPU Datapath
  • Reminders/Announcements
  • HW 2, Due Monday, April 26

2
Why a Multiple Clock Cycle CPU?
  • the problem gt single-cycle cpu has a cycle time
    long enough to complete the longest instruction
    in the machine
  • the solution gt break up execution into smaller
    tasks, each task taking a cycle, different
    instructions requiring different numbers of
    cycles or tasks
  • other advantages gt reuse of functional units
    (e.g., alu, memory)
  • performance instructions cpi cycle time

3
High-level View
4
Multicycle datapath
5
Breaking Execution Into Clock Cycles
  • Introduces extra registers when
  • signal is computed in one clock cycle and used in
    another, AND
  • the inputs to the functional block that outputs
    this signal can change before the signal is
    written into a state element.
  • Significantly complicates control. Why?
  • The goal is to balance the amount of work done
    each cycle.

6
Breaking Execution Into Clock Cycles
  • We will have five execution steps (not all
    instructions use all five)
  • fetch
  • decode register fetch
  • execute
  • memory access
  • write-back
  • We will use Register-Transfer-Language (RTL) to
    describe these steps

7
1. Fetch
  • IR MemPC
  • PC PC 4
  • (may not be final value of PC)

8
2. Instruction Decode and Register Fetch
  • A RegIR25-21
  • B RegIR20-16
  • ALUOut PC (sign-extend (IR15-0) ltlt 2)
  • compute target before we know if it will be used
    (may not be branch, branch may not be taken)
  • target is a new state element (temp register)
  • everything up to this point must be
    Instruction-independent, because we still havent
    decoded the instruction.
  • everything Inst-dependent from here on.

9
3. Execution, memory address computation, or
branch completion
  • Memory reference (load or store)
  • ALUOut A sign-extend(IR15-0)
  • R-type
  • ALUout A op B
  • Branch
  • if (A B) PC ALUOut
  • At this point, Branch is complete, and we start
    over others require more cycles.

10
4. Memory access or R-type completion
  • Memory reference
  • load
  • MDR MemALUout
  • store
  • MemALUout B
  • R-type
  • RegIR15-11 ALUout
  • R-type is complete

11
5. Memory Write-Back
  • RegIR20-16 memory-data
  • memory instruction is complete

12
Summary of execution steps
13
Complete Multicycle Datapath
(notice logic for jump instruction now included)
14
Instruction Fetch
  • IR MemoryPC
  • PC PC 4

15
Instruction Decode and Reg Fetch
A RegisterIR25-21 B RegisterIR20-16 Ta
rget PC (sign-extend (IR15-0) ltlt 2)
16
3. Execution (R-type)
  • ALUout A op B

17
4. R-type Completion
RegIR15-11 ALUout
18
3. Branch Completion
if (A B) PC Target
19
Multicycle CPU Datapath Summary
  • Performance gain from allowing some instructions
    to complete faster
  • ET instrs CPI cycle time
  • Required a few new state elements
  • Control over multiple cycles interleaved
    instruction schedules
Write a Comment
User Comments (0)
About PowerShow.com