27
Xuan ‘Silvia’ Zhang Washington University in St. Louis http:// classes.engineering.wustl.edu /ese566/ Lecture 11 Processor Microarchitecture (Part 2)

Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Xuan ‘Silvia’ Zhang Washington University in St. Louis

http://classes.engineering.wustl.edu/ese566/

Lecture 11 Processor Microarchitecture (Part 2)

Page 2: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Quiz: Adding a New Auto-Incrementing Load Instruction

2

Page 3: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Single-Cycle Processor Control Unit

3

Page 4: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Estimating Cycle Time—Longest Critical Path

4

Page 5: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Quiz: Adding a New Auto-Incrementing Load Instruction

5

Page 6: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

FSM Processor Control Unit

6

Page 7: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Hardwired FSM

7

Page 8: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Control Signal Output Table

8

Page 9: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Vertically Microcoded FSM

9

Page 10: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Vertically Microcoded FSM

•  Use memory array to encode control logic and state transition logic –  called control state –  more flexible than random logic

•  Enable a more systematic approach to implementing complex multi-cycle instructions

•  Microcoding can produce good performance –  if accessing the control store is much faster than

accessing main memory

•  Read-only control stores might be replaceable –  enable in-field updates

•  Read-write control stores can simplify diagnostics and microcode patches

10

Page 11: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Estimating Cycle Time

11

Page 12: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

12

Page 13: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

PARCv1 Pipelined Processor

13

Page 14: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

High-Level Idea for Pipelined Processors

14

Page 15: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

High-Level Idea for Pipelined Processors

•  Key pipeline traits –  multiple transactions operate simultaneously using

different resources –  pipelining does not help the transaction latency –  pipelining does help the transaction throughput –  potential speed up is proportional to the number of

pipelined stages –  potential speed up is limited by the slowest pipeline

stage –  potential speed up is reduced by time to fill the

pipeline

15

Page 16: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

High-Level Idea for Pipelined Processors

16

Page 17: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Pipelined Processor Datapath and Control Unit

•  Incrementally develop an unpipelined datapath •  Keep data flowing from left to right •  Position control signal table early in the diagram •  Divide datapath/control into stages by inserting

pipeline registers •  Keep the pipeline stages roughly balanced •  Forward arrows should avoid “skipping” pipeline

registers •  Backward arrows will need careful consideration

17

Page 18: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Pipelined Processor Datapath and Control Unit

18

Page 19: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Quiz: Adding a New Auto-Incrementing Load Instruction

19

Page 20: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Pipeline Hazards

•  RAW data hazards –  an instruction depends on a data value produced by an

earlier instruction

•  Control hazards –  whether or not an instruction should be executed

depends on a control decision made by an earlier one

•  Structural hazards –  an instruction in the pipeline needs a resource being

used by another instruction in the pipeline

•  WAW and WAR name hazards –  an instruction in the pipeline is writing a register that

an earlier instruction in the pipeline is either writing or reading

20

Page 21: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Proposed Solutions: Stalling and Squashing Instructions

•  Stalling –  an instruction originates a stall due to a hazard,

causing all instructions earlier in the pipeline to also stall. When the hazard is resolved, the instruction no longer needs to stall and the pipeline starts flowing again.

•  Squashing –  an instruction originates a squash due to a hazard, and

squashes all previous instructions in the pipeline (but not itself). We restart the pipeline to begin executing a new instruction sequence.

21

Page 22: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Control Logic with No Stalling and No Squashing

22

Page 23: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Control Logic with Stalling and No Squashing

23

Page 24: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Control Logic with Stalling and Squashing

24

Page 25: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Control Logic with Stalling and Squashing

25

Page 26: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Questions?

Comments?

Discussion?

26

Page 27: Lecture 11 Processor Microarchitecture (Part 2) · Hardwired FSM 7 . Control Signal Output Table 8 . Vertically Microcoded FSM 9 . Vertically Microcoded FSM • Use memory array to

Acknowledgement

Cornell University, ECE 4750

27