William Stallings
Computer Organization
and Architecture
8th Edition
Chapter 13
Reduced Instruction Set Computers
Major Advances in Computers(1)
• The family concept
—IBM System/360 1964
—DEC PDP-8
—Separates architecture from implementation
• Microporgrammed control unit
—Idea by Wilkes 1951
—Produced by IBM S/360 1964
• Cache memory
—IBM S/360 model 85 1969
Major Advances in Computers(2)
• Solid State RAM
—(See memory notes)
• Microprocessors
—Intel 4004 1971
• Pipelining
—Introduces parallelism into fetch execute cycle
• Multiple processors
The Next Step - RISC
• Reduced Instruction Set Computer
• Key features
—Large number of general purpose registers
—or use of compiler technology to optimize
register use
—Limited and simple instruction set
—Emphasis on optimising the instruction
pipeline
Comparison of processors
Driving force for CISC
• Software costs far exceed hardware costs
• Increasingly complex high level languages
• Semantic gap
• Leads to:
—Large instruction sets
—More addressing modes
—Hardware implementations of HLL statements
– e.g. CASE (switch) on VAX
Intention of CISC
• Ease compiler writing
• Improve execution efficiency
—Complex operations in microcode
• Support more complex HLLs
Execution Characteristics
• Operations performed
• Operands used
• Execution sequencing
• Studies have been done based on
programs written in HLLs
• Dynamic studies are measured during the
execution of the program
Operations
• Assignments
—Movement of data
• Conditional statements (IF, LOOP)
—Sequence control
• Procedure call-return is very time
consuming
• Some HLL instruction lead to many
machine code operations
Weighted Relative Dynamic Frequency of HLL
Operations [PATT82a]
Dynamic Occurrence
Machine-Instruction
Weighted
Memory-Reference
Weighted
Pascal C Pascal C Pascal C
ASSIGN 45% 38% 13% 13% 14% 15%
LOOP 5% 3% 42% 32% 33% 26%
CALL 15% 12% 31% 33% 44% 45%
IF 29% 43% 11% 21% 7% 13%
GOTO — 3% — — — —
OTHER 6% 1% 3% 1% 2% 1%
Operands
• Mainly local scalar variables
• Optimisation should concentrate on
accessing local variables
Pascal C Average
Integer Constant 16% 23% 20%
Scalar Variable 58% 53% 55%
Array/Structure 26% 24% 25%
Procedure Calls
• Very time consuming
• Depends on number of parameters passed
• Depends on level of nesting
• Most programs do not do a lot of calls
followed by lots of returns
• Most variables are local
• (c.f. locality of reference)
Implications
• Best support is given by optimising most
used and most time consuming features
• Large number of registers
—Operand referencing
• Careful design of pipelines
—Branch prediction etc.
• Simplified (reduced) instruction set
Large Register File
• Software solution
—Require compiler to allocate registers
—Allocate based on most used variables in a
given time
—Requires sophisticated program analysis
• Hardware solution
—Have more registers
—Thus more variables will be in registers
Registers for Local Variables
• Store local scalar variables in registers
• Reduces memory access
• Every procedure (function) call changes
locality
• Parameters must be passed
• Results must be returned
• Variables from calling programs must be
restored
Register Windows
• Only few parameters
• Limited range of depth of call
• Use multiple small sets of registers
• Calls switch to a different set of registers
• Returns switch back to a previously used
set of registers
Register Windows cont.
• Three areas within a register set
—Parameter registers
—Local registers
—Temporary registers
—Temporary registers from one set overlap
parameter registers from the next
—This allows parameter passing without moving
data
Overlapping Register Windows
Circular Buffer diagram
Operation of Circular Buffer
• When a call is made, a current window
pointer is moved to show the currently
active register window
• If all windows are in use, an interrupt is
generated and the oldest window (the one
furthest back in the call nesting) is saved
to memory
• A saved window pointer indicates where
the next saved windows should restore to
Global Variables
• Allocated by the compiler to memory
—Inefficient for frequently accessed variables
• Have a set of registers for global variables
Registers v Cache
Large Register File Cache
All local scalars Recently-used local scalars
Individual variables Blocks of memory
Compiler-assigned global variables Recently-used global variables
Save/Restore based on procedure nesting depth Save/Restore based on cache replacement
algorithm
Register addressing Memory addressing
Referencing a Scalar -
Window Based Register File
Referencing a Scalar - Cache
Compiler Based Register Optimization
• Assume small number of registers (16-32)
• Optimizing use is up to compiler
• HLL programs have no explicit references
to registers
—usually - think about C - register int
• Assign symbolic or virtual register to each
candidate variable
• Map (unlimited) symbolic registers to real
registers
• Symbolic registers that do not overlap can
share real registers
• If you run out of real registers some
variables use memory
Graph Coloring
• Given a graph of nodes and edges
• Assign a color to each node
• Adjacent nodes have different colors
• Use minimum number of colors
• Nodes are symbolic registers
• Two registers that are live in the same
program fragment are joined by an edge
• Try to color the graph with n colors, where
n is the number of real registers
• Nodes that can not be colored are placed
in memory
Graph Coloring Approach
Why CISC (1)?
• Compiler simplification?
—Disputed…
—Complex machine instructions harder to
exploit
—Optimization more difficult
• Smaller programs?
—Program takes up less memory but…
—Memory is now cheap
—May not occupy less bits, just look shorter in
symbolic form
– More instructions require longer op-codes
– Register references require fewer bits
Why CISC (2)?
• Faster programs?
—Bias towards use of simpler instructions
—More complex control unit
—Microprogram control store larger
—thus simple instructions take longer to execute
• It is far from clear that CISC is the
appropriate solution
RISC Characteristics
• One instruction per cycle
• Register to register operations
• Few, simple addressing modes
• Few, simple instruction formats
• Hardwired design (no microcode)
• Fixed instruction format
• More compile time/effort
RISC v CISC
• Not clear cut
• Many designs borrow from both
philosophies
• e.g. PowerPC and Pentium II
RISC Pipelining
• Most instructions are register to register
• Two phases of execution
—I: Instruction fetch
—E: Execute
– ALU operation with register input and output
• For load and store
—I: Instruction fetch
—E: Execute
– Calculate memory address
—D: Memory
– Register to memory or memory to register operation
Effects of Pipelining
Optimization of Pipelining
• Delayed branch
—Does not take effect until after execution of following
instruction
—This following instruction is the delay slot
• Delayed Load
—Register to be target is locked by processor
—Continue execution of instruction stream until register
required
—Idle until load complete
—Re-arranging instructions can allow useful work whilst
loading
• Loop Unrolling
—Replicate body of loop a number of times
—Iterate loop fewer times
—Reduces loop overhead
—Increases instruction parallelism
—Improved register, data cache or TLB locality
Loop Unrolling Twice
Example
do i=2, n-1
a[i] = a[i] + a[i-1] * a[i+l]
end do
Becomes
do i=2, n-2, 2
a[i] = a[i] + a[i-1] * a[i+i]
a[i+l] = a[i+l] + a[i] * a[i+2]
end do
if (mod(n-2,2) = i) then
a[n-1] = a[n-1] + a[n-2] * a[n]
end if
Normal and Delayed Branch
Address Normal Branch Delayed Branch Optimized
Delayed Branch
100 LOAD X, rA LOAD X, rA LOAD X, rA
101 ADD 1, rA ADD 1, rA JUMP 105
102 JUMP 105 JUMP 106 ADD 1, rA
103 ADD rA, rB NOOP ADD rA, rB
104 SUB rC, rB ADD rA, rB SUB rC, rB
105 STORE rA, Z SUB rC, rB STORE rA, Z
106 STORE rA, Z
Use of Delayed
Branch
Controversy
• Quantitative
—compare program sizes and execution speeds
• Qualitative
—examine issues of high level language support
and use of VLSI real estate
• Problems
—No pair of RISC and CISC that are directly
comparable
—No definitive set of test programs
—Difficult to separate hardware effects from
complier effects
—Most comparisons done on “toy” rather than
production machines
—Most commercial devices are a mixture
Required Reading
• Stallings chapter 13
• Manufacturer web sites

