Professional Documents
Culture Documents
DigitalLogic ComputerOrganization L17 PipelinedProcessorP1 Handout
DigitalLogic ComputerOrganization L17 PipelinedProcessorP1 Handout
COMPUTER ORGANIZATION
Lecture 17: Pipelined Microprocessor (P1)
ELEC3010
ACKNOWLEGEMENT
2
COVERED IN THIS COURSE
❑ Binary numbers and logic gates
❑ Boolean algebra and combinational logic
❑ Sequential logic and state machines
❑ Binary arithmetic
Digital logic
❑ Memories
Memory Memory
Address Address
X+3 X+3
X+2 X+2
X+1 12 X+1 34
X 34 X 12
6
INSTRUCTION SET ARCHITECTURE (ISA)
7
STEPS IN INSTRUCTION EXECUTION
8
MOTIVATION EXAMPLE
https://www.youtube.com/watch?v=DfGs2Y5WJ14
9
PIPELINING: OVERLAPPED INSTRUCTIONS
10
CAN YOU DO IT?
Assumptions: IF: 4ns; ID:3ns; EX: 6 ns; MEM:4 ns; WB: 3ns
What is the maximum clock frequency at which the processor can run?
How many clock cycles are needed to process one instruction?
How many instructions per second can the processor process?
11
CAN YOU DO IT?
❑Multi-cycle processor without pipelining
Assumptions: IF: 4ns; ID:3ns; EX: 6 ns; MEM:4 ns; WB: 3ns
What is the maximum clock frequency at which the processor can run?
How many clock cycles are needed to process one instruction?
How many instructions per second can the processor process?
12
CAN YOU DO IT?
❑Multi-cycle processor with pipelining
Assumptions: IF: 4ns; ID:3ns; EX: 6 ns; MEM:4 ns; WB: 3ns
What is the maximum clock frequency at which the processor can run?
How many clock cycles are needed to process one instruction?
How many instructions per second can the processor process?
13
PIPELINING: PERFORMANCE
14
PIPELINING: BASIC IDEA
Registers
15
PIPELINED MICROPROCESSOR
16
INSTRUCTION FETCH STAGE (IF)
17
INSTRUCTION DECODE STAGE (ID)
18
EXECUTE STAGE (EX)
19
MEMORY STAGE (MEM)
20
WRITEBACK STAGE (WB)
21
WRITEBACK STAGE (WB)
22
ABSTRACT REPRESENTATION OF
PIPELINED PROCESSOR
23
EXAMPLE INSTRUCTION SEQUENCE
24
EXAMPLE INSTRUCTION SEQUENCE
25
EXAMPLE INSTRUCTION SEQUENCE
26
EXAMPLE INSTRUCTION SEQUENCE
27
EXAMPLE INSTRUCTION SEQUENCE
28
EXAMPLE INSTRUCTION SEQUENCE
29
EXAMPLE INSTRUCTION SEQUENCE
30
EXAMPLE INSTRUCTION SEQUENCE
31
EXAMPLE INSTRUCTION SEQUENCE
32
WHAT ABOUT THIS SEQUENCE?
33
DATA HAZARD
❑ Occurs when a register is read before the write back of a value to
that register
35
SOLUTION 2: HW STALLS THE PIPELINE
36
EXAMPLE: DATA HAZARDS
❑ Identify all data hazards in the following instruction
sequences by circling each source register that is read
before the updated value is written back
37
BEFORE NEXT CLASS
• Textbook: 7.5.3-7.5.5
• Next time:
More Pipelined Microprocessor
38