Lecture 4: Instruction Set Design/Pipelining

Slides:



Advertisements
Similar presentations
Instruction Set Design
Advertisements

Review of the MIPS Instruction Set Architecture. RISC Instruction Set Basics All operations on data apply to data in registers and typically change the.
Chapter 8: Central Processing Unit
Chapter 3 Instruction Set Architecture Advanced Computer Architecture COE 501.
CEG3420 Lec2.1 ©UCB Fall 1997 ISA Review CEG3420 Computer Design Lecture 2.
ISA Issues; Performance Considerations. Testing / System Verilog: ECE385.
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
Lecture 3: Instruction Set Principles Kai Bu
RISC / CISC Architecture By: Ramtin Raji Kermani Ramtin Raji Kermani Rayan Arasteh Rayan Arasteh An Introduction to Professor: Mr. Khayami Mr. Khayami.
10/9: Lecture Topics Starting a Program Exercise 3.2 from H+P Review of Assembly Language RISC vs. CISC.
ELEN 468 Advanced Logic Design
PART 4: (2/2) Central Processing Unit (CPU) Basics CHAPTER 13: REDUCED INSTRUCTION SET COMPUTERS (RISC) 1.
Chapter XI Reduced Instruction Set Computing (RISC) CS 147 Li-Chuan Fang.
Major Advances in Computers(1) The family concept —IBM System/ —DEC PDP-8 —Separates architecture from implementation Microporgrammed control unit.
Classifying Instruction Set Architectures
Unit -II CPU Organization By- Mr. S. S. Hire. CPU organization.
Chapter 13 Reduced Instruction Set Computers (RISC) CISC – Complex Instruction Set Computer RISC – Reduced Instruction Set Computer.
Reduced Instruction Set Computers (RISC)
Reduced Instruction Set Computers (RISC) Computer Organization and Architecture.
Processor Organization and Architecture
RISC and CISC. Dec. 2008/Dec. and RISC versus CISC The world of microprocessors and CPUs can be divided into two parts:
Computer Organization and Architecture Reduced Instruction Set Computers (RISC) Chapter 13.
CH13 Reduced Instruction Set Computers {Make hardware Simpler, but quicker} Key features  Large number of general purpose registers  Use of compiler.
Linked Lists in MIPS Let’s see how singly linked lists are implemented in MIPS on MP2, we have a special type of doubly linked list Each node consists.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
1 Appendix B Classifying Instruction Set Architecture Memory addressing mode Operations in the instruction set Control flow instructions Instruction format.
Classifying GPR Machines TypeNumber of Operands Memory Operands Examples Register- Register 30 SPARC, MIPS, etc. Register- Memory 21 Intel 80x86, Motorola.
Computer architecture Lecture 11: Reduced Instruction Set Computers Piotr Bilski.
RISC By Ryan Aldana. Agenda Brief Overview of RISC and CISC Features of RISC Instruction Pipeline Register Windowing and renaming Data Conflicts Branch.
RISC Architecture RISC vs CISC Sherwin Chan.
Chapter 8 CPU and Memory: Design, Implementation, and Enhancement The Architecture of Computer Hardware and Systems Software: An Information Technology.
Instruction Set Architecture The portion of the machine visible to the programmer Issues: Internal storage model Addressing modes Operations Operands Encoding.
RISC and CISC. What is CISC? CISC is an acronym for Complex Instruction Set Computer and are chips that are easy to program and which make efficient use.
Crosscutting Issues: The Rôle of Compilers Architects must be aware of current compiler technology Compiler Architecture.
ECEG-3202 Computer Architecture and Organization Chapter 7 Reduced Instruction Set Computers.
Reduced Instruction Set Computers. Major Advances in Computers(1) The family concept —IBM System/ —DEC PDP-8 —Separates architecture from implementation.
Lecture 04: Instruction Set Principles Kai Bu
ISA's, Compilers, and Assembly
1 Lecture 6: Assembly Programs Today’s topics:  Large constants  The compilation process  A full example  Intro to the MARS simulator.
RISC / CISC Architecture by Derek Ng. Overview CISC Architecture RISC Architecture  Pipelining RISC vs CISC.
CISC. What is it?  CISC - Complex Instruction Set Computer  CISC is a design philosophy that:  1) uses microcode instruction sets  2) uses larger.
LECTURE 19 Subroutines and Parameter Passing. ABSTRACTION Recall: Abstraction is the process by which we can hide larger or more complex code fragments.
Advanced Architectures
Lecture 6: Assembly Programs
Immediate Addressing Mode
A Closer Look at Instruction Set Architectures
ISA's, Compilers, and Assembly
Announcements MP 3 CS296 (Chase Geigle
ELEN 468 Advanced Logic Design
Advanced Topic: Alternative Architectures Chapter 9 Objectives
Overview Introduction General Register Organization Stack Organization
RISC Concepts, MIPS ISA Logic Design Tutorial 8.
A Closer Look at Instruction Set Architectures
An example of multiplying two numbers A = A * B;
Basics Of X86 Architecture
Computer Architecture
Lecture 4: MIPS Instruction Set
Central Processing Unit
Lecture 5: Pipelining Basics
The University of Adelaide, School of Computer Science
“C” and Assembly Language- What are they good for?
Classification of instructions
Chapter 2. Instruction Set Principles and Examples
Instruction Set Principles
Chapter 12 Pipelining and RISC
Evolution of ISA’s ISA’s have changed over computer “generations”.
COMP755 Advanced Operating Systems
Presentation transcript:

Lecture 4: Instruction Set Design/Pipelining Instruction set design (Sections 2.9-2.12) control instructions instruction encoding Basic pipelining implementation (Section A.1)

Control Transfer Instructions Conditional branches (75% - Int) (82% - FP) Jumps (6% - Int) (10% - FP) Procedure calls/returns (19% - Int) (8% - FP) Design issues: How do you specify the target address? How do you specify the condition? What happens on a procedure call/return?

Specifying the Target Address PC-Relative: needs fewer bits to encode, independent of how/where the compiled code is linked, used for branches and jumps – typically, the displacement needs 4-8 bits Register-indirect jumps: the address is not known at compile-time and has to be computed at run-time (note: can use any other addressing mode too) procedure returns case statements virtual functions function pointers dynamically shared libraries

Specifying the Condition Name Examples How condition is tested Advantages Disadvantages Condition Code (CC) 80x86, ARM, PowerPC, SPARC Tests special bits set by ALU ops Sometimes condition is set for free CC is extra state. Instructions cannot be re-ordered Condition Register Alpha, MIPS Comparison sets register and this is tested Simple Register pressure Compare and branch PA-RISC, VAX Comparison is part of the branch One instruction instead of two Complex pipelines

Procedure Call/Returns Need to maintain a stack of return addresses (in memory or in hardware) Can copy and save all registers together or this can be done selectively Who is responsible for saving registers? Caller saving: correctness issues (global register has to be made available to other procedures), it only saves values that it cares about Callee saving: it saves only as many registers as it needs (provided it doesn’t call other procedures) A combination of both is typically employed

Instruction Set Encoding Operations are easy to encode efficiently – the key issues are the number of operands and their addressing modes Few addressing modes  low complexity in decoding and pipelining, but greater code size Fixed instruction lengths  low complexity in decoding, but greater code size

Instruction Lengths

Dealing with Code Size in RISC Some hybrid versions allow for 16 and 32-bit instructions (40% reduction in code size) – useful for embedded apps IBM PowerPC stores 32-bit instructions in compressed form in memory – more hardware complexity on an I-cache miss (need to translate from uncompressed to compressed in addition to virtual to physical) Reducing the register file size can also reduce the instruction length

Compiler Optimizations The phase-ordering problem…early phases have to assume that register allocation will find a register, else, optimizations such as common subexpression elimination may increase memory traffic

Register Allocation Issues Graph coloring: determine when variables are live and avoid allocating the same register to variables that are simultaneously live Stack variables (typically local to a procedure): easy to allocate registers for Global data: can be accessed from multiple places (aliasing), difficult to allocate to registers Heap data: dynamically created objects, accessed with pointers, difficult to allocate to registers because of aliasing

Case Study: The MIPS ISA Load-store architecture Focus on pipelining, decoding, and compiler efficiency In other words, RISC

Registers 32 GPRs (general-purpose/integer registers) and 32 FPRs 64-bit registers; two single-precision FP values can fit in one register Register R0 is hardwired to zero – with displacement addressing mode, we can also accomplish absolute addressing; other uses for R0?

Instruction Format

Control Instructions Comparisons with zero can happen as part of the branch Compares between registers are placed in other registers that are tested by branches Jump-and-link places the return address in register R31

Instruction Frequencies

Summary In the 1960s, stack architectures were considered a good match for high-level languages In the 1970s, software costs were a concern – ISAs were enriched to make the compiler’s job easier – CISC In the 1980s, there was a push for simpler architectures – high clock speed and high parallelism – RISC ISAs designed in 1980 are still around!

The Assembly Line Unpipelined Pipelined Start and finish a job before moving to the next Jobs Time A B C Break the job into smaller stages A B C A B C A B C Pipelined

Performance Improvements? Does it take longer to finish each individual job? Does it take shorter to finish a series of jobs? What assumptions were made while answering these questions? Is a 10-stage pipeline better than a 5-stage pipeline?

Title Bullet