More Related Content

PPT
11 instruction sets addressing modes
PPT
13 risc
PPT
PPT
12 processor structure and function
PPT
Top schools in gudgao
PPT
Top schools in gudgao
PPT
10 instruction sets characteristics
PPTX
System design techniques and networks
11 instruction sets addressing modes
13 risc
12 processor structure and function
Top schools in gudgao
Top schools in gudgao
10 instruction sets characteristics
System design techniques and networks

What's hot (19)

PPT
Top schools in noida
PPT
08 operating system support
PPT
15 ia64
PPTX
Embedded computing platform design
PPT
18 parallel processing
PPT
14 superscalar
PPT
07 input output
PPT
08 operating system support
PPTX
Introduction to embedded computing and arm processors
PDF
Ch8 main memory
PPT
05 internal memory
PPT
07 input output
PPT
16 control unit
PPTX
A joint effort of the storage industry
PPT
12 processor structure and function
PPT
chap 18 multicore computers
PPTX
Memory management1
PPTX
Dealing with exceptions Computer Architecture part 2
Top schools in noida
08 operating system support
15 ia64
Embedded computing platform design
18 parallel processing
14 superscalar
07 input output
08 operating system support
Introduction to embedded computing and arm processors
Ch8 main memory
05 internal memory
07 input output
16 control unit
A joint effort of the storage industry
12 processor structure and function
chap 18 multicore computers
Memory management1
Dealing with exceptions Computer Architecture part 2
Ad

