chapter 13 reduced instruction set computers contents
play

Chapter 13 Reduced Instruction Set Computers Contents Instruction - PowerPoint PPT Presentation

Chapter 13 Reduced Instruction Set Computers Contents Instruction execution characteristics Use of a large register file Compiler-based register optimization Reduced instruction set architecture RISC pipelining MIPS


  1. Chapter 13 Reduced Instruction Set Computers

  2. Contents • Instruction execution characteristics • Use of a large register file • Compiler-based register optimization • Reduced instruction set architecture • RISC pipelining • MIPS R4000 • SPARC • RISC vs CISC controversy

  3. Major Advances in Computers • The family concept —IBM System/360 in 1964 —DEC PDP-8 —Separates architecture from implementation • Microprogrammed control unit —Idea by Wilkes in 1951 —Produced by IBM S/360 in 1964 —Each machine instruction is interpreted as a sequence of microinstructions • Cache memory —IBM S/360 model 85 in 1968

  4. Major Advances in Computers • Microprocessors —Intel 4004 in 1971 • Pipelining —Introduces parallelism into instruction execution • Multiple processors • RISC architecture —Large number of GPRs – Use of compiler technique to optimize register usage —Limited and simple instruction set —Emphasis on optimizing the instruction pipeline

  5. Comparison of processors

  6. 13.1 Execution Characteristics • Evolution of program execution —Problems with software development – High cost and unreliability —More powerful and complex languages are developed – Can express algorithms more concisely – Take care of the detail —Semantic gap problem – Difference between HLL operations and machine instructions – Execution inefficiency, excessive program size, and compiler complexity —Architecture to close this gap – Large instruction set, many addressing modes, and HLL statements implemented in hardware —Simple architecture : RISC

  7. Execution Characteristics • Aspects of instruction execution —Operations performed – Functions performed by CPU —Operands used – Operand characteristics determine memory organization and addressing modes —Execution sequencing – Determines control and pipeline organization

  8. Relative Dynamic Frequency of HLL Operations

  9. Analysis • Assignment statements predominate —Simple movement of data is highly important • Quite of conditional statements —Sequence control mechanism is important • Results do not reveal which statements use the most time in execution of a typical program —Which statement causes the execution of the most machine-language instructions?

  10. Weighted Relative Dynamic Frequency For the data in columns four and five, each value in the second and third columns is multiplied by the number of machine instructions produced by the compiler and then normalized. The sixth and seventh columns are obtained by multiplying the frequency of occurrence of each statement type by the relative number of memory references caused by each statement.

  11. Operands • Dynamic frequency of occurrence of classes of variables —Mainly local scalar variables – Optimization should concentrate on accessing local variables —One study shows that each instruction references 0.5 operand in memory and 1.4 registers – Fast operand accessing is important

  12. Procedure Calls Procedure Arguments and Local Scalar Variables

  13. Procedure Calls • Most time-consuming operations • Two important aspects —Number of parameters passed —Depth of nesting • Studies show —Number of words required per procedure is not large —Nesting is not that deep • Operand references are highly localized

  14. Implications • Conclusions of experiments —Instruction set architecture close to HLL is not the most effective design —We need to optimize performance of the most time consuming parts of programs • Characteristics of RISC architecture —Large number of registers – To optimize operand referencing —Careful design of pipelines – There are many conditional branch and call instructions —Simplified (reduced) instruction set

  15. 13.2 Use of Large Register File • Register size is limited, so —We need to keep most frequently accessed operands —We need to minimize register-memory operations • 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

  16. Register Windows • Organization of large set of registers —Most registers for local scalars – A few for global variables —Definition of local changes with each procedure call – Only a few parameters and local variables – Depth of nested call is relatively narrow – So multiple small set of registers can be used —Register window – Consists of 3 fixed-size areas + Parameter, local, and temporary registers —Circular buffer of register windows – Used in SPARC, and IA-64 – N-window register file can hold N-1 procedure activations – Berkeley RISC use 8 windows of 16 registers each

  17. Overlapping Register Windows

  18. Circular Buffer diagram

  19. 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

  20. Global Variables • Two options —Assign memory locations – There may be frequently accessed global variables —Assign a set of global registers – Fixed and available to all procedure

  21. Large Register File vs Cache

  22. Referencing a Scalar - Window Based Register File

  23. Referencing a Scalar - Cache

  24. 13.3 Compiler Based Register Optimizing • Case when only a small number of registers is available —Compiler is responsible for the optimized usage • Approach —Variable is assigned to a symbolic(virtual) register —Symbolic registers whose usage does not overlap can share the same real register —Which symbolic registers to which real registers? – Graph coloring can be used here – If two symbolic registers are live during the same program fragment, they are joined by an edge to depict interference – Try to color the graph with n colors, where n is the number of registers

  25. Graph Coloring Problem • Given a graph consists of nodes and edges, assign colors to nodes such that adjacent nodes have different colors and do this in such a way as to minimize the number of different colors • Konigsburg bridges problem —Introduced by Euler

  26. Graph Coloring Approach

  27. 13.4 RISC Architecture • Why CISC? —Richer instruction sets – Larger number and more complex instructions —Reasons – To simplify compilers – To improve performance —Can CISC simplify compilers? – If there are machine instructions that resemble HLL statements, task can be simplified – But complex instructions are hard to exploit – Optimizing the code is much more difficult with a complex instruction set

  28. RISC Architecture • Why CISC? —Is CISC program smaller? – Not quite – CISC program may have fewer instructions – But each instruction is longer + Longer opcodes and address fields —Is CISC program faster? – A complex HLL operation will execute more quickly as a single machine instruction rather than as a series of more primitive instructions + Use of complex instructions are quite limited – Control unit must be made more complex

  29. Code Size Relative to RISC I

  30. RISC Architecture • Characteristics of RISC —Common properties – One instruction per cycle – Register-to-register operations – Simple addressing modes – Simple instruction formats —One machine instruction per machine cycle – Machine instruction is directly executed by H/W —Register-to-register operations – Only LOAD/STORE instructions access memory – Instruction set and control unit can be simplified + RISC may have only one or two ADD instructions + VAX(CISC) has 25 different ADD instructions

  31. RISC Architecture —Simple addressing modes – Almost all instructions use simple register addressing —Simple instruction formats – Only a few formats are used – Instruction length is fixed and aligned on word boundaries

  32. Two Comparisons

  33. RISC Architecture • Benefits of RISC approach —Performance – More effective optimizing compilers can be developed – Most instructions are directly executed by H/W – Instruction pipelining can be applied more effectively – More responsive to interrupts —VLSI implementation – Single-chip processor – Devote chip area to those activities that occur frequently + Simple instructions and local scalars + RISC I devotes 6% of its area to control unit + Typical CISC devotes about 50% – Design-and-implementation time

  34. Design and Layout Effort MMU: Short for memory management unit, the hardware component that manages virtual � memory systems. Typically, the MMU is part of the CPU, though in some designs it is a � separate chip. The MMU includes a small amount of memory that holds a table matching � virtual addresses to physical addresses. This table is called the Translation Look-aside � Buffer (TLB). All requests for data are sent to the MMU, which determines whether the data � is in RAM or needs to be fetched from the mass storage device. If the data is not in memory, � the MMU issues a page fault interrupt.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend