ECE 486/586. Computer Architecture. Lecture # 6

Similar documents
ECE 485/585 Microprocessor System Design

CSCE 5610: Computer Architecture

ECE232: Hardware Organization and Design

Instruction Set Principles and Examples. Appendix B

Lecture 4: Instruction Set Architecture

ECE 486/586. Computer Architecture. Lecture # 7

Lecture Topics. Principle #1: Exploit Parallelism ECE 486/586. Computer Architecture. Lecture # 5. Key Principles of Computer Architecture

MIPS Memory Access Instructions

Chapter 2 Instruction: Language of the Computer

ECE232: Hardware Organization and Design

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

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

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

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

CHAPTER 5 A Closer Look at Instruction Set Architectures

Announcements HW1 is due on this Friday (Sept 12th) Appendix A is very helpful to HW1. Check out system calls

EC 413 Computer Organization

CS4617 Computer Architecture

Computer Architecture. MIPS Instruction Set Architecture

MIPS Instruction Set Architecture (1)

ECE331: Hardware Organization and Design

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

ECE 486/586. Computer Architecture. Lecture # 8

Instructions: Language of the Computer

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

CHAPTER 5 A Closer Look at Instruction Set Architectures

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture

Review of instruction set architectures

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

Alternate definition: Instruction Set Architecture (ISA) What is Computer Architecture? Computer Organization. Computer structure: Von Neumann model

Course Administration

Hardware Level Organization

Review Questions. 1 The DRAM problem [5 points] Suggest a solution. 2 Big versus Little Endian Addressing [5 points]

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

Slides for Lecture 6

CS3350B Computer Architecture MIPS Instruction Representation

EC 413 Computer Organization

Harry H. Porter, 2006

EECS Computer Organization Fall Based on slides by the author and prof. Mary Jane Irwin of PSU.

CHAPTER 5 A Closer Look at Instruction Set Architectures

Math 230 Assembly Programming (AKA Computer Organization) Spring 2008

Pointers (1A) Young Won Lim 1/22/18

Chapter 2A Instructions: Language of the Computer

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture

Computer Architecture

CSIS1120A. 10. Instruction Set & Addressing Mode. CSIS1120A 10. Instruction Set & Addressing Mode 1

ECE 154A Introduction to. Fall 2012

Typical Processor Execution Cycle

See also cache study guide. Contents Memory and Caches. Supplement to material in section 5.2. Includes notation presented in class.

CENG3420 Lecture 03 Review

CSEE 3827: Fundamentals of Computer Systems

See also cache study guide. Contents Memory and Caches. Supplement to material in section 5.2. Includes notation presented in class.

Pointers (1A) Young Won Lim 2/6/18

Computer Architecture

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

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

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

IT 252 Computer Organization and Architecture. Introduction. Chia-Chi Teng

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

Anne Bracy CS 3410 Computer Science Cornell University. See P&H Chapter: , , Appendix B

These slides do not give detailed coverage of the material. See class notes and solved problems (last page) for more information.

Representing numbers on the computer. Computer memory/processors consist of items that exist in one of two possible states (binary states).

Pointers (1A) Young Won Lim 2/10/18

17. Instruction Sets: Characteristics and Functions

Chapter 5. A Closer Look at Instruction Set Architectures

Instruction Set Design

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

CS429: Computer Organization and Architecture

Understand the factors involved in instruction set

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?

CPS 104 Computer Organization and Programming

Memory. CS 447, Spring /25/16. Memory. Processor (CPU) transfer

Pointers (1A) Young Won Lim 1/14/18

M1 Computers and Data

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

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

Real instruction set architectures. Part 2: a representative sample

Architecture I. Computer Systems Laboratory Sungkyunkwan University

13-1 Memory and Caches

Computer Systems Architecture I. CSE 560M Lecture 3 Prof. Patrick Crowley

Chapter 13 Reduced Instruction Set Computers

מבנה מחשבים Amar Lior Based on lectures notes from Arie Schlesinger

Byte Ordering. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

CPU Architecture and Instruction Sets Chapter 1

Instruction content (2/2) Instruction content (1/2) The Instruction Set. Chapter 9. Each instruction must contain 4 basic pieces of information

Computer Model. What s in a computer? Processor Memory I/O devices (keyboard, mouse, LCD, video camera, speaker, disk, CD drive, )

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 11 Instruction Sets: Addressing Modes and Formats

Reminder: tutorials start next week!

Lecture 4: RISC Computers

CS61C C/Assembler Operators and Operands Lecture 2 January 22, 1999 Dave Patterson (http.cs.berkeley.edu/~patterson)