Similar to 13 risc (20)

PPT
Reduced instruction set computers
PPTX
2024_lecture13_come321.pptx.........................
PDF
M&m comparison for elcetrical engineering
PPT
IT209 Cpu Structure Report
PPT
OpenPOWER Webinar
PDF
Motivation for multithreaded architectures
PPT
Advanced computer architecture lesson 5 and 6
PDF
This is Unit 1 of High Performance Computing For SRM students
PPTX
UNIT 3 - General Purpose Processors
PPTX
2024_lecture12_come321.pptx..................
PPTX
embedded design and systemChapter-0.pptx
PPTX
RISC Vs CISC Computer architecture and design
PPTX
Advanced processor principles
PPT
Basics of micro controllers for biginners
PPT
Performance Tuning by Dijesh P
PPT
12 processor structure and function
PPT
Performance Enhancement with Pipelining
PPT
08 operating system support
PPT
08 operating system support
PPTX
Parallel Processors (SIMD)
Reduced instruction set computers
2024_lecture13_come321.pptx.........................
M&m comparison for elcetrical engineering
IT209 Cpu Structure Report
OpenPOWER Webinar
Motivation for multithreaded architectures
Advanced computer architecture lesson 5 and 6
This is Unit 1 of High Performance Computing For SRM students
UNIT 3 - General Purpose Processors
2024_lecture12_come321.pptx..................
embedded design and systemChapter-0.pptx
RISC Vs CISC Computer architecture and design
Advanced processor principles
Basics of micro controllers for biginners
Performance Tuning by Dijesh P
12 processor structure and function
Performance Enhancement with Pipelining
08 operating system support
08 operating system support
Parallel Processors (SIMD)
Ad

More from Anwal Mirza (20)

DOCX
Training & development
PPT
Training and dev
PPT
Testing and selection
PPT
Strategic planning
PPT
Recruitment
PPT
Job analysis
PPT
Interviewing
PPT
Hrm ppt ch. 01
PPT
Hrm challenges
PDF
Firstpage
DOCX
Hci scanrio-exercise
PPT
Hci user interface-design principals
PPT
Hci user interface-design principals lec 7
PPTX
Hci user centered design 11
PPTX
Hci lec 5,6
PPT
Hci lec 4
PPTX
Hci lec 1 & 2
PPTX
Hci interace affects the user lec 8
PPTX
Hci evaluationa frame work lec 14
PPTX
Hci design collaboration lec 9 10
Training & development
Training and dev
Testing and selection
Strategic planning
Recruitment
Job analysis
Interviewing
Hrm ppt ch. 01
Hrm challenges
Firstpage
Hci scanrio-exercise
Hci user interface-design principals
Hci user interface-design principals lec 7
Hci user centered design 11
Hci lec 5,6
Hci lec 4
Hci lec 1 & 2
Hci interace affects the user lec 8
Hci evaluationa frame work lec 14
Hci design collaboration lec 9 10

Recently uploaded (20)

