Lecture 4: RISC Computers

Similar documents
Lecture 4: RISC Computers

Lecture 8: RISC & Parallel Computers. Parallel computers

REDUCED INSTRUCTION SET COMPUTERS (RISC)

Chapter 13 Reduced Instruction Set Computers

RISC Principles. Introduction

RISC & Superscalar. COMP 212 Computer Organization & Architecture. COMP 212 Fall Lecture 12. Instruction Pipeline no hazard.

William Stallings Computer Organization and Architecture. Chapter 12 Reduced Instruction Set Computers

Lecture 5: Instruction Pipelining. Pipeline hazards. Sequential execution of an N-stage task: N Task 2

ECE 486/586. Computer Architecture. Lecture # 7

ARSITEKTUR SISTEM KOMPUTER. Wayan Suparta, PhD 17 April 2018

Chapter 2: Instructions How we talk to the computer

Lecture 4: Instruction Set Design/Pipelining

Instruction-set Design Issues: what is the ML instruction format(s) ML instruction Opcode Dest. Operand Source Operand 1...

EKT 303 WEEK Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Instruction-set Design Issues: what is the ML instruction format(s) ML instruction Opcode Dest. Operand Source Operand 1...

From CISC to RISC. CISC Creates the Anti CISC Revolution. RISC "Philosophy" CISC Limitations

Major Advances (continued)

instruction set computer or RISC.

Lecture 4: Instruction Set Architecture

55:132/22C:160, HPCA Spring 2011

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

Evolution of ISAs. Instruction set architectures have changed over computer generations with changes in the

Pipelining, Branch Prediction, Trends

COMPUTER ORGANIZATION & ARCHITECTURE

Instruction Set Principles and Examples. Appendix B

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture

Computer Systems Laboratory Sungkyunkwan University

Lecture 3 Machine Language. Instructions: Instruction Execution cycle. Speaking computer before voice recognition interfaces

Supplement for MIPS (Section 4.14 of the textbook)

Instruction Set Principles. (Appendix B)

Microprocessor Architecture Dr. Charles Kim Howard University

Processor Architecture. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Computer Architecture

CS 5803 Introduction to High Performance Computer Architecture: RISC vs. CISC. A.R. Hurson 323 Computer Science Building, Missouri S&T

Instruction Set Architectures. Part 1

Control unit. Input/output devices provide a means for us to make use of a computer system. Computer System. Computer.

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture

Review of instruction set architectures

Real instruction set architectures. Part 2: a representative sample

Processor Architecture

Topics in computer architecture

CS 61C: Great Ideas in Computer Architecture Intro to Assembly Language, MIPS Intro

Lecture 2: Memory Systems

COMP3221: Microprocessors and. and Embedded Systems. Instruction Set Architecture (ISA) What makes an ISA? #1: Memory Models. What makes an ISA?

COMPUTER ORGANIZATION & ARCHITECTURE

RISC Architecture Ch 12

Lecture 4: ISA Tradeoffs (Continued) and Single-Cycle Microarchitectures

Computer Architecture

Chapter 2. Instructions:

Reduced Instruction Set Computers

Math 230 Assembly Programming (AKA Computer Organization) Spring MIPS Intro

COS 140: Foundations of Computer Science

ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2)

ECE 486/586. Computer Architecture. Lecture # 8

Overview of the MIPS Architecture: Part I. CS 161: Lecture 0 1/24/17

Lecture Topics. Branch Condition Options. Branch Conditions ECE 486/586. Computer Architecture. Lecture # 8. Instruction Set Principles.

Instruction Set Architecture. "Speaking with the computer"

CISC / RISC. Complex / Reduced Instruction Set Computers

CISC Attributes. E.g. Pentium is considered a modern CISC processor

CSEE 3827: Fundamentals of Computer Systems

COMPUTER STRUCTURE AND ORGANIZATION

Outline. What Makes a Good ISA? Programmability. Implementability

ECE232: Hardware Organization and Design

Computer Organization CS 206 T Lec# 2: Instruction Sets

Overview. EE 4504 Computer Organization. Much of the computer s architecture / organization is hidden from a HLL programmer

CS4617 Computer Architecture

Instruction Set Architecture (ISA)

Lecture Topics. Announcements. Today: The MIPS ISA (P&H ) Next: continued. Milestone #1 (due 1/26) Milestone #2 (due 2/2)

Chapter 5:: Target Machine Architecture (cont.)

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands

Overview. EE 4504 Computer Organization. This section. Items to be discussed. Section 9 RISC Architectures. Reading: Text, Chapter 12

Reduced Instruction Set Computer

Advanced Computer Architecture

CSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements

Modern Processors. RISC Architectures

MICROPROCESSOR TECHNOLOGY

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA)

Chapter 2 Logic Gates and Introduction to Computer Architecture

Chapter 2. Instruction Set Principles and Examples. In-Cheol Park Dept. of EE, KAIST

More advanced CPUs. August 4, Howard Huang 1

Computer Architecture and Data Manipulation. Von Neumann Architecture

Overview of Computer Organization. Chapter 1 S. Dandamudi

I ve been getting this a lot lately So, what are you teaching this term? Computer Organization. Do you mean, like keeping your computer in place?

Reminder: tutorials start next week!

Chapter 3 MIPS Assembly Language. Ó1998 Morgan Kaufmann Publishers 1

Overview of Computer Organization. Outline

Instruction Sets Ch 9-10

General Purpose Processors

CPE/EE 421 Microcomputers

Instruction Sets Ch 9-10

Chapter 2. Instruction Set Design. Computer Architectures. software. hardware. Which is easier to change/design??? Tien-Fu Chen

MARIE: An Introduction to a Simple Computer

Latches. IT 3123 Hardware and Software Concepts. Registers. The Little Man has Registers. Data Registers. Program Counter

Outline. What Makes a Good ISA? Programmability. Implementability. Programmability Easy to express programs efficiently?

Multicycle Approach. Designing MIPS Processor

Systems Architecture I

1 5. Addressing Modes COMP2611 Fall 2015 Instruction: Language of the Computer

Advanced processor designs

Von Neumann architecture. The first computers used a single fixed program (like a numeric calculator).

Instruction Set II. COMP 212 Computer Organization & Architecture. COMP 212 Fall Lecture 7. Instruction Set. Quiz. What is an Instruction Set?

Transcription:

Lecture 4: RISC Computers Introduction Program execution features RISC characteristics RISC vs. CICS Zebo Peng, IDA, LiTH 1 Introduction Reduced Instruction Set Computer (RISC) represents an important innovation in computer architecture. It is an attempt to produce more CPU power by simplifying the instruction set of the CPU. The opposed trend to RISC is that of Complex Instruction Set Computer (CISC). Both RISC and CISC architectures have been developed as an attempt to cover the semantic gap, and consequently to reduce the ever growing software costs. Zebo Peng, IDA, LiTH 2 1

The Semantic Gap In order to improve efficiency of software development, new and powerful high-level programming languages have been developed (e.g., Ada, C++, Java), which provide high level of abstraction. This evolution has increased the semantic gap between programming languages and machine languages. Increasing abstraction High-Level Language (HLL) Machine Language Growing Semantic Gap Zebo Peng, IDA, LiTH 3 Main features of CISC A large number of instructions (> 200) and complex instructions and data types. Many and complex addressing modes. Direct hardware implementations of high-level language statements. 0 e.g. CASE (switch) on VAX Microprogramming techniques are used so that complicated instructions can be implemented. Memory bottleneck is a major problem, due to complex addressing modes and multiple memory accesses per instruction. Zebo Peng, IDA, LiTH 4 2

Arguments for CISC A rich instruction set should simplify the compiler by having instructions which match the high-level language instructions. 0 This works fine if the number of HL languages is very small. Since the programs are smaller in size, they have better performance: 0 They take up less memory space and need fewer instruction fetch cycles. 0 Fewer number of instructions are executed, which may lead to smaller execution time. Program execution efficiency is also improved by implementing complex operations in microcode rather than machine code. Zebo Peng, IDA, LiTH 5 Problems with CISC A large instruction set requires complex and potentially time consuming hardware steps to decode and execute the instructions. Complex machine instructions may not match high-level language statements exactly, in which case they may be of little use. 0 This will be a major problem if the number of languages is getting bigger. Instruction sets designed with specialized instructions for several high-level languages will not be efficient when executing program of a given language. Complex design tasks. Zebo Peng, IDA, LiTH 6 3

