Computer Architecture CSE 3322 Lecture 2 NO CLASS MON Sept 1 Course WEB SITE crystal.uta.edu/~jpatters.

Slides:



Advertisements
Similar presentations
MIPS Assembly Tutorial
Advertisements

1 Lecture 3: MIPS Instruction Set Today’s topic:  More MIPS instructions  Procedure call/return Reminder: Assignment 1 is on the class web-page (due.
Goal: Write Programs in Assembly
Lecture 5: MIPS Instruction Set
1 ECE462/562 ISA and Datapath Review Ali Akoglu. 2 Instruction Set Architecture A very important abstraction –interface between hardware and low-level.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 2: IT Students.
1 ECE369 ECE369 Chapter 2. 2 ECE369 Instruction Set Architecture A very important abstraction –interface between hardware and low-level software –standardizes.
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 5 MIPS ISA & Assembly Language Programming.
ELEN 468 Advanced Logic Design
Chapter 2 Instructions: Language of the Computer
Chapter 2.
Fall EE 333 Lillevik 333f06-l4 University of Portland School of Engineering Computer Organization Lecture 4 Assembly language programming ALU and.
Datorteknik DatapathControl bild 1 Designing a Single Cycle Datapath & Datapath Control.
Chapter 2 Instructions: Language of the Computer Part III.
Instructions Set Bo Cheng Instruction Set Design An Instruction Set provides a functional description of a processor. It is the visible.
MIPS Architecture CPSC 321 Computer Architecture Andreas Klappenecker.
Computer Architecture CPSC 321 E. J. Kim. Overview Logical Instructions Shifts.
1 Lecture 2: MIPS Instruction Set Today’s topic:  MIPS instructions Reminder: sign up for the mailing list cs3810 Reminder: set up your CADE accounts.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Lecture 5 Sept 14 Goals: Chapter 2 continued MIPS assembly language instruction formats translating c into MIPS - examples.
ECE 4436ECE 5367 ISA I. ECE 4436ECE 5367 CPU = Seconds= Instructions x Cycles x Seconds Time Program Program Instruction Cycle CPU = Seconds= Instructions.
Processor I CPSC 321 Andreas Klappenecker. Midterm 1 Thursday, October 7, during the regular class time Covers all material up to that point History MIPS.
CS 300 – Lecture 6 Intro to Computer Architecture / Assembly Language Instructions.
MIPS Instruction Set Advantages
CSE331 W02.1Irwin Fall 2001 PSU Computer Architecture Discussion Lecture # 2 MIPS Programming.
COSC 2021: Computer Organization Instructor: Dr. Amir Asif Department of Computer Science York University Handout # 3: MIPS Instruction Set I Topics: 1.
Computer Organization and Architecture Instructions: Language of the Machine Hennessy Patterson 2/E chapter 3. Notes are available with photocopier 24.
Computer Organization & Programming Chapter 6 Single Datapath CPU Architecture.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /08/2013 Lecture 10: MIPS Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL STATE.
CHAPTER 6 Instruction Set Architecture 12/7/
Computer Architecture CSE 3322 Lecture 3 Assignment: 2.4.1, 2.4.4, 2.6.1, , Due 2/3/09 Read 2.8.
Computer Organization Rabie A. Ramadan Lecture 3.
EET 4250 Instruction Representation & Formats Acknowledgements: Some slides and lecture notes for this course adapted from Prof. Mary Jane Penn.
Chapter 2 — Instructions: Language of the Computer — 1 Memory Operands Main memory used for composite data – Arrays, structures, dynamic data To apply.
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO Session 7, 8 Instruction Set Architecture.
Computer Organization Instructions Language of The Computer (MIPS) 2.
CMPUT Computer Organization and Architecture I1 CMPUT229 - Fall 2003 Topic3: Instructions, The Language of the Machine José Nelson Amaral.
CHAPTER 2 Instruction Set Architecture 3/21/
Access the Instruction from Memory
MIPS Instruction Set Advantages
COMPUTER ARCHITECTURE & OPERATIONS I
Instruction Set Architecture
Morgan Kaufmann Publishers
Introduction CPU performance factors
MIPS Coding Continued.
Lecture 4: MIPS Instruction Set
ELEN 468 Advanced Logic Design
Computer Architecture (CS 207 D) Instruction Set Architecture ISA
Computer Architecture & Operations I
CS170 Computer Organization and Architecture I
Instructions - Type and Format
Lecture 4: MIPS Instruction Set
Systems Architecture I (CS ) Lecture 5: MIPS Instruction Set*
Computer Architecture & Operations I
MIPS Instruction Encoding
Datapath & Control MIPS
The University of Adelaide, School of Computer Science
ECE232: Hardware Organization and Design
September 24 Test 1 review More programming
Rocky K. C. Chang 6 November 2017
MIPS Instruction Encoding
COMS 361 Computer Organization
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
COMP541 Datapaths I Montek Singh Mar 18, 2010.
COMS 361 Computer Organization
COMS 361 Computer Organization
MIPS Coding Continued.
Systems Architecture I (CS ) Lecture 5: MIPS Instruction Set*
The Processor: Datapath & Control.
Instruction Set Architecture
Presentation transcript:

Computer Architecture CSE 3322 Lecture 2 NO CLASS MON Sept 1 Course WEB SITE crystal.uta.edu/~jpatters

Computer Generations Overview GenerationTechnologyPrinciple Product Adj Price/ Perfomance RelaysResearch Model NA

Computer Generations Overview GenerationTechnologyPrinciple Product Adj Price/ Perfomance RelaysResearch Model NA Vacuum Tubes Mag Core Commercial Monsters 1 (UNIVAC )

Computer Generations Overview GenerationTechnologyPrinciple Product Adj Price/ Perfomance RelaysResearch Model NA Vacuum Tubes Mag Core Commercial Monsters 1 (UNIVAC ) Transistors Mag Core Most Large Corp/Univ 318

Computer Generations Overview GenerationTechnologyPrinciple Product Adj Price/ Perfomance RelaysResearch Model NA Vacuum Tubes Mag Core Commercial Monsters 1 (UNIVAC ) Transistors Mag Core Most Large Corp/Univ Integrated Circuits DRAM Minicomputer 13K

Computer Generations Overview GenerationTechnologyPrinciple Product Adj Price/ Perfomance RelaysResearch Model NA Vacuum Tubes Mag Core Commercial Monsters 1 (UNIVAC ) Transistors Mag Core Most Large Corp/Univ Integrated Circuits DRAM Minicomputer 13K VLSI DRAM Personal Computer 239M

Technological Growth DRAM Growth: 4X Capacity Every 3 Years

Technological Growth DRAM Growth: 4X Capacity Every 3 Years Workstation Performance Improvement: 54% per year or 2X every18 months

Technological Growth DRAM Growth: 4X Capacity Every 3 Years Workstation Performance Improvement: 54% per year or 2X every18 months Disk Drive Growth: Capacity More than 2x every year

Technological Growth DRAM Growth: 4X Capacity Every 3 Years Workstation Performance Improvement: 54% per year or 2X every18 months Disk Drive Growth: Capacity More than 2x every year All Continue to Drive Price /Performance Improvements

· Click The Picture To Share It With Your Friends ·

Five Components of Computers Input Output Memory Control Datapath Processor

Instruction Set Design Key Element in the Architecture –Function, Cost, Performance, etc.

Instruction Set Design Key Element in the Architecture –Function, Cost, Performance, etc. Typical Machine Instructions –Data Transfers ( reg-reg, reg-mem, mem-reg) –Arithmetic (add, subtract, multiply) –Logic & String (boolean, bit manipulations) –Program Control ( branches, jumps) –Input/Output Operations

Instruction Set Design Study the MIPS Architecture

Instruction Set Design Study the MIPS Architecture A WORD is 32 bits or 4 bytes wide for Registers and Memory

Instruction Set Design Study the MIPS Architecture A WORD is 32 bits or 4 bytes wide for Registers and Memory Each byte has Memory Address starting at 0

Instruction Set Design Study the MIPS Architecture A WORD is 32 bits or 4 bytes wide for Registers and Memory Each byte has Memory Address starting at 0 WORD Addresses start at 0 and are multiples of 4

Instruction Set Design Study the MIPS Architecture A WORD is 32 bits or 4 bytes wide for Registers and Memory Each byte has Memory Address starting at 0 WORD Addresses start at 0 and are multiples of 4 Big-endian Byte 0, Byte 1, Byte 2, Byte 3 Little-endian Byte 3, Byte 2, Byte 1, Byte 0

Instruction Set Design Study the MIPS Architecture A WORD is 32 bits or 4 bytes wide for Registers and Memory Each byte has Memory Address starting at 0 WORD Addresses start at 0 and are multiples of 4 Big-endian Byte 0, Byte 1, Byte 2, Byte 3 Little-endian Byte 3, Byte 2, Byte 1, Byte 0 32 Registers with Conventions on Use

b3 b2 b1 b0 b7 b6 b5 b4 b11 b10 b9 b8 bM Memory Registers N bits

MIPS Assembly Instructions Instruction Example Meaning add add $s1, $s2, $s3 $s1 = $s2 + $s3 subtract sub $s1, $s2, $s3 $s1 = $s2 - $s3 $s1, $s2, $s3, … are registers. The $ indicates a Register in the MIPS Assembly Language

MIPS Assembly Instructions Instruction Example Meaning add add $s1, $s2, $s3 $s1 = $s2 + $s3 subtract sub $s1, $s2, $s3 $s1 = $s2 - $s3 $s1, $s2, $s3, … are registers. The $ indicates a Register in the MIPS Assembly Language Also $s2 + $s3 $s1

Machine Instruction Format Instr Format op rs rt rd shamt funct add R 0 reg reg reg 0 32 sub R 0 reg reg reg 0 34 bits R Type Instruction op : opcode rd : register destination operand rs : reg source 1 operand shamt : shift amount rt : reg source 2 operand funct : function code – variant of operation

Machine Instruction Format Instr Format op rs rt rd shamt funct add R bits add $t0, $s2, $t0 where $t0 is reg 8, $s2 is reg 18 $t0 = $s2 + $t0

Machine Instruction Format Instr Format op rs rt rd shamt funct add R bits Example of Machine Language Instruction op rs rt rd shamt funct add $t0, $s2, $t0 where $t0 is reg 8, $s2 is reg 18 $t0 = $s2 + $t0

MIPS Assembly Instructions Instruction Example Meaning load word lw $s1, 300 ($s2) $s1 = Mem[$s2+300] store word sw $s1, 300 ($s2) Mem[$s2+300] = $s1 $s1, $s2, $s3, … are registers 300 is a constant

Machine Instruction Format Instr Format op rs rt address/ immediate lw I 35 reg reg constant sw I 43 reg reg constant bits I Type Instruction op : opcode rs : reg address operand rt : reg destination or source operand lw $s1, 300 ($s2)

C statement: A[i] = h + A[i] A[i] & h are integers where A is an array with base in $s3 h is in $s1 i is in $s2

A[i] A[3] A[2] A[1] A[0] Base + 4 * i Base + 12 Base + 8 Base + 4 Base Words in an Array in memory are 4 bytes apart, so the Address increments by 4. C statement: A[i] = h + A[i], A[i] & h are integers where A is an array with base in $s3 h is in $s1 i is in $s2

Compiles into assembly code: # denotes comments C statement: A[i] = h + A[i] where A is an array with base in $s3 h is in $s1 i is in $s2

Compiles into assembly code: # denotes comments # Compute Address of A[i]: Base + 4*i C statement: A[i] = h + A[i] where A is an array with base in $s3 h is in $s1 i is in $s2

Compiles into assembly code: # Compute Address of A[i ]: Base + 4*i add $t1, $s2, $s2 # Temp reg $t1 = i + i =2i add $t1, $t1, $t1 # Temp reg $t1 = 2i +2i = 4i C statement: A[i] = h + A[i] where A is an array with base in $s3 h is in $s1 i is in $s2

Compiles into assembly code: # Compute Address of A[i ]: Base + 4*i add $t1, $s2, $s2 # Temp reg $t1 = i + i =2i add $t1, $t1, $t1 # Temp reg $t1 = 2i +2i = 4i add $t1, $t1, $s3# $t1 = address of A[i] C statement: A[i] = h + A[i] where A is an array with base in $s3 h is in $s1 i is in $s2

Compiles into assembly code: # Compute Address of A[i ]: Base + 4*i add $t1, $s2, $s2 # Temp reg $t1 = i + i =2i add $t1, $t1, $t1 # Temp reg $t1 = 2i +2i = 4i add $t1, $t1, $s3# $t1 = address of A[i] # Compute the new A[i] lw $t2, 0($t1)# Temp reg $t2 = A[i] C statement: A[i] = h + A[i] where A is an array with base in $s3 h is in $s1 i is in $s2

Compiles into assembly code: # Compute Address of A[i] : Base + 4*i add $t1, $s2, $s2 # Temp reg $t1 = i + i =2i add $t1, $t1, $t1 # Temp reg $t1 = 2i +2i = 4i add $t1, $t1, $s3# $t1 = address of A[i] # Compute the new A[i] lw $t2, 0($t1)# Temp reg $t2 = A[i] add $t2, $t2, $s1# $t2 = A[i] + h C statement: A[i] = h + A[i] where A is an array with base in $s3 h is in $s1 i is in $s2

Compiles into assembly code: # Compute Address of A[i] : Base + 4*i add $t1, $s2, $s2 # Temp reg $t1 = i + i =2i add $t1, $t1, $t1 # Temp reg $t1 = 2i +2i = 4i add $t1, $t1, $s3# $t1 = address of A[i] # Compute the new A[i] lw $t2, 0($t1)# Temp reg $t2 = A[i] add $t2, $t2, $s1# $t2 = A[i] + h sw $t2, 0($t1)# Store $t2 into A[i] C statement: A[i] = h + A[i] where A is an array with base in $s3 h is in $s1 i is in $s2

lw $t2, 0($t1)# Temp reg $t2 = A[i] add $t2, $t2, $s1# $t2 = A[i] + h sw $t2, 0($t1)# Store $t2 into A[i] $s1~17, $t1~9, $t2~10 Translate to MIPS Machine language using decimal op rs rt rd address/shamt funct

lw $t2, 0($t1)# Temp reg $t2 = A[i] add $t2, $t2, $s1# $t2 = A[i] + h sw $t2, 0($t1)# Store $t2 into A[i] $s1~17, $t1~9, $t2~10 Translate to MIPS Machine language using decimal op rs rt rd address/shamt funct 35

lw $t2, 0($t1)# Temp reg $t2 = A[i] add $t2, $t2, $s1# $t2 = A[i] + h sw $t2, 0($t1)# Store $t2 into A[i] $s1~17, $t1~9, $t2~10 Translate to MIPS Machine language using decimal op rs rt rd address/shamt funct

lw $t2, 0($t1)# Temp reg $t2 = A[i] add $t2, $t2, $s1# $t2 = A[i] + h sw $t2, 0($t1)# Store $t2 into A[i] $s1~17, $t1~9, $t2~10 Translate to MIPS Machine language using decimal op rs rt rd address/shamt funct

lw $t2, 0($t1)# Temp reg $t2 = A[i] add $t2, $t2, $s1# $t2 = A[i] + h sw $t2, 0($t1)# Store $t2 into A[i] $s1~17, $t1~9, $t2~10 Translate to MIPS Machine language using decimal op rs rt rd address/shamt funct

lw $t2, 0($t1)# Temp reg $t2 = A[i] add $t2, $t2, $s1# $t2 = A[i] + h sw $t2, 0($t1)# Store $t2 into A[i] $s1~17, $t1~9, $t2~10 Translate to MIPS Machine language using decimal op rs rt rd address/shamt funct Translate to MIPS Machine language using binary

lw $t2, 0($t1)# Temp reg $t2 = A[i] add $t2, $t2, $s1# $t2 = A[i] + h sw $t2, 0($t1)# Store $t2 into A[i] $s1~17, $t1~9, $t2~10 Translate to MIPS Machine language using decimal op rs rt rd address/shamt funct Translate to MIPS Machine language using binary

lw $t2, 0($t1)# Temp reg $t2 = A[i] add $t2, $t2, $s1# $t2 = A[i] + h sw $t2, 0($t1)# Store $t2 into A[i] $s1~17, $t1~9, $t2~10 Translate to MIPS Machine language using decimal op rs rt rd address/shamt funct Translate to MIPS Machine language using binary

Two Key Principles Instructions are represented the same as numbers Programs are stored in memory to be read or written just like numbers

Two Key Principles Instructions are represented as numbers Programs are stored in memory to be read or written just like numbers This is the Stored Program Concept –Programs can operate on other programs!