You are on page 1of 76

Chapter 11

Reduced Instruction Set


Computing

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Chapter Outline
• RISC Rationale
• Instruction Sets
• Instruction Pipelines
• Register Windows
• Instruction Pipeline Conflicts
• RISC vs. CISC
• Itanium Microprocessor

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Speeding Up Typical Code

• 100% of instructions @ 20 ns

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Speeding Up Typical Code

• 100% of instructions @ 20 ns
• 98% of instructions @ 18 ns and 2% of
instructions at 3 * 18 ns

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Speeding Up Typical Code

• 100% of instructions @ 20 ns
• 98% of instructions @ 18 ns and 2% of
instructions at 3 * 18 ns
• 100%(20c) P. 98%(18c) + 2% (54c)

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Speeding Up Typical Code

• 100% of instructions @ 20 ns
• 98% of instructions @ 18 ns and 2% of
instructions at 3 * 18 ns
• 100%(20c) P. 98%(18c) + 2% (54c)
• 20c vs. 17.64c + 1.08c

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Speeding Up Typical Code

• 100% of instructions @ 20 ns
• 98% of instructions @ 18 ns and 2% of
instructions at 3 * 18 ns
• 100%(20c) P. 98%(18c) + 2% (54c)
• 20c vs. 17.64c + 1.08c
• 20  18.72

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Characteristics

• Fixed-length instructions

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Characteristics

• Fixed-length instructions
• Limited loading and storing instructions

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Characteristics

• Fixed-length instructions
• Limited loading and storing instructions
• Fewer addressing modes

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Characteristics

• Fixed-length instructions
• Limited loading and storing instructions
• Fewer addressing modes
• Instruction pipeline

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Characteristics

• Fixed-length instructions
• Limited loading and storing instructions
• Fewer addressing modes
• Instruction pipeline
• Large number of registers

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Characteristics

• Hardwired control unit

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Characteristics

• Hardwired control unit


• Delayed loads and branches

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Characteristics

• Hardwired control unit


• Delayed loads and branches
• Speculative execution of instructions

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Characteristics

• Hardwired control unit


• Delayed loads and branches
• Speculative execution of instructions
• Optimizing compilers

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Characteristics

• Hardwired control unit


• Delayed loads and branches
• Speculative execution of instructions
• Optimizing compilers
• Separate instruction and data streams

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Instruction Sets

• Fewer instructions

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Instruction Sets

• Fewer instructions
• Executed in one clock cycle

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Instruction Sets

• Fewer instructions
• Executed in one clock cycle
• Orthogonal, but not too orthogonal
– A OR B = NOT((NOT A) AND (NOT B))
– A XOR B = (A AND (NOT B)) OR ((NOT A)
AND B)

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


MIPS 4000 Instruction Types

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


SPARC Instruction Formats

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Pipelines

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Pipelines

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Pipelines

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Pipelines

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Pipelines

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Pipelines

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Pipeline
Advantages
• Reduced hardware
• Reduced clock period
• Reduced complexity of memory
interface

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Pipeline Clock Rate
• Limited by slowest stage
• Speedup:

• Example:

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Register Windowing
• Global Registers
• Windowed Registers
• Window Data Register
• Window Pointer Register

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Register Windowing

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Register Windowing

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Register Windowing

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Register Windowing

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Register Renaming

• Arbitrary registers instead of fixed


windows
• More flexible, but harder to control

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Pipeline Conflicts

• Data conflicts
• Branch conflicts

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Data Conflicts

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Data Conflicts

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


No-op Insertion

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


No-op Insertion

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Reordering

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Reordering

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Reordering

• Not always possible

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Stall Insertion

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Stall Insertion

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Data Forwarding

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Data Forwarding

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Data Forwarding

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Branch Conflicts

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Branch Conflicts

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


No-op Insertion

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


No-op Insertion

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Reordering

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Reordering

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Conditional Branches

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


No-op Insertion

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Reordering

• Ignoring the data conflict:

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Reordering

• Ignoring the data conflict:

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Instruction Reordering

• Ignoring the data conflict:

• Not always possible to reorder


instructions - sometimes must resort to
no-op insertion
Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001
Annulling

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Annulling

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Branch Prediction

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Advantages

• Simpler control units

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Advantages

• Simpler control units


• Can run at higher clock frequencies

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Advantages

• Simpler control units


• Can run at higher clock frequencies
• More chip space for registers

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Advantages

• Simpler control units


• Can run at higher clock frequencies
• More chip space for registers
• Easier to incorporate parallelism

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


RISC Advantages

• Simpler control units


• Can run at higher clock frequencies
• More chip space for registers
• Easier to incorporate parallelism
• Simpler compilers

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


CISC Advantages
• Complexity doesn’t always increase
cost
• Can incorporate previous designs
• Backward compatibility

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Itanium Microprocessor

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Itanium Microprocessor
• IA-64 ISA
• Explicitly Parallel Instruction Computing
• Predication
• Speculative Execution

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Predication

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Predication

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Speculative Execution

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Speculative Execution

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001


Summary
• RISC Rationale
• Instruction Sets
• Instruction Pipelines
• Register Windows
• Instruction Pipeline Conflicts
• RISC vs. CISC
• Itanium Microprocessor

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

You might also like