Lecture 4: RISC Computers Introduction Program execution features RISC characteristics RISC vs. CICS Zebo Peng, IDA, LiTH 7 Evaluation of Program Execution What are programs doing most of the time? We need to determine the execution characteristics of machine instruction sequences generated from HLL programs. Aspects of interest: 0 The frequency of operations performed. 0 The types of operands and their frequency of use. 0 Control flow frequency: branches, loops, subprogram calls. Zebo Peng, IDA, LiTH 8 4

Evaluation Results Frequency of machine instructions executed: 0 moves: 33% 0 conditional branches: 20% 0 arithmetic/logic operations: 16% 0 others: between 0.1% and 10% Addressing modes: 0 the majority of instructions uses simple addressing modes. 0 complex addressing modes (memory indirect, indexed+indirect, etc.) are only used by ~18% of the instructions. Zebo Peng, IDA, LiTH 9 Operand types Evaluation Results (Cont d) 0 74-80% of the operands are scalars (integers, reals, characters, etc.). 0 the rest (20-26%) are arrays/structures; 90% of them are global variables. 0 about 80% of the scalars are local variables. The majority of operands are local variables of scalar type, which can be stored in registers. Zebo Peng, IDA, LiTH 10 5

Procedure Calls Studies has also been done on the percentage of the total execution time spent executing different high-level language (HLL) statements. Most of the time is spent executing CALLs and RETURNs in HLL programs. Even if only 15% of the executed HLL statements is a CALL or RETURN, they are executed most of the time, because of their complexity. A CALL or RETURN is compiled into a relatively long sequence of machine instructions with a lot of memory references. Zebo Peng, IDA, LiTH 11 Evaluation Conclusions An overwhelming dominance of simple (ALU and move) operations over complex operations. Dominance of simple addressing modes. Large frequency of operand accesses; on average each instruction references 1.9 operands. Most of the referenced operands are scalars (can be stored in registers) and are local variables or parameters. Optimizing the procedure CALL/RETURN mechanism promises large benefits in speed. => A RISC machine will deliver better performance! Zebo Peng, IDA, LiTH 12 6

Lecture 4: RISC Computers Introduction Program execution features RISC characteristics RISC vs. CICS Zebo Peng, IDA, LiTH 13 Main Characteristics of RISC A small number of simple instructions (desirably < 100). 0 Simple and small decode and execution hardware are required. 0 A hard-wired controller is needed, rather than using microprogramming. 0 The CPU takes less silicon area to implement, and runs also faster. Execution of one instruction per clock cycle. The instruction pipeline performs more efficiently due to simple instructions and similar execution patterns. Complex operations are executed as a sequence of simple instructions. In the case of CISC they are executed as one single or a few complex instruction. Zebo Peng, IDA, LiTH 14 7

Main Characteristics of RISC (Cont d) An illustrative example with the following assumption: A program with 80% of executed instructions being simple and 20% complex. CISC: simple instructions take 4 cycles, complex instructions take 8 cycles; cycle time is 100 ns. RISC: simple instructions are executed in one cycle; complex operations are implemented as a sequence of instructions (14 instructions on average); cycle time is 75 ns. How much time takes a program of 1 000 000 instructions? CISC: (10 6 *0.80*4 + 10 6 *0.20*8)*10-7 = 0.48 s RISC: (10 6 *0.80*1 + 10 6 *0.20*14)*0.75*10-7 = 0.27 s Zebo Peng, IDA, LiTH 15 Main Characteristics of RISC (Cont d) Load-and-store architecture 0 Only LOAD and STORE instructions reference data in memory. 0 All other instructions operate only with registers (are register-toregister instructions). Only a few simple addressing modes are used. 0 Ex. register, direct, register indirect, displacement. Instructions are of fixed length and uniform format. 0 Loading and decoding of instructions are simple and fast; it is not needed to wait until the length of an instruction is known in order to start decoding it; 0 Decoding is simplified because the opcode and address fields are located in the same position for all instructions. Zebo Peng, IDA, LiTH 16 8

Main Characteristics of RISC (Cont d) A large number of registers is available. 0 Variables and intermediate results can be stored in registers and do not require repeated loads and stores from/to memory. 0 All local variables of procedures and the passed parameters can be stored in registers. 0 The large number of registers is typical for RISC, because the reduced complexity of the processor means that we have silicon space on the processor chip to implement them. This is usually not the case with CISC machines. Zebo Peng, IDA, LiTH 17 Register Windows A large number of registers is usually very useful. If contents of all registers must be saved at every procedure call, however, more registers mean longer delay. A solution to this problem is to divide the register file into a set of fixed-size windows. 0 Each window is assigned to a procedure. 0 Windows for adjacent procedures are overlapped to allow parameter passing. Zebo Peng, IDA, LiTH 18 9