PPTX
assetexplorer- product-overview - presentation
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
Time Tracking Features That Teams and Organizations Actually Need
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
AI Guide for Business Growth - Arna Softech
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PPTX
Tech Workshop Escape Room Tech Workshop
PDF
Microsoft Office 365 Crack Download Free
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
DNT Brochure 2025 – ISV Solutions @ D365
PDF
Website Design Services for Small Businesses.pdf
assetexplorer- product-overview - presentation
iTop VPN Crack Latest Version Full Key 2025
Time Tracking Features That Teams and Organizations Actually Need
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
AI Guide for Business Growth - Arna Softech
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Topaz Photo AI Crack New Download (Latest 2025)
Weekly report ppt - harsh dattuprasad patel.pptx
Monitoring Stack: Grafana, Loki & Promtail
Tech Workshop Escape Room Tech Workshop
Microsoft Office 365 Crack Download Free
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
Designing Intelligence for the Shop Floor.pdf
Advanced SystemCare Ultimate Crack + Portable (2025)
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
Salesforce Agentforce AI Implementation.pdf
DNT Brochure 2025 – ISV Solutions @ D365
Website Design Services for Small Businesses.pdf

13 risc

  • 1. William Stallings Computer Organization and Architecture 8th Edition Chapter 13 Reduced Instruction Set Computers
  • 2. Major Advances in Computers(1) • The family concept —IBM System/360 1964 —DEC PDP-8 —Separates architecture from implementation • Microporgrammed control unit —Idea by Wilkes 1951 —Produced by IBM S/360 1964 • Cache memory —IBM S/360 model 85 1969
  • 3. Major Advances in Computers(2) • Solid State RAM —(See memory notes) • Microprocessors —Intel 4004 1971 • Pipelining —Introduces parallelism into fetch execute cycle • Multiple processors
  • 4. The Next Step - RISC • Reduced Instruction Set Computer • Key features —Large number of general purpose registers —or use of compiler technology to optimize register use —Limited and simple instruction set —Emphasis on optimising the instruction pipeline
  • 6. Driving force for CISC • Software costs far exceed hardware costs • Increasingly complex high level languages • Semantic gap • Leads to: —Large instruction sets —More addressing modes —Hardware implementations of HLL statements – e.g. CASE (switch) on VAX
  • 7. Intention of CISC • Ease compiler writing • Improve execution efficiency —Complex operations in microcode • Support more complex HLLs
  • 8. Execution Characteristics • Operations performed • Operands used • Execution sequencing • Studies have been done based on programs written in HLLs • Dynamic studies are measured during the execution of the program
  • 9. Operations • Assignments —Movement of data • Conditional statements (IF, LOOP) —Sequence control • Procedure call-return is very time consuming • Some HLL instruction lead to many machine code operations
  • 10. Weighted Relative Dynamic Frequency of HLL Operations [PATT82a] Dynamic Occurrence Machine-Instruction Weighted Memory-Reference Weighted Pascal C Pascal C Pascal C ASSIGN 45% 38% 13% 13% 14% 15% LOOP 5% 3% 42% 32% 33% 26% CALL 15% 12% 31% 33% 44% 45% IF 29% 43% 11% 21% 7% 13% GOTO — 3% — — — — OTHER 6% 1% 3% 1% 2% 1%
  • 11. Operands • Mainly local scalar variables • Optimisation should concentrate on accessing local variables Pascal C Average Integer Constant 16% 23% 20% Scalar Variable 58% 53% 55% Array/Structure 26% 24% 25%
  • 12. Procedure Calls • Very time consuming • Depends on number of parameters passed • Depends on level of nesting • Most programs do not do a lot of calls followed by lots of returns • Most variables are local • (c.f. locality of reference)
  • 13. Implications • Best support is given by optimising most used and most time consuming features • Large number of registers —Operand referencing • Careful design of pipelines —Branch prediction etc. • Simplified (reduced) instruction set
  • 14. Large Register File • Software solution —Require compiler to allocate registers —Allocate based on most used variables in a given time —Requires sophisticated program analysis • Hardware solution —Have more registers —Thus more variables will be in registers
  • 15. Registers for Local Variables • Store local scalar variables in registers • Reduces memory access • Every procedure (function) call changes locality • Parameters must be passed • Results must be returned • Variables from calling programs must be restored
  • 16. Register Windows • Only few parameters • Limited range of depth of call • Use multiple small sets of registers • Calls switch to a different set of registers • Returns switch back to a previously used set of registers
  • 17. Register Windows cont. • Three areas within a register set —Parameter registers —Local registers —Temporary registers —Temporary registers from one set overlap parameter registers from the next —This allows parameter passing without moving data
  • 20. Operation of Circular Buffer • When a call is made, a current window pointer is moved to show the currently active register window • If all windows are in use, an interrupt is generated and the oldest window (the one furthest back in the call nesting) is saved to memory • A saved window pointer indicates where the next saved windows should restore to
  • 21. Global Variables • Allocated by the compiler to memory —Inefficient for frequently accessed variables • Have a set of registers for global variables
  • 22. Registers v Cache Large Register File Cache All local scalars Recently-used local scalars Individual variables Blocks of memory Compiler-assigned global variables Recently-used global variables Save/Restore based on procedure nesting depth Save/Restore based on cache replacement algorithm Register addressing Memory addressing
  • 23. Referencing a Scalar - Window Based Register File
  • 25. Compiler Based Register Optimization • Assume small number of registers (16-32) • Optimizing use is up to compiler • HLL programs have no explicit references to registers —usually - think about C - register int • Assign symbolic or virtual register to each candidate variable • Map (unlimited) symbolic registers to real registers • Symbolic registers that do not overlap can share real registers • If you run out of real registers some variables use memory
  • 26. Graph Coloring • Given a graph of nodes and edges • Assign a color to each node • Adjacent nodes have different colors • Use minimum number of colors • Nodes are symbolic registers • Two registers that are live in the same program fragment are joined by an edge • Try to color the graph with n colors, where n is the number of real registers • Nodes that can not be colored are placed in memory
  • 28. Why CISC (1)? • Compiler simplification? —Disputed… —Complex machine instructions harder to exploit —Optimization more difficult • Smaller programs? —Program takes up less memory but… —Memory is now cheap —May not occupy less bits, just look shorter in symbolic form – More instructions require longer op-codes – Register references require fewer bits
  • 29. Why CISC (2)? • Faster programs? —Bias towards use of simpler instructions —More complex control unit —Microprogram control store larger —thus simple instructions take longer to execute • It is far from clear that CISC is the appropriate solution
  • 30. RISC Characteristics • One instruction per cycle • Register to register operations • Few, simple addressing modes • Few, simple instruction formats • Hardwired design (no microcode) • Fixed instruction format • More compile time/effort
  • 31. RISC v CISC • Not clear cut • Many designs borrow from both philosophies • e.g. PowerPC and Pentium II
  • 32. RISC Pipelining • Most instructions are register to register • Two phases of execution —I: Instruction fetch —E: Execute – ALU operation with register input and output • For load and store —I: Instruction fetch —E: Execute – Calculate memory address —D: Memory – Register to memory or memory to register operation
  • 34. Optimization of Pipelining • Delayed branch —Does not take effect until after execution of following instruction —This following instruction is the delay slot • Delayed Load —Register to be target is locked by processor —Continue execution of instruction stream until register required —Idle until load complete —Re-arranging instructions can allow useful work whilst loading • Loop Unrolling —Replicate body of loop a number of times —Iterate loop fewer times —Reduces loop overhead —Increases instruction parallelism —Improved register, data cache or TLB locality
  • 35. Loop Unrolling Twice Example do i=2, n-1 a[i] = a[i] + a[i-1] * a[i+l] end do Becomes do i=2, n-2, 2 a[i] = a[i] + a[i-1] * a[i+i] a[i+l] = a[i+l] + a[i] * a[i+2] end do if (mod(n-2,2) = i) then a[n-1] = a[n-1] + a[n-2] * a[n] end if
  • 36. Normal and Delayed Branch Address Normal Branch Delayed Branch Optimized Delayed Branch 100 LOAD X, rA LOAD X, rA LOAD X, rA 101 ADD 1, rA ADD 1, rA JUMP 105 102 JUMP 105 JUMP 106 ADD 1, rA 103 ADD rA, rB NOOP ADD rA, rB 104 SUB rC, rB ADD rA, rB SUB rC, rB 105 STORE rA, Z SUB rC, rB STORE rA, Z 106 STORE rA, Z
  • 38. Controversy • Quantitative —compare program sizes and execution speeds • Qualitative —examine issues of high level language support and use of VLSI real estate • Problems —No pair of RISC and CISC that are directly comparable —No definitive set of test programs —Difficult to separate hardware effects from complier effects —Most comparisons done on “toy” rather than production machines —Most commercial devices are a mixture
  • 39. Required Reading • Stallings chapter 13 • Manufacturer web sites