CS/ECE/752 Chapter 2 Instruction Sets Instructor: Prof. Wood

Machine and Assembly Language Principles

General Purpose Processors

Computer Architecture

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

EE 3170 Microcontroller Applications

CSE351: Memory, Data, & Addressing I

ARM processor organization

Instruction Set Principles. (Appendix B)

Instruction Set Architecture (ISA)

Transcription:

ECE 486/586 Computer Architecture Lecture # 6 Spring 2015 Portland State University

Lecture Topics Instruction Set Principles Classifying Instruction Set Architectures Memory Addressing Alignment Byte Order Addressing Modes Operations in the Instruction Set Reference: Appendix A: Sections A.2, A.3, A.4, A.5

Register and Memory Operands

ISA Comparison

Memory Addressing Byte Addressing Each byte has a unique address Word Addressing Half-word: 16-bit (or 2 bytes) Word: 32-bit (or 4 bytes) Double word : 64-bit (or 8 bytes) Quad word: 128-bit (or 16 bytes)

Memory Addressing Two issues Alignment Byte order (Big Endian vs. Little Endian) Alignment specifies whether there are any boundaries for word addressing Byte order specifies how multiple bytes within a word are mapped to memory addresses

Memory Addressing Alignment Must half word, words, double words begin mod 2, mod 4, mod 8 boundaries? 160 161 162 163 164 165 166 167

Memory Addressing Alignment Or are there no alignment restrictions? 160 161 162 163 164 165 166 167

Alignment: Why Care? Non-aligned memory references may cause multiple memory accesses 160 161 162 163 164 165 166 167 First Access Second Access Consider a system in which memory reads return 4 bytes and a reference to a word spans a 4-byte boundary: two memory accesses are required Complicates memory and cache controller design Assemblers typically force alignment for efficiency

Memory Alignment

Byte Order Little Endian: The least significant byte within a word (or half word or double word) is stored in the smallest address 160 161 162 163 164 165 166 167 MSB LSB byte 1 byte 0 161 160

Byte Order Little Endian: The least significant byte within a word (or half word or double word) is stored in the smallest address Example: A word (5827A6FD) 16 is stored at address 180 in littleendian format. Show the contents of bytes 180 through 183.

Byte Order Little Endian: The least significant byte within a word (or half word or double word) is stored in the smallest address Example: A word (5827A6FD) 16 is stored at address 180 in littleendian format. Show the contents of bytes 180 through 183. Address Value 180 FD 181 A6 182 27 183 58

Byte Order Big Endian: The most significant byte within a word (or half word or double word) is stored in the smallest address 160 161 162 163 164 165 166 167 MSB LSB byte 1 byte 0 160 161

Byte Order Big Endian: The most significant byte within a word (or half word or double word) is stored in the smallest address Example: A word (5827A6FD) 16 is stored at address 180 in bigendian format. Show the contents of bytes 180 through 183.

Byte Order Big Endian: The most significant byte within a word (or half word or double word) is stored in the smallest address Example: A word (5827A6FD) 16 is stored at address 180 in bigendian format. Show the contents of bytes 180 through 183. Address Value 180 58 181 27 182 A6 183 FD

Byte Order in Real Systems Pros/Cons Often exaggerated Little Endian Character strings appear backwards in registers Intuitive when incrementing from LSB to MSB Big Endian: Motorola 68000, Sun Sparc, PDP-11 Little Endian: VAX, Intel IA32 Configurable: MIPS, ARM

Addressing Modes

Addressing Modes Addressing modes can reduce instruction counts but at a cost of added CPU design complexity and/or increase average CPI Example (usage of auto-increment mode): With auto-increment mode: Add R1, (R2)+ Without auto-increment mode Add R1, (R2) Add R2, #1

Addressing Modes Addressing modes can reduce instruction counts but at a cost of added CPU design complexity and/or increase average CPI Example (usage of displacement mode): With displacement mode: Add R4, 100(R1) Without displacement mode Add R1, #100 Add R4, (R1) Sub R1, #100

Addressing Modes Addressing modes can reduce instruction counts but at a cost of added CPU design complexity and/or increase average CPI Example (usage of displacement mode): With displacement mode: Add R4, 100(R1) Without displacement mode Add R1, #100 Add R4, (R1) Sub R1, #100 Support most frequently used addressing modes (make the common case fast)

Frequency of Addressing Modes

Displacement Values are Widely Distributed

Immediate Operand Frequency

Distribution of Immediate Values

Type and Size of Operands

Operations in the Instruction Set

Most Frequent 80x86 Instructions Most widely executed instructions are the simple operations of an instruction set Optimize the common case => make the common instructions run as fast as possible