Main Advantages of RISC Best support is given by optimizing most used and most time consuming architecture aspects. 0 Frequently executed instructions. 0 Memory reference. 0 Procedure call/return. 0 Pipeline design. Less design complexity, reducing design cost, and reducing the time between designing and marketing. Zebo Peng, IDA, LiTH 19 Criticism of RISC An operation might need two, three, or more instructions to accomplish. 0 More memory access might be needed. 0 Execution speed may be reduced in certain applications. It usually leads to longer programs, which needs larger memory space to store. Difficult to program machine codes and assembly programs. 0 More time consuming. Zebo Peng, IDA, LiTH 20 10

Lecture 4: RISC Computers Introduction Program execution features RISC characteristics RISC vs. CICS Zebo Peng, IDA, LiTH 21 RISC vs. SISC A lot of performance comparisons have shown that benchmark programs run often faster on RISC processors than on CISC machines. However, it is difficult to identify which RISC feature really produces the higher performance. Some "CISC fans" argue that the higher speed is not produced by the typical RISC features but because of technology, better compilers, etc. An argument in favor of the CISC: the simpler RISC instruction set results in a larger memory requirement compared with the CISC case. Most recent processors are not typical RISC or CISC, but combine advantages of both approaches. 0 e.g. PowerPC and Pentium II. Zebo Peng, IDA, LiTH 22 11

CISC/RISC Examples Characteristics CISC Machines RISC Machines Processor IBM370 VAX i486 SPARC MIPS Year developed 1973 1978 1989 1987 1991 No. of instructions 208 303 235 69 94 Inst. size (bytes) 2-6 2-57 1-12 4 4 Addressing modes 4 22 11 1 1 No. of G.P. registers 16 16 8 40-520 32 Cont. M. size (Kbits) 420 480 246 - - Zebo Peng, IDA, LiTH 23 A CISC Example Intel i486 32-bit integer processor 0 Registers 8 general 6 address (16-bits) 2 status/control 1 instruction-pointer (PC) 0 On-chip floating-point unit 0 Microprogrammed control Instruction set: 0 Number of instructions: 235 E.g., FYL2XP1 x y performs y log 2 (x+1) in 313 clock cycles. 0 Instruction size: 1-12 bytes (3.2 on average). 0 Addressing modes: 11 Zebo Peng, IDA, LiTH 24 12

A CISC Example Intel i486 (Cont d) Memory organization: 0 Address length: 32 bits (4 GB space) 0 Memory is segmented for protection purpose 0 Support virtual memory by paging 0 Cache-memory: 8 KB internal (on-chip) (96% hit rate for DOS applications) Instruction execution: 0 Execution models: reg-reg, reg-mem, mem-mem 0 Five-stage instruction pipeline: Fetch, Decode1, Decode2, Execute, Write-Back. Zebo Peng, IDA, LiTH 25 A RISC Example SPARC Scalable Processor Architecture: 32-bit processor with the following components: 0 An Integer Unit (IU) to execute all instructions. 0 A Floating-Point Unit (FPU) a co-processor which can work concurrently with the IU and is used to perform arithmetic operations on floating point numbers. has 69 basic instructions. has a linear, 32-bit virtual-address space (4G). has 40 to 520 general purpose 32-bit registers which are grouped into 2 to 32 overlapping register windows (16/group + 8) => Scalability. Zebo Peng, IDA, LiTH 26 13

Summary Both RISCs and CISCs try to reduce the semantic gap, with different approaches. 0 CISCs follow the traditional way of implementing more and more complex instructions. 0 RISCs try to simplify the instruction set, while improving the instruction execution performance. Innovations in RISC architectures are based on a close analysis of typical programs. The main features of RISC architectures are: reduced number of simple instructions, few addressing modes, load-store architecture, instructions with fixed length and format, and a large number of registers. One of the main concerns of RISC designers was to maximize the efficiency of pipelining. Most modern architectures often include both RISC and CISC features. Zebo Peng, IDA, LiTH 27 14