Slides for Lecture 6
|
|
- Rolf Skinner
- 5 years ago
- Views:
Transcription
1 Slides for Lecture 6 ENCM 501: Principles of Computer Architecture Winter 2014 Term Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary 28 January, 2014
2 ENCM 501 W14 Slides for Lecture 6 slide 2/33 Previous Lecture introduction to ISA design ideas memory-register and load-store architectures a very brief history of RISC versus CISC aspects of the ISA view of memory flat address spaces, alignment rules
3 ENCM 501 W14 Slides for Lecture 6 slide 3/33 Today s Lecture endianness addressing modes examples of tradeoffs in instruction set design Related reading in Hennessy & Patterson: Sections A.3 A.7
4 ENCM 501 W14 Slides for Lecture 6 slide 4/33 Endianness This is not really an aspect of computer design in which there are interesting cost or performance tradeoffs. Rather, it s an annoying detail that will occasionally bite you if you aren t aware of it. Registers inside processor cores do not have endianness. An N-bit register just has bits N 1 (MSB), N 2,..., 2, 1, 0 (LSB). Endianness is a property of the interface between the processor core and the memory, and comes from the fact that most ISAs allow memory reads and writes with various sizes, typically 1-byte, 2-byte, 4-byte, and 8-byte.
5 ENCM 501 W14 Slides for Lecture 6 slide 5/33 Endianness in 64-bit MIPS doublewords The byte offset gives the address of an individual byte relative to the address of the entire doubleword Bit numbering: 63 is MSB, 0 is LSB LITTLE-endian byte offsets Bit numbering: 63 is MSB, 0 is LSB BIG-endian byte offsets
6 ENCM 501 W14 Slides for Lecture 6 slide 6/33 Endianness in 32-bit MIPS words The byte offset gives the address of an individual byte relative to the address of the entire word. Bit numbering: 31 is MSB, 0 is LSB LITTLE-endian byte offsets Bit numbering: 31 is MSB, 0 is LSB BIG-endian byte offsets
7 ENCM 501 W14 Slides for Lecture 6 slide 7/33 Example effect of endianness in MIPS32 # LI: pseudoinstruction # for "load immediate" LI R9, 0x SW R9, 0(R8) LB R10, 0(R8) LB R11, 1(R8) LB R12, 2(R8) LB R13, 3(R8) Assume that R8 contains some valid address that is a multiple of four. What goes into R10, R11, R12, R13, if the processor chip is in little-endian mode? What if the processor chip is in big-endian mode?
8 ENCM 501 W14 Slides for Lecture 6 slide 8/33 Practical code rarely (if ever) writes data as a word and later reads it back as bytes, as was done in the example on the last slide. Why is endianness a practical concern? Here is a practical problem: Program P1 on Computer C1 copies an array of integers or FP numbers from memory into a file using a function like fwrite in the C library. On disk, the file is just a long sequence of bytes. Program P2 on Computer C2 opens the file and tries to read the array of numbers from the file into memory using a function like fread in the C library. But C2 does not have the same endianness as C1, so the data does not make sense to P2. The same kind of problem can happen when streaming multi-byte numbers over a network.
9 ENCM 501 W14 Slides for Lecture 6 slide 9/33 Endianness and real systems Today little-endianness is much more common than big-endianness. Here are some little-endian systems: anything running on x86 or x86-64; Apple ios, Linux (including Android), and Windows running on ARM. Some historically important big-endian machines were: Macs with or PowerPC-based processors; and SPARC-based computers from Sun Microsystems. Many modern ISA families, for example, MIPS and ARM, allow the processor to switch back and forth between littleand big-endian modes.
10 ENCM 501 W14 Slides for Lecture 6 slide 10/33 Addressing modes Unlike endianness, selection of addressing modes for an ISA is a set of design decisions that involve interesting tradeoffs. Addressing mode is a slightly misleading term, because it refers to the way in which an operand is accessed by an instruction, and that might or might not involve generation of a memory address. Addressing modes for data access are discussed as part of Section A.3 in the textbook. Addressing modes for instruction access needed, for example, by branches and jumps are discussed in Section A.6.
11 ENCM 501 W14 Slides for Lecture 6 slide 11/33 Examples of addressing modes for data Figure A.6 in the textbook gives examples covering most addressing modes available in ISAs of the present and the recent past. A typical ISA will support some but not all of these addressing modes. (Historical note: I think the MC68000 series supported all of them and more, which is kind of awesome.) This lecture won t explain every addressing mode in detail, but instead will look at the ones that are most common and important. Let s start with the two modes that don t involve generation of a memory address...
12 ENCM 501 W14 Slides for Lecture 6 slide 12/33 Addressing modes: Register and Immediate Register: Data is coming from or going to a register. All three operands are accessed in register mode in this MIPS64 instruction: DADDU R10, R8, R9 Immediate: Source data is a constant written into the instruction. Here is a MIPS64 example in which two operands are register-mode and one is immediate-mode: DADDIU R16, R16, 8
13 ENCM 501 W14 Slides for Lecture 6 slide 13/33 Encoding of immediate operands in example ISAs x86-64: Instruction size is variable, so 1, 2, 4, or 8 bytes are used, as necessary, to describe the constant. MIPS32 and MIPS64: Instructions are always 32 bits wide and the field size for immediate operands is always 16 bits wide. The range of constants is to for instructions that use signed constants and 0 to for those that use unsigned constants. ARM: 12 bits within the fixed instruction size of 32 bits are used for an immediate operand, in a complicated and interesting way that could totally derail a lecture! (That s one of a few very good reasons why it would not be easy to switch from MIPS to ARM in ENCM 369.)
14 ENCM 501 W14 Slides for Lecture 6 slide 14/33 The two simplest addressing modes for memory access Hint for comprehension: Roughly speaking, indirect means via a pointer. Register indirect: Use the bits in a register as a memory address. MIPS64 example: LD R8, (R9) # R8 = doubleword at address in R9 Displacement: Add a constant to the bits in a register to generate a memory address. MIPS64 example: # R10 = doubleword at address R bytes LD R10, 64(R11) Why is register indirect mode really just a special case of displacement mode?
15 ENCM 501 W14 Slides for Lecture 6 slide 15/33 Scaled mode: Good for array element access Here is some x86-64 assembly language code you will look at in Assignment 2....L16: mov (%rbx,%rax,4), %edx addq $1, %rax addq %rdx, %rbp cmpq $ , %rax jne.l16 The mov instruction uses scaled mode: The address used to read memory is %rbx + 4 %rax %rbx is the address of element 0 of an array of 4-byte elements, and %rax is an index into that array.
16 ENCM 501 W14 Slides for Lecture 6 slide 16/33 Autoincrement and autodecrement modes (1) Other names for these modes are post-increment and pre-decrement. In either of these modes a load causes two register updates one to a destination register, and another to a pointer register. A store also causes two updates one update to a memory location and another to a pointer register. Both are useful for walking through arrays using pointer arithmetic. A store using pre-decrement mode is an efficient way to push a register value on to a stack. And a load using post-increment mode is an efficient way to pop a register value from a stack.
17 ENCM 501 W14 Slides for Lecture 6 slide 17/33 Autoincrement and autodecrement modes (2) These modes closely match some famously tricky C and C++ expressions. Let s write a couple of C statements that could be each be implemented using a single instruction if autoincrement and autodecrement modes are available.
18 ENCM 501 W14 Slides for Lecture 6 slide 18/33 Memory indirect mode Example, using syntax from textbook Figure A.6: MOV The address in R1 is used to read a second address from memory. That second address is used to read from memory into R0. In a typical load/store architecture this would be done with two instructions: a load followed by another load. Another example, using the same syntax: R3 The address in R2 is used to read a second address from memory. That second address is used to write the data from R3 to memory. In a typical load/store architecture this would be done with two instructions: a load followed by a store. This mode is somewhat obsolete these days, but thinking about it helps to understand pointer-to-pointer types in C and C++.
19 ENCM 501 W14 Slides for Lecture 6 slide 19/33 MIPS instruction format for loads and stores Just about all MIPS32 and MIPS64 load and store instructions are organized like this: opcode base rt offset There are various different opcodes for loads and stores of various sizes of data. The address is formed by adding the sign-extension of the 16-bit offset and the address in GPR base. rt is the source register for a store and and the destination register for a load. The addressing mode for memory is displacement. What are some advantages and disadvantages of offering only displacement mode for loads and stores?
20 ENCM 501 W14 Slides for Lecture 6 slide 20/33 What limits the number of GPRs (or FPRs) available to an ISA? The limit is not due to the chip area dedicated to registers! For example, MIPS64 has bit GPRs, which is a larger than typical number of GPRs for current ISAs. MIPS64 requires an array of one-bit cells, that is, 2 11 = 2048 bits, or 256 bytes. Currently, L1 caches are 32 kb or larger much, much bigger than 256 bytes. So why are ISAs with large number of GPRs say, 64, or 256, or 1024 quite uncommon?
21 ENCM 501 W14 Slides for Lecture 6 slide 21/33 Load and store word examples in ARM7TDMI Here is one of many formats for instructions to load or store 32-bit words: cond Rn Rd 0 Rm The above pattern is for load. Change bit 20 to 0 for store. Rd gives the destination GPR for load, and source GPR for store. The memory address is computed using two GPRs, Rn and Rm, plus, in a complicated way, constants encoded in bits 23 and Essentially, this particular format allows numerous variations of scaled addressing mode.
22 ENCM 501 W14 Slides for Lecture 6 slide 22/33 Warning: The details are quite complex, so I possibly have some of them wrong! Mistakes or not, the contrast with MIPS is striking. Various other ARM load and store formats allow every addressing mode in textbook Figure A.6 except memory indirect and some interesting combinations of those modes. What advantages are there to the huge variety of ARM load and store formats, compared to the distinct lack of variety in MIPS load and store formats? What disadvantages might there be? Note: Every ARM instruction starts with a 4-bit cond field. We ll get to that soon.
23 ENCM 501 W14 Slides for Lecture 6 slide 23/33 Instructions for control flow As discussed in textbook Section A.6, this category includes conditional branches jumps procedure calls procedure returns In general, these are instructions that might (conditional branch) or will (the others) cause a special update to the PC (program counter register).
24 ENCM 501 W14 Slides for Lecture 6 slide 24/33 Target instructions and target addresses A useful term related to control flow is target instruction, which is in the case of conditional branch, the first instruction executed after a branch is taken a branch is taken or not taken depending on whether some condition is true; in the cases of jumps, calls, and returns, the first instruction executed as a result of a jump, call, or return instruction. The target address is simply the address of the target instruction.
25 ENCM 501 W14 Slides for Lecture 6 slide 25/33 Addressing modes for control flow instructions Addressing modes for control flow instructions are essentially just methods for generating target addresses. For branches, jumps, and calls, the most common addressing mode is PC-relative, in which an offset is extracted from the instruction and added to the current PC value. In MIPS and ARM the offsets in PC-relative instructions are numbers of instructions, but in x86 and x86-64 the offset is a number of bytes. Why is there a difference here? Why would PC-relative addressing not work in procedure return instructions?
26 ENCM 501 W14 Slides for Lecture 6 slide 26/33 Conditional branch options Most ISAs make branch decisions based on a few bits called flag bits or condition code bits that sit within some kind of processor status register. Let s look at this for a simple C example, in which j and k are int variables in registers: if (i < k) goto L1; x86-64 translation, assuming i in %eax, k in %edx: cmpl %edx, %eax # compare registers jl L1 # branch based on N and V flags jl means jump if less than. (Note: In reality the assembly language label almost certainly won t be the same as the C label L1.)
27 ENCM 501 W14 Slides for Lecture 6 slide 27/33 For the same C code, here is an ARM translation, assuming i in r0, k in r1: CMP r0, r1 ; compare registers BLT L1 ; branch based on N and V flags MIPS is unusual the comparison result goes into a GPR. Suppose we have i in R4, k in R5... SLT R8, R4, R5 # R8 = (R4 < R5) BNE R8, R0, L1 # branch if R8!= 0
28 ENCM 501 W14 Slides for Lecture 6 slide 28/33 Conditional instructions in ARM Recall from Assignment 1 that MIPS offers the conditional move instructions MOVN and MOVZ. (MIPS also has some similar floating-point conditional move instructions). ARM takes this idea to the extreme every ARM instruction is conditional! Bits of an ARM instruction are the so-called cond field, which specifies that the instruction either performs some action or is a no-op, depending on some condition on zero or more of the N, Z, V and C flags. Example ARM cond field patterns: 1110, for ALWAYS. The instruction is never a no-op. This is the default cond field in ARM assembly language. 0000, for EQUAL. Execute the instruction if and only if the Z flag is 1.
29 ENCM 501 W14 Slides for Lecture 6 slide 29/33 The power of ARM conditional instructions is illustrated by this example... Here is some C code: if (i == 33 i == 63) count++; If i and count are ints in ARM registers r0 and r1, here is ARM assembly language for the C code: TEQ r0, #33 ; # indicates immediate mode TEQNE r0, #63 ADDEQ r1, #1, #1 The cond field for the first instruction is 1110, for always. For the second instruction, it s 0001, for do it only if the Z flag is 0, and for the third, it s 0000, for do it only if the Z flag is 1.
30 ENCM 501 W14 Slides for Lecture 6 slide 30/33 Acknowledgment: Example on previous slide adapted from an example on pages of Hohl, W., ARM Assembly Language: Fundamentals and Techniques, c 2009, ARM (UK), published by CRC Press.
31 ENCM 501 W14 Slides for Lecture 6 slide 31/33 MIPS versus ARM: Vague arguments CPU time = IC CPI clock period MIPS attacks CPI by making instructions very simple and easy to pipeline. ARM tries to be close to MIPS with respect to CPI, and is much better than older CISC ISAs for CPI. ARM attacks IC by doing things in one instruction that might sometimes take two or three MIPS instructions.
32 ENCM 501 W14 Slides for Lecture 6 slide 32/33 MIPS versus ARM: How to be quantitative A fair and thorough study would require at least: real applications that are reasonably good fits for both ISAs; the best possible compilers for each of the ISAs; processors fabricated with the same transistor and interconnect technology, and very similar die sizes. Even then, it might not be a truly fair fight between ISAs, if one side has better digital designers than the other.
33 ENCM 501 W14 Slides for Lecture 6 slide 33/33 Upcoming Topics The memory hierarchy Related reading in Hennessy & Patterson: Appendix B
Lecture 4: Instruction Set Architecture
Lecture 4: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation Reading: Textbook (5 th edition) Appendix A Appendix B (4 th edition)
More informationContents. Slide Set 1. About these slides. Outline of Slide Set 1. Typographical conventions: Italics. Typographical conventions. About these slides
Slide Set 1 for ENCM 369 Winter 2014 Lecture Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 2014 ENCM 369 W14 Section
More informationSlide Set 1 (corrected)
Slide Set 1 (corrected) for ENCM 369 Winter 2018 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary January 2018 ENCM 369 Winter 2018
More informationENCM 501 Winter 2017 Assignment 3 for the Week of January 30
page 1 of 7 ENCM 501 Winter 2017 Assignment 3 for the Week of January 30 Steve Norman Department of Electrical & Computer Engineering University of Calgary January 2017 Assignment instructions and other
More informationENCM 501 Winter 2015 Assignment 3 for the Week of February 2
page 1 of 6 ENCM 501 Winter 2015 Assignment 3 for the Week of February 2 Steve Norman Department of Electrical & Computer Engineering University of Calgary January 2015 Assignment instructions and other
More informationInstruction Set Architecture. "Speaking with the computer"
Instruction Set Architecture "Speaking with the computer" The Instruction Set Architecture Application Compiler Instr. Set Proc. Operating System I/O system Instruction Set Architecture Digital Design
More informationSlide Set 8. for ENCM 501 in Winter Steve Norman, PhD, PEng
Slide Set 8 for ENCM 501 in Winter 2018 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary March 2018 ENCM 501 Winter 2018 Slide Set 8 slide
More informationSlides for Lecture 15
Slides for Lecture 15 ENCM 501: Principles of Computer Architecture Winter 2014 Term Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary 6 March,
More informationSlide Set 7. for ENCM 501 in Winter Term, Steve Norman, PhD, PEng
Slide Set 7 for ENCM 501 in Winter Term, 2017 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 2017 ENCM 501 W17 Lectures: Slide
More informationCSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements
CSE141: Introduction to Computer Architecture CSE 141 Computer Architecture Spring 2005 Lecture 3 Instruction Set Architecute Pramod V. Argade April 4, 2005 Instructor: TAs: Pramod V. Argade (p2argade@cs.ucsd.edu)
More informationCSEE 3827: Fundamentals of Computer Systems
CSEE 3827: Fundamentals of Computer Systems Lecture 15 April 1, 2009 martha@cs.columbia.edu and the rest of the semester Source code (e.g., *.java, *.c) (software) Compiler MIPS instruction set architecture
More informationEC 413 Computer Organization
EC 413 Computer Organization Review I Prof. Michel A. Kinsy Computing: The Art of Abstraction Application Algorithm Programming Language Operating System/Virtual Machine Instruction Set Architecture (ISA)
More informationCPU Architecture and Instruction Sets Chapter 1
CPU Architecture and Instruction Sets Chapter 1 1 Is CPU Architecture Relevant for DBMS? CPU design focuses on speed resulting in a 55%/year improvement since 1987: If CPU performance in database code
More informationSystems Architecture I
Systems Architecture I Topics Assemblers, Linkers, and Loaders * Alternative Instruction Sets ** *This lecture was derived from material in the text (sec. 3.8-3.9). **This lecture was derived from material
More informationCMSC Computer Architecture Lecture 2: ISA. Prof. Yanjing Li Department of Computer Science University of Chicago
CMSC 22200 Computer Architecture Lecture 2: ISA Prof. Yanjing Li Department of Computer Science University of Chicago Administrative Stuff! Lab1 is out! " Due next Thursday (10/6)! Lab2 " Out next Thursday
More informationChapter 2. lw $s1,100($s2) $s1 = Memory[$s2+100] sw $s1,100($s2) Memory[$s2+100] = $s1
Chapter 2 1 MIPS Instructions Instruction Meaning add $s1,$s2,$s3 $s1 = $s2 + $s3 sub $s1,$s2,$s3 $s1 = $s2 $s3 addi $s1,$s2,4 $s1 = $s2 + 4 ori $s1,$s2,4 $s2 = $s2 4 lw $s1,100($s2) $s1 = Memory[$s2+100]
More informationInstruction Set Architecture (ISA)
Instruction Set Architecture (ISA)... the attributes of a [computing] system as seen by the programmer, i.e. the conceptual structure and functional behavior, as distinct from the organization of the data
More informationComputer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture
Computer Science 324 Computer Architecture Mount Holyoke College Fall 2009 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture. Idea:
More informationSlide Set 5. for ENCM 369 Winter 2014 Lecture Section 01. Steve Norman, PhD, PEng
Slide Set 5 for ENCM 369 Winter 2014 Lecture Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 2014 ENCM 369 W14 Section
More informationECE 486/586. Computer Architecture. Lecture # 7
ECE 486/586 Computer Architecture Lecture # 7 Spring 2015 Portland State University Lecture Topics Instruction Set Principles Instruction Encoding Role of Compilers The MIPS Architecture Reference: Appendix
More informationChapter 2A Instructions: Language of the Computer
Chapter 2A Instructions: Language of the Computer Copyright 2009 Elsevier, Inc. All rights reserved. Instruction Set The repertoire of instructions of a computer Different computers have different instruction
More informationTopic Notes: MIPS Instruction Set Architecture
Computer Science 220 Assembly Language & Comp. Architecture Siena College Fall 2011 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture.
More informationCSCE 5610: Computer Architecture
HW #1 1.3, 1.5, 1.9, 1.12 Due: Sept 12, 2018 Review: Execution time of a program Arithmetic Average, Weighted Arithmetic Average Geometric Mean Benchmarks, kernels and synthetic benchmarks Computing CPI
More informationCS3350B Computer Architecture
CS3350B Computer Architecture Winter 2015 Lecture 4.1: MIPS ISA: Introduction Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted d from lectures on Computer Organization and Design, Patterson & Hennessy,
More informationReal instruction set architectures. Part 2: a representative sample
Real instruction set architectures Part 2: a representative sample Some historical architectures VAX: Digital s line of midsize computers, dominant in academia in the 70s and 80s Characteristics: Variable-length
More informationSlide Set 3. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng
Slide Set 3 for ENCM 369 Winter 2018 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary January 2018 ENCM 369 Winter 2018 Section
More informationLecture 3 Machine Language. Instructions: Instruction Execution cycle. Speaking computer before voice recognition interfaces
Lecture 3 Machine Language Speaking computer before voice recognition interfaces 1 Instructions: Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow Very
More informationCHAPTER 5 A Closer Look at Instruction Set Architectures
CHAPTER 5 A Closer Look at Instruction Set Architectures 5.1 Introduction 5.2 Instruction Formats 5.2.1 Design Decisions for Instruction Sets 5.2.2 Little versus Big Endian 5.2.3 Internal Storage in the
More informationInstruction Set Principles. (Appendix B)
Instruction Set Principles (Appendix B) Outline Introduction Classification of Instruction Set Architectures Addressing Modes Instruction Set Operations Type & Size of Operands Instruction Set Encoding
More informationInstruction Set Architectures
Lecture 2 Instruction Set Architectures Dr. Soner Onder CS 4431 Michigan Technological University 09/04/12 1 Instruction Set Architecture (ISA) 1950s to 1960s: Computer Architecture Course Computer Arithmetic
More informationComputer Systems Laboratory Sungkyunkwan University
ARM & IA-32 Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu ARM (1) ARM & MIPS similarities ARM: the most popular embedded core Similar basic set
More informationComputer Architecture
CS3350B Computer Architecture Winter 2015 Lecture 4.2: MIPS ISA -- Instruction Representation Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted from lectures on Computer Organization and Design,
More informationReview Questions. 1 The DRAM problem [5 points] Suggest a solution. 2 Big versus Little Endian Addressing [5 points]
Review Questions 1 The DRAM problem [5 points] Suggest a solution 2 Big versus Little Endian Addressing [5 points] Consider the 32-bit hexadecimal number 0x21d3ea7d. 1. What is the binary representation
More informationComputer Systems Architecture I. CSE 560M Lecture 3 Prof. Patrick Crowley
Computer Systems Architecture I CSE 560M Lecture 3 Prof. Patrick Crowley Plan for Today Announcements Readings are extremely important! No class meeting next Monday Questions Commentaries A few remaining
More informationCENG3420 Lecture 03 Review
CENG3420 Lecture 03 Review Bei Yu byu@cse.cuhk.edu.hk 2017 Spring 1 / 38 CISC vs. RISC Complex Instruction Set Computer (CISC) Lots of instructions of variable size, very memory optimal, typically less
More informationComputer Architecture. MIPS Instruction Set Architecture
Computer Architecture MIPS Instruction Set Architecture Instruction Set Architecture An Abstract Data Type Objects Registers & Memory Operations Instructions Goal of Instruction Set Architecture Design
More informationInstruction Set Principles and Examples. Appendix B
Instruction Set Principles and Examples Appendix B Outline What is Instruction Set Architecture? Classifying ISA Elements of ISA Programming Registers Type and Size of Operands Addressing Modes Types of
More informationRISC I from Berkeley. 44k Transistors 1Mhz 77mm^2
The Case for RISC RISC I from Berkeley 44k Transistors 1Mhz 77mm^2 2 MIPS: A Classic RISC ISA Instructions 4 bytes (32 bits) 4-byte aligned Instructions operate on memory and registers Memory Data types
More informationForecast. Instructions (354 Review) Basics. Basics. Instruction set architecture (ISA) is its vocabulary. Instructions are the words of a computer
Instructions (354 Review) Forecast Instructions are the words of a computer Instruction set architecture (ISA) is its vocabulary With a few other things, this defines the interface of computers But implementations
More informationIntroduction to the MIPS. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University
Introduction to the MIPS Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University Introduction to the MIPS The Microprocessor without Interlocked Pipeline Stages
More informationCS/COE1541: Introduction to Computer Architecture
CS/COE1541: Introduction to Computer Architecture Dept. of Computer Science University of Pittsburgh http://www.cs.pitt.edu/~melhem/courses/1541p/index.html 1 Computer Architecture? Application pull Operating
More informationCHAPTER 5 A Closer Look at Instruction Set Architectures
CHAPTER 5 A Closer Look at Instruction Set Architectures 5.1 Introduction 199 5.2 Instruction Formats 199 5.2.1 Design Decisions for Instruction Sets 200 5.2.2 Little versus Big Endian 201 5.2.3 Internal
More informationLecture 4: Instruction Set Design/Pipelining
Lecture 4: Instruction Set Design/Pipelining Instruction set design (Sections 2.9-2.12) control instructions instruction encoding Basic pipelining implementation (Section A.1) 1 Control Transfer Instructions
More informationComputer Organization MIPS ISA
CPE 335 Computer Organization MIPS ISA Dr. Iyad Jafar Adapted from Dr. Gheith Abandah Slides http://www.abandah.com/gheith/courses/cpe335_s08/index.html CPE 232 MIPS ISA 1 (vonneumann) Processor Organization
More informationCS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 4
CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2018 Lecture 4 LAST TIME Enhanced our processor design in several ways Added branching support Allows programs where work is proportional to the input values
More informationCSIS1120A. 10. Instruction Set & Addressing Mode. CSIS1120A 10. Instruction Set & Addressing Mode 1
CSIS1120A 10. Instruction Set & Addressing Mode CSIS1120A 10. Instruction Set & Addressing Mode 1 Elements of a Machine Instruction Operation Code specifies the operation to be performed, e.g. ADD, SUB
More informationCommunicating with People (2.8)
Communicating with People (2.8) For communication Use characters and strings Characters 8-bit (one byte) data for ASCII lb $t0, 0($sp) ; load byte Load a byte from memory, placing it in the rightmost 8-bits
More informationSlide Set 5. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng
Slide Set 5 for ENCM 369 Winter 2018 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary February 2018 ENCM 369 Winter 2018 Section
More informationInteger Multiplication and Division
Integer Multiplication and Division for ENCM 369: Computer Organization Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 208 Integer
More informationComputer Architecture I: Outline and Instruction Set Architecture. CENG331 - Computer Organization. Murat Manguoglu
Computer Architecture I: Outline and Instruction Set Architecture CENG331 - Computer Organization Murat Manguoglu Adapted from slides of the textbook: http://csapp.cs.cmu.edu/ Outline Background Instruction
More informationInstructions: Language of the Computer
Instructions: Language of the Computer Tuesday 22 September 15 Many slides adapted from: and Design, Patterson & Hennessy 5th Edition, 2014, MK and from Prof. Mary Jane Irwin, PSU Summary Previous Class
More informationComputer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture
Computer Science 324 Computer Architecture Mount Holyoke College Fall 2007 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture. Idea:
More informationSlide Set 9. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng
Slide Set 9 for ENCM 369 Winter 2018 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary March 2018 ENCM 369 Winter 2018 Section 01
More informationELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2)
ELEC 5200-001/6200-001 Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2) Victor P. Nelson, Professor & Asst. Chair Vishwani D. Agrawal, James J. Danaher Professor Department
More informationSlide Set 4. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng
Slide Set 4 for ENCM 369 Winter 2018 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary January 2018 ENCM 369 Winter 2018 Section
More informationChapter 2. Instructions: Language of the Computer. Adapted by Paulo Lopes
Chapter 2 Instructions: Language of the Computer Adapted by Paulo Lopes Instruction Set The repertoire of instructions of a computer Different computers have different instruction sets But with many aspects
More informationCHAPTER 5 A Closer Look at Instruction Set Architectures
CHAPTER 5 A Closer Look at Instruction Set Architectures 5.1 Introduction 293 5.2 Instruction Formats 293 5.2.1 Design Decisions for Instruction Sets 294 5.2.2 Little versus Big Endian 295 5.2.3 Internal
More informationChapter 1. Computer Abstractions and Technology. Lesson 3: Understanding Performance
Chapter 1 Computer Abstractions and Technology Lesson 3: Understanding Performance Manufacturing ICs 1.7 Real Stuff: The AMD Opteron X4 Yield: proportion of working dies per wafer Chapter 1 Computer Abstractions
More informationLecture 3: The Instruction Set Architecture (cont.)
Lecture 3: The Instruction Set Architecture (cont.) COS / ELE 375 Computer Architecture and Organization Princeton University Fall 2015 Prof. David August 1 Review: Instructions Computers process information
More informationLecture 3: The Instruction Set Architecture (cont.)
Lecture 3: The Instruction Set Architecture (cont.) COS / ELE 375 Computer Architecture and Organization Princeton University Fall 2015 Prof. David August 1 Review: Instructions Computers process information
More informationLecture 04: Machine Instructions
CSCI2510 Computer Organization Lecture 04: Machine Instructions Ming-Chang YANG mcyang@cse.cuhk.edu.hk Reading: Chap. 2.3~2.4, 2.10~2.11 Recall: Instructions & Program A computer is governed by instructions.
More informationChapter 2. Instruction Set Architecture (ISA)
Chapter 2 Instruction Set Architecture (ISA) MIPS arithmetic Design Principle: simplicity favors regularity. Why? Of course this complicates some things... C code: A = B + C + D; E = F - A; MIPS code:
More informationECE 486/586. Computer Architecture. Lecture # 8
ECE 486/586 Computer Architecture Lecture # 8 Spring 2015 Portland State University Lecture Topics Instruction Set Principles MIPS Control flow instructions Dealing with constants IA-32 Fallacies and Pitfalls
More informationComputer Architecture, RISC vs. CISC, and MIPS Processor
CSE 2421: Systems I Low-Level Programming and Computer Organization Computer Architecture, RISC vs. CISC, and MIPS Processor Gojko Babić 1-1-217 Computer Architecture A modern meaning of the term computer
More informationENCM 501 Winter 2016 Assignment 1 for the Week of January 25
page 1 of 5 ENCM 501 Winter 2016 Assignment 1 for the Week of January 25 Steve Norman Department of Electrical & Computer Engineering University of Calgary January 2016 Assignment instructions and other
More informationInstructions: Language of the Computer
CS359: Computer Architecture Instructions: Language of the Computer Yanyan Shen Department of Computer Science and Engineering 1 The Language a Computer Understands Word a computer understands: instruction
More informationLecture Topics. Branch Condition Options. Branch Conditions ECE 486/586. Computer Architecture. Lecture # 8. Instruction Set Principles.
ECE 486/586 Computer Architecture Lecture # 8 Spring 2015 Portland State University Instruction Set Principles MIPS Control flow instructions Dealing with constants IA-32 Fallacies and Pitfalls Reference:
More informationEC-801 Advanced Computer Architecture
EC-801 Advanced Computer Architecture Lecture 5 Instruction Set Architecture I Dr Hashim Ali Fall 2018 Department of Computer Science and Engineering HITEC University Taxila!1 Instruction Set Architecture
More informationInstructions: MIPS arithmetic. MIPS arithmetic. Chapter 3 : MIPS Downloaded from:
Instructions: Chapter 3 : MIPS Downloaded from: http://www.cs.umr.edu/~bsiever/cs234/ Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow Very restrictive
More informationSlide Set 5. for ENCM 501 in Winter Term, Steve Norman, PhD, PEng
Slide Set 5 for ENCM 501 in Winter Term, 2017 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 2017 ENCM 501 W17 Lectures: Slide
More informationENCM 501 Winter 2018 Assignment 2 for the Week of January 22 (with corrections)
page 1 of 5 ENCM 501 Winter 2018 Assignment 2 for the Week of January 22 (with corrections) Steve Norman Department of Electrical & Computer Engineering University of Calgary January 2018 Assignment instructions
More informationCISC 662 Graduate Computer Architecture. Lecture 4 - ISA
CISC 662 Graduate Computer Architecture Lecture 4 - ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,
More informationInterfacing Compiler and Hardware. Computer Systems Architecture. Processor Types And Instruction Sets. What Instructions Should A Processor Offer?
Interfacing Compiler and Hardware Computer Systems Architecture FORTRAN 90 program C++ program Processor Types And Sets FORTRAN 90 Compiler C++ Compiler set level Hardware 1 2 What s Should A Processor
More informationLecture Topics. Announcements. Today: The MIPS ISA (P&H ) Next: continued. Milestone #1 (due 1/26) Milestone #2 (due 2/2)
Lecture Topics Today: The MIPS ISA (P&H 2.1-2.14) Next: continued 1 Announcements Milestone #1 (due 1/26) Milestone #2 (due 2/2) Milestone #3 (due 2/9) 2 1 Evolution of Computing Machinery To understand
More informationECE 486/586. Computer Architecture. Lecture # 6
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
More informationECE/CS 552: Introduction To Computer Architecture 1. Instructor:Mikko H. Lipasti. University of Wisconsin-Madison. Basics Registers and ALU ops
ECE/CS 552: Instruction Sets Instructor:Mikko H. Lipasti Fall 2010 University of Wisconsin-Madison Lecture notes partially based on set created by Mark Hill. Instructions (354 Review) Instructions are
More informationEN164: Design of Computing Systems Topic 03: Instruction Set Architecture Design
EN164: Design of Computing Systems Topic 03: Instruction Set Architecture Design Professor Sherief Reda http://scale.engin.brown.edu Electrical Sciences and Computer Engineering School of Engineering Brown
More informationControl Instructions. Computer Organization Architectures for Embedded Computing. Thursday, 26 September Summary
Control Instructions Computer Organization Architectures for Embedded Computing Thursday, 26 September 2013 Many slides adapted from: Computer Organization and Design, Patterson & Hennessy 4th Edition,
More informationControl Instructions
Control Instructions Tuesday 22 September 15 Many slides adapted from: and Design, Patterson & Hennessy 5th Edition, 2014, MK and from Prof. Mary Jane Irwin, PSU Summary Previous Class Instruction Set
More informationCS4617 Computer Architecture
1/27 CS4617 Computer Architecture Lecture 7: Instruction Set Architectures Dr J Vaughan October 1, 2014 2/27 ISA Classification Stack architecture: operands on top of stack Accumulator architecture: 1
More informationPart II Instruction-Set Architecture. Jan Computer Architecture, Instruction-Set Architecture Slide 1
Part II Instruction-Set Architecture Jan. 211 Computer Architecture, Instruction-Set Architecture Slide 1 Short review of the previous lecture Performance = 1/(Execution time) = Clock rate / (Average CPI
More informationCS3350B Computer Architecture MIPS Introduction
CS3350B Computer Architecture MIPS Introduction Marc Moreno Maza http://www.csd.uwo.ca/~moreno/cs3350_moreno/index.html Department of Computer Science University of Western Ontario, Canada Thursday January
More information1 5. Addressing Modes COMP2611 Fall 2015 Instruction: Language of the Computer
1 5. Addressing Modes MIPS Addressing Modes 2 Addressing takes care of where to find data instruction We have seen, so far three addressing modes of MIPS (to find data): 1. Immediate addressing: provides
More informationECE 154A Introduction to. Fall 2012
ECE 154A Introduction to Computer Architecture Fall 2012 Dmitri Strukov Lecture 4: Arithmetic and Data Transfer Instructions Agenda Review of last lecture Logic and shift instructions Load/store instructionsi
More informationReduced Instruction Set Computer (RISC)
Reduced Instruction Set Computer (RISC) Focuses on reducing the number and complexity of instructions of the ISA. RISC Goals RISC: Simplify ISA Simplify CPU Design Better CPU Performance Motivated by simplifying
More informationMachine Language Instructions Introduction. Instructions Words of a language understood by machine. Instruction set Vocabulary of the machine
Machine Language Instructions Introduction Instructions Words of a language understood by machine Instruction set Vocabulary of the machine Current goal: to relate a high level language to instruction
More informationChapter 3 MIPS Assembly Language. Ó1998 Morgan Kaufmann Publishers 1
Chapter 3 MIPS Assembly Language Ó1998 Morgan Kaufmann Publishers 1 Instructions: Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow Very restrictive
More information#1 #2 with corrections Monday, March 12 7:00pm to 8:30pm. Please do not write your U of C ID number on this cover page.
page 1 of 6 University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Lecture Instructors: Steve Norman and Norm Bartley Winter 2018 MIDTERM TEST #1 #2 with
More informationCourse Administration
Fall 2017 EE 3613: Computer Organization Chapter 2: Instruction Set Architecture 2/4 Avinash Kodi Department of Electrical Engineering & Computer Science Ohio University, Athens, Ohio 45701 E-mail: kodi@ohio.edu
More informationCSCI 402: Computer Architectures. Instructions: Language of the Computer (3) Fengguang Song Department of Computer & Information Science IUPUI.
CSCI 402: Computer Architectures Instructions: Language of the Computer (3) Fengguang Song Department of Computer & Information Science IUPUI Recall Big endian, little endian Memory alignment Unsigned
More informationISA and RISCV. CASS 2018 Lavanya Ramapantulu
ISA and RISCV CASS 2018 Lavanya Ramapantulu Program Program =?? Algorithm + Data Structures Niklaus Wirth Program (Abstraction) of processor/hardware that executes 3-Jul-18 CASS18 - ISA and RISCV 2 Program
More informationEvolution of ISAs. Instruction set architectures have changed over computer generations with changes in the
Evolution of ISAs Instruction set architectures have changed over computer generations with changes in the cost of the hardware density of the hardware design philosophy potential performance gains One
More informationENCM 369 Winter 2016 Lab 11 for the Week of April 4
page 1 of 13 ENCM 369 Winter 2016 Lab 11 for the Week of April 4 Steve Norman Department of Electrical & Computer Engineering University of Calgary April 2016 Lab instructions and other documents for ENCM
More informationComputer Organization and Components
2 Course Structure Computer Organization and Components Module 4: Memory Hierarchy Module 1: Logic Design IS1500, fall 2014 Lecture 4: and F1 DC Ö1 F2 DC Ö2 F7b Lab: dicom F8 Module 2: C and Associate
More informationStored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands
Stored Program Concept Instructions: Instructions are bits Programs are stored in memory to be read or written just like data Processor Memory memory for data, programs, compilers, editors, etc. Fetch
More informationCS3350B Computer Architecture MIPS Instruction Representation
CS3350B Computer Architecture MIPS Instruction Representation Marc Moreno Maza http://www.csd.uwo.ca/~moreno/cs3350_moreno/index.html Department of Computer Science University of Western Ontario, Canada
More informationEITF20: Computer Architecture Part2.1.1: Instruction Set Architecture
EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture Liang Liu liang.liu@eit.lth.se 1 Outline Reiteration Instruction Set Principles The Role of Compilers MIPS 2 Main Content Computer
More informationCISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization
CISC 662 Graduate Computer Architecture Lecture 4 - ISA MIPS ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,
More informationInstruction Set Architectures
Instruction Set Architectures! ISAs! Brief history of processors and architectures! C, assembly, machine code! Assembly basics: registers, operands, move instructions 1 What should the HW/SW interface
More informationMIPS ISA AND PIPELINING OVERVIEW Appendix A and C
1 MIPS ISA AND PIPELINING OVERVIEW Appendix A and C OUTLINE Review of MIPS ISA Review on Pipelining 2 READING ASSIGNMENT ReadAppendixA ReadAppendixC 3 THEMIPS ISA (A.9) First MIPS in 1985 General-purpose
More information