Modern Instruc?on Sets

Similar documents
Modern Instruc?on Sets

Chapter 5. A Closer Look at Instruction Set Architectures

Understand the factors involved in instruction set

Processor Architecture

Instruc=on Set Architecture

CHAPTER 5 A Closer Look at Instruction Set Architectures

Chapter 5. A Closer Look at Instruction Set Architectures. Chapter 5 Objectives. 5.1 Introduction. 5.2 Instruction Formats

Chapter 5. A Closer Look at Instruction Set Architectures

Instruc=on Set Architecture

CHAPTER 5 A Closer Look at Instruction Set Architectures

Chapter 5. A Closer Look at Instruction Set Architectures

Chapter 5. A Closer Look at Instruction Set Architectures. Chapter 5 Objectives. 5.1 Introduction. 5.2 Instruction Formats

News from the edge. Image source:

EC 413 Computer Organization

Chapter 5. A Closer Look at Instruction Set Architectures

Lecture: Pipelining Basics

What is Pipelining? RISC remainder (our assumptions)

CMSC 411 Practice Exam 1 w/answers. 1. CPU performance Suppose we have the following instruction mix and clock cycles per instruction.

ENGN 2910A Homework 03 (140 points) Due Date: Oct 3rd 2013

3/12/2014. Single Cycle (Review) CSE 2021: Computer Organization. Single Cycle with Jump. Multi-Cycle Implementation. Why Multi-Cycle?

Instruc=on Set Architecture

What is Pipelining? Time per instruction on unpipelined machine Number of pipe stages

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. MIPS Assembly

MIPS ISA AND PIPELINING OVERVIEW Appendix A and C

MIPS Pipelining. Computer Organization Architectures for Embedded Computing. Wednesday 8 October 14

What is Pipelining. work is done at each stage. The work is not finished until it has passed through all stages.

CSSE232 Computer Architecture I. Datapath

a number of pencil-and-paper(-and-calculator) questions two Intel assembly programming questions

CS311 Lecture: Pipelining, Superscalar, and VLIW Architectures revised 10/18/07

Review of instruction set architectures

c. What are the machine cycle times (in nanoseconds) of the non-pipelined and the pipelined implementations?

Unpipelined Machine. Pipelining the Idea. Pipelining Overview. Pipelined Machine. MIPS Unpipelined. Similar to assembly line in a factory

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. MIPS Assembly

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. MIPS Assembly

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific $$$ $$$ Cache Memory 2 $$$

INTEL Architectures GOPALAKRISHNAN IYER FALL 2009 ELEC : Computer Architecture and Design

Lecture 5: Pipelining Basics

The Processor: Instruction-Level Parallelism

ECEC 355: Pipelining

Topics/Assignments. Class 10: Big Picture. What s Coming Next? Perspectives. So Far Mostly Programmer Perspective. Where are We? Where are We Going?

Lecture 5: Instruction Set Architectures II. Take QUIZ 2 before 11:59pm today over Chapter 1 Quiz 1: 100% - 29; 80% - 25; 60% - 17; 40% - 3

Pipeline Review. Review

Lecture 10: Simple Data Path

This course provides an overview of the SH-2 32-bit RISC CPU core used in the popular SH-2 series microcontrollers

Real Processors. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University

Lecture 9. Pipeline Hazards. Christos Kozyrakis Stanford University

Advanced Parallel Architecture Lessons 5 and 6. Annalisa Massini /2017

Processor (IV) - advanced ILP. Hwansoo Han

CSEE 3827: Fundamentals of Computer Systems

UNIT V: CENTRAL PROCESSING UNIT

Floa=ng- Point Numbers

Computer Architecture. Lecture 6.1: Fundamentals of

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

More advanced CPUs. August 4, Howard Huang 1

Chapter 4. The Processor

ECE 313 Computer Organization FINAL EXAM December 14, This exam is open book and open notes. You have 2 hours.

Compilers and Assemblers

Lecture 4: MIPS Instruction Set

Lecture 4: Instruction Set Design/Pipelining

Computer Systems and Networks

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 32: Pipeline Parallelism 3

CSCE 212: FINAL EXAM Spring 2009

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. MARIE Simulator

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.

Real instruction set architectures. Part 2: a representative sample

2B 52 AB CA 3E A1 +29 A B C. CS120 Fall 2018 Final Prep and super secret quiz 9

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

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

Computer Systems Architecture Spring 2016

Lec 25: Parallel Processors. Announcements

Full Datapath. Chapter 4 The Processor 2

LECTURE 2: INSTRUCTIONS

Page 1. Structure of von Nuemann machine. Instruction Set - the type of Instructions

Reminder: tutorials start next week!

CENG 3531 Computer Architecture Spring a. T / F A processor can have different CPIs for different programs.

EXAM #1. CS 2410 Graduate Computer Architecture. Spring 2016, MW 11:00 AM 12:15 PM

Pipelining. CSC Friday, November 6, 2015

EJEMPLOS DE ARQUITECTURAS

Processor Architecture

Instruction Sets Ch 9-10

COMPUTER ORGANIZATION AND DESI

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture

Instruction Sets Ch 9-10

CPE300: Digital System Architecture and Design

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 4. The Processor

Lecture 4: RISC Computers

CS3350B Computer Architecture MIPS Introduction

These actions may use different parts of the CPU. Pipelining is when the parts run simultaneously on different instructions.

Preventing Stalls: 1

Chapter 13 Reduced Instruction Set Computers

Processor Architectures

Processor design - MIPS

CS64 Computer Organization

Advanced Computer Architecture

CHAPTER 5 A Closer Look at Instruction Set Architectures

Computer and Information Sciences College / Computer Science Department Enhancing Performance with Pipelining

