Sequencing a Computer - PowerPoint PPT Presentation

1 / 42
About This Presentation
Title:

Sequencing a Computer

Description:

No lab next week (holiday on 4/9) No class following week (4/13, 15) I'll be traveling ... Derived from definition of ISA. Hard to design logic manually ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 43
Provided by: anselmo9
Category:

less

Transcript and Presenter's Notes

Title: Sequencing a Computer


1
Sequencing a Computer
  • Anselmo Lastra

2
Topics for Rest of Semester
  • Chapter 10
  • An example computer architecture
  • Hardwired single-cycle control
  • Microprogrammed multi-cycle control
  • Chapter 11
  • Pipelining and hazards
  • RISC and CISC (maybe skip) examples
  • Programmable devices (simpler than FPGA)
  • Maybe more on I/O and interrupts

3
Schedule
  • Two classes next week
  • No lab next week (holiday on 4/9)
  • No class following week (4/13, 15)
  • Ill be traveling
  • Class on 4/20
  • Maybe lab help session will decide next wk
  • Last class on 4/22 wrap-up
  • No final (unless objections)

4
Lab Status
  • Tomorrow beq
  • Last MIPS instruction
  • Next add peripherals

5
Chapter 10-7
  • Simple computer architecture
  • Not unlike MIPS, except 16 bits
  • Single-cycle hardwired control
  • Multicycle microprogrammed control

6
Instruction Formats
  • Register-type instructions
  • Only 8 registers (3 bits)

7
Immediate
  • Only 3 bits for the immediate value (Op)
  • Mostly useful for typical increments/decrement
  • Or just as an example

8
Branching
  • PC relative branching
  • The 6 bits are sign extended to 16
  • Opcode might specify branch on zero, if register
    SA is zero

9
Example Instructions
10
Contrast to Microoperations
  • Although appear similar, theyre not
  • Computer instructions fetched using PC
  • Branching much more general
  • Decoding of computer instructions usually more
    complex

11
Resources
  • Book implies Harvard architecture
  • Separate I and D
  • They treat I memory as ROM
  • Asynchronous

12
Single-Cycle Control
  • Datapath is same as example earlier in Chapter 10
  • Looked at in datapath lectures before break
  • Next slide shows for review
  • First look at overall control
  • Then look at instruction decoder

13
Datapath Control Word
14
Block Diagram
15
Architecture
16
Instruction Decoder
  • Many lines (the three regs) need no logic
  • RISC Style
  • Architecture tailored so parts of inst.
    correspond to control lines

17
Control
  • Not much more to say
  • Simple, partly because decoding so
    straightforward
  • Drawbacks
  • Some instructions, like multi-cycle shifts, cant
    be implemented w/o complex datapath
  • Two memories (essentially a ROM and an async data
    memory)
  • Two cycles needed to use one memory
  • Biggest problem is delay

18
Delay in Single-Cycle Control
  • Worst case delay with reasonable components
  • Total 17ns
  • Could only clock at about 50 MHz
  • Pipelining the solution
  • First lets look at multi-cycle control

19
Multi-Cycle Hardwired Control
  • Goals
  • Support more complex instructions
  • Use single memory
  • Not necessarily coupled with multi-cycle

20
Architecture
21
Instruction Register
  • IL load signal for IR
  • PS, for PC control
  • Hold value multiple cycles, increment, load, etc.

22
Single Memory
  • PC addresses memory
  • Mux M gates address
  • MM signal to select program/data address
  • Inst. stored in IR

23
Added Temporary Regs
  • Now 16x16
  • 8 not visible to user
  • New signals to address the registers

24
Sequence Control
25
Control Word
26
Control Design
  • Not hard to specify state diagram
  • Derived from definition of ISA
  • Hard to design logic manually
  • If didnt have logic synthesis, would probably
    use microprogramming

27
Two-Cycle Instructions
  • Simplest instructions have 2 cycles
  • Fetch (instruction)
  • Execute
  • This is minimum necessary
  • They assume async memory
  • Dont need extra clock cycles

28
Basic Inst.
29
Branch
  • Test and modify PC

30
Next Step
  • Make a table or write Verilog from ASM diagram
    and instruction descriptions
  • Tedious, but not hard
  • Same as youve done, with more details
  • State machine easy for these instructions

31
Table from ISA and ASM
32
Load Register Indirect
  • Three cycles
  • Temporary register used

33
Shift
  • Shift right/left multiple
  • RSA to be shifted
  • First tested for 0
  • R9 loaded with shift length

34
Multi-Cycle Table
35
Summary multi-cycle
  • Multi-cycle computer enables more complex
    instructions
  • May also be faster
  • Later well look at pipelined computers more
    parallelism but more complex control

36
Limits to Clock Period
  • Conventional datapath
  • 12 ns delay, so maximum is 83 MHz clock
  • Maybe have even tighter constraints due to
    control logic

37
Pipelining
  • Break datapath into stages
  • Add registers between stages
  • Like production line book uses car wash example
  • Wash, rinse, dry

38
Latency vs Throughput
  • Latency, the amount of time it takes to execute
    an instruction, does not change
  • Inn fact, typically increases
  • Throughput, the number of instructions executed
    per second, increases
  • By almost the number of pipeline stages

39
Expected Performance
  • Longest stage is 5ns
  • So clock can be 200 MHz
  • Not 3 x 83 MHz. Why?
  • Latency is 15ns
  • Also extra hardware

40
Datapath
  • 3 Stages
  • Operand Fetch
  • Execute
  • Write Back
  • Note that WB register is the register file (same
    as at top)

41
Pipelined Execution
  • Note pipeline fill and empty
  • Efficiency is not 100
  • Important to not stall pipeline

42
Next Time
  • Pipelined control
  • Hazards
Write a Comment
User Comments (0)
About PowerShow.com