Page 1
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 1/331
MODERN
PROCESSORDESIGN
Fundamentalsof SuperscalarProcessors
JOHN PAUL SHEN●
MIKKO H.LIPASTI
Page 2
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 2/331
Page 3
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 3/331
John Paul Shen
Jo hn P aul Shen is the Director of Intel's Microarchitecture
Research Lab (MRL), providing leadership to about two-
dozen highly skilled researchers located in Santa Clara, C A;
Hillsboro, OR; and Austin. TX. MRL is responsible for de-
veloping innovative microarchitecture techniques that can
I potentially be used in future microprocessor products from
Intel. MRL researchers collaborate closely with microarchi-
I tects from product teams in joint advanced-development
I efforts. MRL frequently hosts visiting faculty and Ph.D.
I interns and conducts joint research projects with academic
I research groups.
Prior to joining Intel in 2000, John was a professor in the
electrical and computer engineering department of Carnegie
Mellon University, where he headed up the CMU Microarchitecture Research Team
(CMuART). He has supervised a total of 16 Ph.D. students during his years at CMU.
Seven are currently with Intel, and five have faculty positions in academia. He won
multiple teaching awards at CMU. He was an NSF Presidential Young Investigator.
He is an IEEE Fellow and has served on the program committees of ISCA, MICRO,
HPCA, ASPLOS, PACT, ICCD, ITC, and FTCS.He has published over 100 research papers in diverse areas, including fault-
tolerant computing, built-in self-test, process defect and fault analysis, concurrent
error detection, application-specific processors, performance evaluation, compila-
tion for instruction-level parallelism, value locality and prediction, analytical mod-
eling of superscalar processors, systematic microarchitecture test generation, per-
formance simulator validation, precomputation-based prefetching, database workload
analysis, and user-level helper threads.
John received his M.S. and Ph.D. degrees from the University of Southern
California, and his B.S. degree from the University of Michigan, all in electrical
engineering. He attended Kimball High School in Royal Oak, Michigan. He is
happily married and has three daughters. His family enjoys camping, road trips, and
reading The Lord of the Rings.
(continued on back inside cover)
Modern Processor
Fundamentals of Sup
John Paul Shen Intel Corporation
Mikko H. LipastiUniversity of Wisconsin
Tata McGraw-Hill PublishinN E W D E L H I
McGraw-Hill Offices
New Delhi New York St Lou is Sa n Fra
Kua la Lumpur L isbon Lond on Madr id
S an Juan San t iago S in gapor e Sy dn e
Page 4
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 4/331
Our parents:
Paul and Sue Shen
Tarja and Simo Lipasti
Our spouses:
Amy C. Shen
Erica Ann Lipasti
Our children:Priscilla S. Shen, Rachael S. Shen, and Valentia C. Shen
Emma Kristiina Lipasti and Elias Joel Lipasti
Tata McGraw-Hiil
MODERN PROCESSOR DESIGN: FUNDAMENTALS OF
SUPERSCALAR PROCESSORS
Copyright © 2005 by The McGraw-Hill Companies, Inc.,
All rights reserved. No part of this publication may be reproduced or distributed
in any form or by any means, or stored in a data base or retrieval system, without theprior written consent of The McGraw-Hill Companies, Inc., including, but notlimited to, in any network or other electronic storage or transmission, or broadcast
for distance learning
Some ancillaries, including electronic and print components, may not be available
to customers outside the United States
Tata McGraw-Hill Edition
RZXQCRBIRQQDD
Reprinted in India by arrangement with The McGraw-Hill Companies, Inc.,
New York
Sales territories: India, Pakistan, Nepal, Bangladesh, Sri Lanka and Bhutan
ISBN 0-07-059033-8
Published by Tata McGraw-Hill Publishing Company Limited,
7 West Patel Nagar, New Delhi 110 008, and printed at
Shivam Printers, Delhi 110 032
The McGraw-Hill Companies
Table of Content
Table of Contents
Additional Resources
Preface
1 Processor Design
1.1 The Evolut ion of Mic
1.2 Instructio n Set Proces
1.2.1 Digital System
1.2.2 Architecture, I
Realization
1.2.3 Instruction Set
1.2.4 Dynamic-Stati
1.3 Principle s of Processo
1.3.1 Processor Perf
1.3.2 Processor Perf
1.3.3 Performance E
1.4 Instructio n-Level Par
1.4.1 From Scalar to
1.4.2 Limits of Instr1.4.3 Machines for I
1.5 Summary
2 Pipelined Processors
2.1 Pipelining Fundamen
2.1.1 Pipelined Desi
2.1.2 Arithmetic Pip
2.1.3 Pipelining Ide
2.1.4 Instruction Pip
2.2 Pipelined Processor D
2.2.1 Balancing Pip
2.2.2 Unifying Instr
2.2.3 Minimizing Pi
2.2.4 Commercial P
2.3 Deeply Pipelined Pro
2.4 Summary
3 Memory and I/O Systems
3.1 Introduction
3.2 Comp uter System Ov
3.3 Key Concept s: Latenc
Page 5
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 5/331
Page 6
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 6/331
Page 7
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 7/331
Page 8
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 8/331
Page 9
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 9/331
Page 10
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 10/331
Page 11
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 11/331
Page 12
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 12/331
Page 13
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 13/331
Page 14
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 14/331
Page 15
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 15/331
Page 16
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 16/331
Page 17
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 17/331
Page 18
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 18/331
Page 19
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 19/331
Page 20
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 20/331
Page 21
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 21/331
Page 22
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 22/331
Page 23
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 23/331
Page 24
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 24/331
Page 25
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 25/331
Page 26
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 26/331
Page 27
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 27/331
Page 28
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 28/331
Page 29
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 29/331
Page 30
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 30/331
Page 31
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 31/331
Page 32
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 32/331
Page 33
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 33/331
Page 34
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 34/331
Page 35
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 35/331
Page 36
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 36/331
Page 37
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 37/331
Page 38
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 38/331
Page 39
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 39/331
Page 40
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 40/331
Page 41
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 41/331
Page 42
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 42/331
Page 43
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 43/331
Page 44
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 44/331
Page 45
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 45/331
Page 46
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 46/331
Page 47
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 47/331
Page 48
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 48/331
Page 49
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 49/331
Page 50
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 50/331
Page 51
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 51/331
Page 52
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 52/331
Page 53
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 53/331
Page 54
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 54/331
Page 55
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 55/331
Page 56
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 56/331
Page 57
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 57/331
Page 58
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 58/331
Page 59
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 59/331
Page 60
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 60/331
Page 61
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 61/331
2 M O D E R N P R O C E S S O R D E S I G N
Instruction
fyp«
Old Mix,
%
New Mix,
Latency Old CPI Cycles % fait ructions Cycles NewCPf
_oa d 25.0 2 0.50 50 0
Store I S O 1 " T " ' 0 1 5 150
Ar ithme ti c 30.0 T 0.30 30 0
Logical 10.0 1 0.10 100
Branch-T 8.0 3 0.24 240
Branch-NT 6.0 2 0.12 120
Jump 5.0 2 0.10 100
Jump register 1.0 3 6.03 30
Total 160.6"" 154" " ' 1540
P2.16 In a TYP-based pipeline design with a data cache, load instructions
check the tag array for a cache hit in parallel with accessing the data
array to read the corresponding memory location. Pipelining stores
to such a cache is more difficult, since the processor must check
the tag first, before it overwrites the data array. Otherwi se, in the
case of a cache miss, the wrong memory location may be overwrittenby the store. Design a solution to this problem that does not require
sending the store down the pipe twice, or stalling the pipe for every
store instruction, or dual-porting the data cache. Referring to
Figure 2.15, are there any new RAW, WAR, and/or WAW memory
hazards?
P2.17 The MIPS pipeline shown in Table 2.7 employs a two-phase clocking
scheme that makes efficient use of a shared TLB, since instruction fetch
accesses the TLB in phase one and data fetch accesses in phase two.
However, when resolving a conditional branch, both the branch target
address and the branch fall-through address need to be translated during
phase one—in parallel with the branch condition check in phase one of
the ALU stage—to enable instruction fetch from either the target or the
fall-through during phase two. This seems to imply a dual-ported TLB.
Suggest an architected solution to this problem that avoids dual-portingthe TLB.
Problems 18 through 24: InstructionPipeline DesignThis problem explores pipeline design. As discussed eadier, pipelining involves
balancing the pipe stages. Good pipeline implementations minimize both internal
and external fragmentation to create sim
lined implementation of a simple micro
tions, with no data hazards:
Ok
1Instr
ca
(6
Page 62
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 62/331
Page 63
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 63/331
Page 64
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 64/331
Page 65
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 65/331
Page 66
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 66/331
Page 67
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 67/331
Page 68
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 68/331
Page 69
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 69/331
Page 70
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 70/331
Page 71
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 71/331
Page 72
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 72/331
Page 73
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 73/331
Page 74
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 74/331
Page 75
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 75/331
Page 76
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 76/331
Page 77
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 77/331
Page 78
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 78/331
Page 79
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 79/331
Page 80
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 80/331
Page 81
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 81/331
Page 82
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 82/331
Page 83
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 83/331
Page 84
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 84/331
Page 85
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 85/331
Page 86
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 86/331
Page 87
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 87/331
Page 88
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 88/331
Page 89
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 89/331
Page 90
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 90/331
Page 91
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 91/331
Page 92
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 92/331
Page 93
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 93/331
Page 94
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 94/331
Page 95
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 95/331
Page 96
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 96/331
Page 97
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 97/331
Page 98
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 98/331
Page 99
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 99/331
Page 100
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 100/331
Page 101
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 101/331
18 2 MODERN PROCESSOR DESIGN
(a) No parallelism (b) Temporal parallelism
(c) Spatial parallelism
1 1
"1
(d) Parallel pipeline
Figure 4.2Machine Parallelism: (a) No Parallelism (Nonpipelined); (b) Temporal
Parallelism (Pipelined); (c) Spatial Parallelism (Multiple Units);
(d) Combi ne d Tempor al and Spatial Parallelism
Intel [Intel Corp., 1993]. The Pentium microprocessor is a superscalar machine
implementing a parallel pipeline of width s = 2. It essentially implements two i486:
pipelines; see Figure 4.4. Multiple instructions can be fetched and decoded by the
first two stages of the parallel pipeline in every machine cycle. In each cycle,
potentially two instructions can be issued into the t w o execution pipelines, i.e., the
U pipe and the V pipe. The goal is to maximize the number of dual-issue cycles.
The superscalar Pentium micropro cessor can achieve a peak execution rate of two
instructions per machine cycle.
As compared to the scalar pipeline of i486, the Pentium parallel pipeline
requires significant additional hardware resources. First, the five pipeline stages
IF
ID
RD
ALU
MEM
WB
1T
;
1
i — *
1 i1
TFigure 4.3
A Parallel Pipe line of Wi
U pDI
D2
EX
(a)
IF
D2
EX
Dl
Upipe
Figure 4.4
(a) The Five- Stage i48 6 Scalar P
(b) The Five-Stage Pentium Par
o f W i d t h i = 2 .
Page 102
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 102/331
Page 103
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 103/331
Page 104
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 104/331
Page 105
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 105/331
Page 106
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 106/331
Page 107
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 107/331
Page 108
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 108/331
Page 109
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 109/331
Page 110
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 110/331
Page 111
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 111/331
Page 112
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 112/331
Page 113
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 113/331
Page 114
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 114/331
Page 115
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 115/331
Page 116
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 116/331
Page 117
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 117/331
21 4 MODERN PROCESSOR DESIGN
decoder simply inserts the add/multiply instruction pair into the execution
window. Identify and discuss at least two reasons why this approach
could reduce performance as measured in instructions per cycle.
P4.1 8 Does the ALU mix for the Motorola 88110 processor shown in Figure 4.7
agree with the IBM instruction mix provided in Section 2.2.4.3? If not,
how would you change the ALU mix?
Terms and BuzzwordsThese problems are similar to the "Jeopardy Game" on TV. The "answers" are
given and you are to provide the best correct "questions." For each "answer" there
may be more than one appropriate "question"; you need to provide the best one.
P4.19 A: A m echanism that tracks out-of-order execution and maintains specu-
lative machine state.
Q: What is.
P4.20 A: It will significantly reduce the machine cycle time, but can increase
the branch penalty.
Q: What is.
P4.21 A: Additional I-cache bits generated at cache refill time to ease the
decoding/dispatching task.
Q: What are ?
P4.22 A: A program attribute that causes inefficiencies in a superscalar fetch
unit.
Q: What is ?
P4.23 A: The internal RISC-like instruction executed by the Pentium Pro (P6)
microarchitecture.
Q: What is ?
P4.24 A: The logical pipeline stage that assigns an instruction to the appropri-
ate execution unit.
Q: What is ?
P4.25 A: An early processor design that incorporated 10 diverse functional
units.Q: Wha t is ?
P4.26 A: A new instruction that allows a scalar pipeline to achieve more than
one floating-point operation per cycle.
Q: What is ?
P4.27 A: An effective technique for all
to be performed per cycle.
Q: Wha t is
P4.28 A: A useful architectura l prope
low-level operating system code
Q: What is
P4.29 A: The first research paper to
of one instruction set to another
Q: What was
P4.30 A: The first real processor to im
of one instruction set to another
Q: What was
P4.31 A: This attribute of most RISC
the task of decoding multiple in
Q: What was
Page 118
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 118/331
Superscalar Techniq
CHAPTER OUTLINE
5.1
5.2
5.3
5.4
Instruction Flow Techniques
Register Data Flow Techniques
Memory Data Flow Techniques
Summary
References
Hornework Problems*
In Chapter 4 we focused on the structural, or
scalar pipeline and dealt with issues that were so
types of instructions being processed. In thi
dynamic behavior of a superscalar processor
with specific types of instructions. The ultimat
pipeline is to achieve max imum throughput of in
to view instruction processing as involving thr
and/or data, namely, instruction flow, regist
This partitioning into three flow paths is simi
1991 textbook entitled Superscalar Microproce
overall performance objective is to maximize th
paths. Of course, what makes this task interest
not independent and their interactions are quiand presents superscalar microarchitecture tec
with the three flow paths.
The three flow paths correspond roughly t
types of instructions, namely, branch, ALU,
quently, maximizing the throughput of the th
minimizing of the branch, ALU, and load pena
Page 119
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 119/331
Page 120
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 120/331
220 M O D E R N P R O C E S S O R D E S I G N
Issue
-- Branch
Execute
Finish
Fetch
Decode
IDispatch
iComplete
Decode buffer
Dispatch buffer
i L X D L X a L X D C x a| Reservationstations
J Completion buffer
Store buffer
Retire
Figure 5.2
Disruption of Sequential Control Flow by Branch Instructions.
slots as in the scalar pipeline, but the number of empty instruction slots must be
multiplied by the width of the machine. For example, for a four-wide machine thetotal penalty is 12 instruction "bubbles" in the superscalar pipeline. Also recall
from Chapter 1, tha t such pipeline stall cycles effectively corr espond to the
sequential bottleneck of Amdahl's law and rapidly and significantly reduce the
actual performance from the potential peak performance.
For conditional branches, the actual number of stalled or penalty cycles can be
dictated by either target address generation or condition resolution. Figure 5.3 illus-
trates the potential cycles that can be incurred by target address generation. The
Register
indirectwith
offset
Register
Indirect
Fe
PC-
relative
Issue
Branch
Execute
Finish
De
XDis
I
I
Figure 5.3
Branch Target Address Generation Penalties.
Com
T
Re
actual number of penalty cycles is deter
branch instructions. For the PC-relative ad
can be generated during the fetch stage, r
register indirect addressing mode is used,
decode stage to access the register. In this
register indirect with an offset addressing m
access and a total three-cycle penalty can
the penalty due to target address generatio
branch condition resolution latency must a
Page 121
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 121/331
Page 122
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 122/331
Page 123
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 123/331
Page 124
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 124/331
Page 125
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 125/331
Page 126
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 126/331
Page 127
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 127/331
Page 128
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 128/331
Page 129
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 129/331
Page 130
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 130/331
Page 131
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 131/331
Page 132
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 132/331
Page 133
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 133/331
Page 134
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 134/331
Page 135
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 135/331
Page 136
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 136/331
Page 137
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 137/331
Page 138
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 138/331
Page 139
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 139/331
Page 140
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 140/331
Page 141
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 141/331
Page 142
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 142/331
Page 143
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 143/331
Page 144
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 144/331
Page 145
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 145/331
Page 146
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 146/331
Page 147
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 147/331
Page 148
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 148/331
Page 149
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 149/331
Page 150
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 150/331
Page 151
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 151/331
Page 152
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 152/331
Page 153
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 153/331
286 MODERN PROCESSOR DESIGN
P5.14 The figure shows the control flow graph of a simple program. The
CFG is annotated with three different execution trace paths. For each
execution trace, circle which branch predictor (bimodal, local, or gse-
lect) will best predict the branching behavior of the given trace. More
b§5
C o ? ) Circle one:
p ^ Bimodal
Local
Gselect
than one predictor may perform
However, you are to use each
choosing the best predictors fo
for each of the three traces and
many times and every node in
branch history register for the l
limited to 4 bits.)
Problems 5.15 and 5.16: CombinGiven a combining branch predictor with
branch direction predictor, a gshare predic
entries, and a two-entry selector table, simu
branches as shown in the rows.of the table
made by the predictor before the branch is
predictor entries after the branch resolves.
Branch address
Bimodal
Selector
Use the following assumptions:
• Instructions are a fixed 4 bytes long
branch address should be shifted out
the next lowest-order bit to index int
• Each predictor and selector entry
counter with the initial states shown.
• A taken branch (T) incremen ts the p
decrements the predictor entry.
• A predictor entry less than 2 (0 or 1)
• A predictor entry greater than or equ
prediction.
Page 154
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 154/331
Page 155
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 155/331
Page 156
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 156/331
S92 MODERN PROCESSOR DESIGN
Load/store unit
Example:
Dispatch cycle Instr uction
1 Load A
1 LoadB
1 Store C
Retire cycle
LoadRS
Store RS
t bAddress 1
unit I
Store buffer
Cache address Cache write data
Load Store
Reservation Reservation
Cycle Station Station
1 Ld A l_d B S t C
2 Ld B
3
4
5
6
Cache
Cache WriteStore Buffer Address Data
St C Ld A
S t C Ld B
S t C
S t C
St C data
Load/store unit
Code:
Dispatch cycle
1
2
3
4
4
4
5
Instruction
Store A
LoadB
Load A
Store D
Load E
Load A
LoadD
Retire cycle
6
10
LoadRS
Addressunit
Store RS
Addressunit
TStore buffer
3 — R: FCache address Cache write data
Load Store
Reservation Reser
Cycle Station Statio
i
2
3
4
5
6
7
8
9
10
11
12
13
14
15
P5.24 In one or two sentences comp
load bypassing.
P5.2S Woul d load forwarding improve
from Problem 5.23? Why or wh
Problems 5.26 through 5.28The goal of lockup-free cache designs is to
parallelism in the processor by overlapping
cessing or other cache misses. For this p
workload running on a processor with a p
16-byte memory bus. Assume that f miss
is 5
block is 1 cycle. Hence, for a simple blockin
'transfer = 5 + 4 x 1 = 9 cycles. Here is the wo
f o r ( i = l ; i < 1 0 0 0 0 ; + + i )
a += A [ i ] + B [ i ] ;
In RISC assembly language, assuming r3 po
l i r 2 , 9 9 9 9 # l o a d
l o o p : l f d u r 5 , 8 ( r 3 ) # l o a d
l f d u r 6 , 8 ( r 4 ) # l o a d
Page 157
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 157/331
294 MODERN PROCESSOR DESIGN
a d d r 7 , r 7 , r 5 # a d d A [ i ] t o a
a d d r 7 , r 7 , r 6 # a d d B [ i ] t o a
b d n z r 2 , l o o p # d e c r e m e n t r 2 , b r a n c h i f n o t z e r o
Here is a timing diagram for the loop body assuming neither array hits in the cache
and the cache is a simple blocking design (m = miss latency, t = transfer latency,
A = load from A, B = load from B, a = add, and b = branch):
Cycl«
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 8 7 8 9 0 1 2 3 4 S 6 7 8 9
Array A m m m m m t t t t
ArrayB m m m m m t t t t
A B a a b A B a a b A ~ T ~
For Problems 5.26 through 5.28 assume that each instruction takes a single
cycle to execute and that all subsequent instructions are stalled on a cache miss
until the requested data are returned by the cache (as shown in the timing dia-
gram). Furthermore, assume that no portion of either array (A or B) is in the cache
initially, but must be fetched on demand misses. Also, assume there are enough
loop iterations to fill all the table entries provided.
P5.26 Assume a blocking cache design with critical word forwarding (i.e., the
requested word is forwarded as soon as it has been transferred), but
support for only a single outstanding miss. Fill in the timing diagram
and explain your work.
Cycta
0 1 2 3 4 5 6 7 8 9 0 1 2
Array A m m m m m
ArrayB
Execution A
* 2 *
3 4 5 6 7 6 9 0 1 2 3 4 5 6 7 « #
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 S 9 0 1 2 3 4 5 6 7 8 9
Array A
Array B
Execution
P5.27 Now fill in the timing diagram
multiple outstanding misses, an
0 1 2 3 4 5 0 7 8 9
Array A m m m m m
ArrayB
Execution A
- ! " S ~ ^ * 0 1 2 3 4 5 6 > 8
Array A
Array B
Execution
P5.28 Instead of a 64-byte cache line
and fill in the timing diagram a
0 1 2 3 4 5 6 7 8 9
Array A m m m m m
Array B
Execution A
0 1 2 3 4 5 6 7 S 9
Array A
ArrayB
Execution
Problems 5.29 through 5.30The goal of prefetching and nonblocking
of concurrency or parallelism in the proc
with other processing or other cache mi
simple workload from Problem 5.26 run
with 16-byte lines and an 4-byte memor
Page 158
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 158/331
Page 159
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 159/331
Page 160
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 160/331
J
Trung A. Diep
The PowerPC 620
CHAPTER OUTLINE <p
6.1 INTRCKJUCTIORI
6.2 Experimental Framework
63 Instruction Fetching
6.4 Instruction Dispatching
65 Instruction Execution
6.6 Instruction Completion
6.7 Conclusions and Observations
6. 8 Bricigingtothel^
6.9 Summary •
References
Homework Problems
The Po werPC family of microprocessors inc
processor. The 620 was the first 64-bit super
order execution, aggressive branch predicti
stations, dynamic renaming for all register fi
completion buffer to ensure precise exceptio
previously implemented in a single-chip mic
is of great interest to both academic researchchapter presents an instruction-level, or mac
tion of the 620 microarchitecture using a V
of the 6 20 (VMW is the Visualization-base
Carnegie Mellon University) [Levitan et al., 1
We also describe the IBM POWER3 an
how they differ from the predecessor Power
Page 161
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 161/331
Page 162
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 162/331
Page 163
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 163/331
Page 164
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 164/331
Page 165
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 165/331
Page 166
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 166/331
Page 167
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 167/331
Page 168
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 168/331
Page 169
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 169/331
Page 170
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 170/331
Page 171
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 171/331
Page 172
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 172/331
Page 173
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 173/331
Page 174
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 174/331
Robert P.
Dave B. Papworth
Glenn J. Hinton
Mike A. Fetterman
An dy F. Glew
Intel's P6 Microarc
CHAPTER OUTLINE
7.1 Introduction
7.2 Pipelining
7.3 The In-Order Front End
7.4 The Out-of-Order Core
7.5 Retirement
7.6 Memory Subsystem
7.7 Summary
7.8 Acknowledgments
References
Homework Problems
In 1990, Intel began development of a n
microarchitecture core known as the P6. Intr
and Steck, 1995], it was named the Pentium
lar in workstation and server systems. A des
Pentium II processor, was launched in May
tions to the basic P6 engine. Th e P6-based Pe
which included MMX and SSE instructions.
P6 and to the products by their respective pr
The P6 microarchitecture is a 32-bit
performance, superpipelined dynamic executi
uses out-of-order and speculative execution
execution core. P6 includes nonblocking cac
bus. This chapter describes the various com
combine to deliver exbaordinary performance
Page 175
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 175/331
Page 176
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 176/331
Page 177
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 177/331
Page 178
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 178/331
Page 179
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 179/331
Page 180
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 180/331
Page 181
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 181/331
Page 182
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 182/331
Page 183
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 183/331
Page 184
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 184/331
Page 185
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 185/331
Page 186
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 186/331
Page 187
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 187/331
Page 188
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 188/331
Page 189
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 189/331
Page 190
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 190/331
Page 191
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 191/331
Page 192
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 192/331
Page 193
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 193/331
Page 194
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 194/331
Mark Smotherman
Survey of Supersca
CHAPTER OUTLINE
ftl * Development of Superscalar Proc
82 A Classification of Recent Design
8.3 PrccessctfCJescrjptiortt
8.4 Verification of Superscalar Proces
8.5 Ad(novv4edgrnents
References
Homework Problems
The 1990s was the decade in which sup
However, the idea of decoding and issuing
single instruction stream dates back 25 years
the history of superscalar design and examin
8.1 Development of SuperscalarThis section reviews the history of supersc
Stretch and its direct superscalar descend
(ACS), and follows developments up throug
8.1.1 Early Advances in Uniprocessor P
The first efforts at what we now call super
IBM machine directly descended from the I
gressive implementation techniques (such as
speculative execution, branch misprediction
because it was a precursor to the IBM ACS in
Page 195
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 195/331
Page 196
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 196/331
Page 197
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 197/331
Page 198
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 198/331
Page 199
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 199/331
Page 200
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 200/331
Page 201
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 201/331
Page 202
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 202/331
Page 203
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 203/331
Page 204
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 204/331
Page 205
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 205/331
Page 206
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 206/331
Page 207
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 207/331
Page 208
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 208/331
Page 209
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 209/331
Page 210
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 210/331
Page 211
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 211/331
Page 212
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 212/331
Page 213
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 213/331
Page 214
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 214/331
Page 215
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 215/331
Page 216
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 216/331
Page 217
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 217/331
Page 218
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 218/331
Page 219
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 219/331
Page 220
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 220/331
Page 221
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 221/331
Page 222
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 222/331
Page 223
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 223/331
Page 224
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 224/331
Page 225
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 225/331
Page 226
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 226/331
Page 227
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 227/331
Page 228
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 228/331
Page 229
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 229/331
Page 230
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 230/331
Page 231
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 231/331
Page 232
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 232/331
Page 233
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 233/331
Page 234
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 234/331
Page 235
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 235/331
Page 236
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 236/331
Gabriel H. Loh
Advanced InstructFlow Techniques
CHAPTER OUTLINE
9.1 Introduction
9.2 Static Branch Prediction Techn
9.3 Dynamic Branch Prediction Te
9.4 Hybrid Branch Predictors
9.5 Other Instruction Flow Issues a
9.6 Summary
References
Homework Problems
9.1 IntroductionIn Chapter 5, it was stated that the instruc
provides an upper bound on the throughpu
conditional branches in programs are a se
instruction flow and, hence, the perform
tional branch is resolved in a pipelined pro
should follow the branch. To increase theparallel, modern processors make a bran
the instructions in the predicted path of pr
covered later on to have been mispredicte
of the processor to the point before the
resumed along the correct path.
The penalty associated with mispredi
cessors has a great impact on performanc
Page 237
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 237/331
Page 238
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 238/331
Page 239
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 239/331
Page 240
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 240/331
Page 241
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 241/331
Page 242
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 242/331
Page 243
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 243/331
Page 244
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 244/331
Page 245
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 245/331
Page 246
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 246/331
Page 247
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 247/331
Page 248
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 248/331
Page 249
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 249/331
Page 250
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 250/331
Page 251
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 251/331
Page 252
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 252/331
Page 253
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 253/331
Page 254
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 254/331
Page 255
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 255/331
Page 256
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 256/331
Page 257
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 257/331
Page 258
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 258/331
Page 259
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 259/331
Page 260
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 260/331
Page 261
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 261/331
Page 262
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 262/331
Page 263
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 263/331
Page 264
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 264/331
Page 265
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 265/331
Page 266
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 266/331
Page 267
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 267/331
Page 268
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 268/331
Page 269
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 269/331
Page 270
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 270/331
Page 271
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 271/331
Page 272
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 272/331
Page 273
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 273/331
Page 274
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 274/331
Page 275
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 275/331
Page 276
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 276/331
Page 277
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 277/331
Page 278
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 278/331
Page 279
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 279/331
Page 280
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 280/331
Page 281
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 281/331
Page 282
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 282/331
Page 283
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 283/331
Page 284
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 284/331
Page 285
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 285/331
Page 286
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 286/331
Page 287
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 287/331
Page 288
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 288/331
Page 289
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 289/331
Page 290
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 290/331
Page 291
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 291/331
Page 292
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 292/331
Page 293
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 293/331
Page 294
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 294/331
Page 295
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 295/331
Page 296
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 296/331
Page 297
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 297/331
Page 298
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 298/331
Page 299
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 299/331
Page 300
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 300/331
Page 301
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 301/331
Page 302
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 302/331
Page 303
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 303/331
Page 304
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 304/331
Page 305
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 305/331
Page 306
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 306/331
Page 307
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 307/331
Page 308
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 308/331
Page 309
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 309/331
Page 310
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 310/331
Page 311
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 311/331
Page 312
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 312/331
Page 313
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 313/331
Page 314
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 314/331
Page 315
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 315/331
Page 316
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 316/331
Page 317
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 317/331
Page 318
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 318/331
Page 319
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 319/331
Page 320
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 320/331
Page 321
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 321/331
Page 322
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 322/331
Page 323
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 323/331
Page 324
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 324/331
Page 325
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 325/331
Page 326
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 326/331
Page 327
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 327/331
Page 328
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 328/331
Page 329
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 329/331
Page 330
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 330/331
Page 331
7/18/2019 Modern Processor Design Fundamentals of Superscalar Processors 130225191042 Phpapp02
http://slidepdf.com/reader/full/modern-processor-design-fundamentals-of-superscalar-processors-130225191042 331/331