Advanced d Instruction Level Parallelism. Computer Systems Laboratory Sungkyunkwan University

EITF20: Computer Architecture Part2.2.1: Pipeline-1

Advanced processor designs

Instruction Set Principles and Examples. Appendix B

Transcription:

ECPE 170 Jeff Shafer University of the Pacific Modern Instruc?on Sets

2 Schedule Today Quiz 4 Next week Beyond Finish Chapter 5 (instruc?on sets) Chapter 6 Memory systems Exam 2 Tuesday, Nov 1 st

3 Gradebook Please check Sakai gradebook All grades correctly entered?

4 Homework 5.18 Addressing modes what is loaded in the accumulator? Instruc?on: LOAD 500 Contents of memory: Contents of R1: 200 Value in ACC for: Immediate mode? Direct mode? Indirect mode? Indexed mode? Address 100 600 400 300 500 100 600 500 700 800 Data

5 Homework 5.19 Speedup of a pipelined system? (both with infinity instruclons and with finite instruclons) Scenario Non- pipelined system: 200ns per instr (t n ) Pipelined system: 40ns per stage (t p ) Pipeline depth: 5 TheoreLcal speedup For instruclons? For 200 instruclons? S = nt n (k + n!1)t p = 200 " 200ns (5+ 200!1)"40ns = 4.90

6 Recap Pipeline Pitfalls Why might we not achieve this full speedup in a pipelined system? Unbalanced pipeline: We assumed that a 200ns- per- instruc?on unpipelined system could be converted to a 5- stage 40ns- per- stage system If the pipeline stages aren t perfectly balanced, we have to clock at the slowest stage We might only be able to achieve 50 or 60ns per stage Hazards Data hazards / structural hazards / control hazards

7 Real- World ISAs

8 Real- World Examples of ISAs What does Intel do? What does MIPS do? What does Java do?

9 Intel Design Processor is Lible endian 2- address architecture (register- memory) One operand can be a memory address, but the other must be a register number Variable- length instruc?ons Variable- length data (1, 2, 4, 8 bytes)

10 Intel ISA + Pipelining Almost all Intel chips (286, 386, 486, etc ) have had some degree of pipelining Pipelining was first seriously applied to the Intel 486 chip in 1989 Could complete an ALU instruc?on (coming from a register, going to a register) every clock cycle Pipelining got beber with the PenLum chip in 1993 Double- wide: Two instruc4ons are sent down the pipeline every cycle! (Requires two ALUs, etc )

11 Intel ISA + Pipelining Pipeline depth changed over?me: Today Original Pen?um: 5 stages Pen?um 2: 12 stages Pen?um 3: 14 stages Pen?um 4: 20-24 stages Pen?um 4 extreme edi?on: 31 stages Why were the pipelines gezng longer? Core i7 has a 17- stage pipeline

12 Intel ISA + Addressing Modes Intel processors support a wide variety of addressing modes. The original 8086 (16- bit processor, released in 1978) provided 17 ways to address memory Displacement, register indirect, indexed, base indexed, etc hbp://www.ic.unicamp.br/~celio/mc404s2-03/addr_modes/intel_addr.html How many addressing modes do you think the PenLum processor supported in 1993? All 17 (thank you, backwards compa?bility) Other Intel chips (the Itanium product line) only support one addressing mode Register indirect addressing with op?onal post increment Reduces the amount of hardware required

13 MIPS Design MIPS was an acronym for Microprocessor Without Interlocked Pipeline Stages. Interlocked? Hardware that detects a pipeline hazard and stalls the pipeline un?l hazard is resolved Originally the MIPS omibed this hardware to simplify design But solware (the assembler) had to insert NOPs so programs wouldn t break! NOPs made the program code bigger, so the hardware was eventually added back in

14 MIPS Design MIPS processors used in many products, including PlaySta?on 2 / PSP The architecture: Lible endian Word- addressable Three- address, fixed- length instruc?ons

15 MIPS + Pipelining Like Intel, the pipeline size of the MIPS processors has grown R2000 and R3000 have 5- stage pipelines R4000 and R4400 have 8- stage pipelines R10000 has three pipelines: 5- stage pipeline for integer instruc?ons 7- stage pipeline for floa?ng- point instruc?ons 6- state pipeline for LOAD/STORE instruc?ons

16 MIPS ISA In all MIPS ISAs, only the LOAD and STORE instruc?ons can access memory The ISA uses only base addressing mode The assembler accommodates programmers who need to use immediate, register, direct, indirect register, base, or indexed addressing modes Be>er so?ware allows for simpler hardware while s4ll giving programmers flexibility

17 Java Design Java is a programming language Why are we discussing it in a chapter focused on processor design? Java is an interpreted language that runs in a solware machine called the Java Virtual Machine (JVM) The JVM is wriben in a na?ve language for a wide array of processors, including MIPS and Intel Like a real machine, the JVM has an ISA all of its own, called bytecode. This ISA was designed to be compa?ble with the architecture of any machine on which the JVM is running

18 Java Design

19 Java ISA Java bytecode is a stack- based language Most instruc?ons are zero address instruc?ons The JVM has four registers that provide access to five regions of main memory All references to memory are offsets from these registers. Java uses no pointers or absolute memory references Java was designed for planorm interoperability, not performance! Bare minimum design that allows a JVM to be built on top of virtually any other type of processor

20 Java Design Does the JVM have to be implemented in so\ware? No! You could build a hardware chip that runs Java bytecode directly

21 Chapter 5 Conclusion ISAs are dis?nguished according to their bits per instruc?on, number of operands per instruc?on, operand loca?on and types and sizes of operands Endianness is another major architectural considera?on CPU can store store data based on 1. A stack architecture 2. An accumulator architecture 3. A general purpose register architecture