MIPS Architecture CPSC 321 Computer Architecture Andreas Klappenecker.

Slides:



Advertisements
Similar presentations
Lecture 5: MIPS Instruction Set
Advertisements

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.
Chapter 2 Instructions: Language of the Computer Part III.
Informationsteknologi Saturday, September 29, 2007 Computer Architecture I - Class 41 Today’s class More assembly language programming.
Assembly Language II CPSC 321 Andreas Klappenecker.
MIPS Assembly Language I Computer Architecture CPSC 321 Andreas Klappenecker.
Computer Architecture CPSC 321 E. J. Kim. Overview Logical Instructions Shifts.
S. Barua – CPSC 440 CHAPTER 2 INSTRUCTIONS: LANGUAGE OF THE COMPUTER Goals – To get familiar with.
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.
Computer Architecture - The Instruction Set The Course’s Goals  To be interesting and fun. An interested student learns more.  To answer questions that.
The Datapath Andreas Klappenecker CPSC321 Computer Architecture.
ECE 4436ECE 5367 ISA I. ECE 4436ECE 5367 CPU = Seconds= Instructions x Cycles x Seconds Time Program Program Instruction Cycle CPU = Seconds= Instructions.
Datapath and Control Andreas Klappenecker CPSC321 Computer Architecture.
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.
ISA-2 CSCE430/830 MIPS: Case Study of Instruction Set Architecture CSCE430/830 Computer Architecture Instructor: Hong Jiang Courtesy of Prof. Yifeng Zhu.
Computer Architecture Instruction Set Architecture Lynn Choi Korea University.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
1  1998 Morgan Kaufmann Publishers Machine Instructions: Language of the Machine Lowest level of programming, control directly the hardware Assembly instructions.
April 23, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Assemblers, Linkers, and Loaders * Jeremy R. Johnson Mon. April 23,
Computer Architecture CSE 3322 Lecture 2 NO CLASS MON Sept 1 Course WEB SITE crystal.uta.edu/~jpatters.
CDA 3101 Fall 2013 Introduction to Computer Organization
Computer Architecture (CS 207 D) Instruction Set Architecture ISA.
Computer Organization & Programming Chapter 6 Single Datapath CPU Architecture.
CMPE 325 Computer Architecture II
CHAPTER 6 Instruction Set Architecture 12/7/
Chapter 2 CSF 2009 The MIPS Assembly Language. Stored Program Computers Instructions represented in binary, just like data Instructions and data stored.
Computer Organization CS224 Fall 2012 Lessons 7 and 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 9 Binary Representation and Logical Operations.
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.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
CS Computer Organization Numbers and Instructions Dr. Stephen P. Carl.
CHAPTER 2 Instruction Set Architecture 3/21/
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
Access the Instruction from Memory
Electrical and Computer Engineering University of Cyprus
Computer Architecture Instruction Set Architecture
COMPUTER ARCHITECTURE & OPERATIONS I
Instruction Set Architecture
Computer Architecture Instruction Set Architecture
CS161 – Design and Architecture of Computer Systems
ELEN 468 Advanced Logic Design
RISC Concepts, MIPS ISA Logic Design Tutorial 8.
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Computer Architecture (CS 207 D) Instruction Set Architecture ISA
Computer Architecture & Operations I
Super Quick Architecture Review
Control Path Catholic University PUCRS.
CSCI206 - Computer Organization & Programming
Instructions - Type and Format
Computer Architecture & Operations I
Datapath & Control MIPS
The University of Adelaide, School of Computer Science
ECE232: Hardware Organization and Design
Instruction encoding The ISA defines Format = Encoding
COMP541 Datapaths I Montek Singh Mar 18, 2010.
COMS 361 Computer Organization
Instruction encoding The ISA defines Format = Encoding
Review Fig 4.15 page 320 / Fig page 322
Instruction encoding The ISA defines Format = Encoding
Systems Architecture I (CS ) Lecture 5: MIPS Instruction Set*
Instruction Set Architecture
COMS 361 Computer Organization
Presentation transcript:

MIPS Architecture CPSC 321 Computer Architecture Andreas Klappenecker

MIPS Design Paradigms Simplicity favors regularity all instructions single size three register operands in arithmetic instr. keep register fields in the same place Smaller is faster 32 registers Make good compromises large addresses and constants versus unique instruction length Make the common case fast PC-relative addressing for conditional branches

Basic Functional Components Control unit Register file Arithmetic logic unit (ALU) Program counter (PC) Memory Instruction register (IR)

Simplified Datapath Diagram Program Counter (PC) Instruction Register Register File ALU Memory Data In Address 4 Rs Rt Rd Control Logic

MIPS R2000 Several firsts: First RISC microprocessor First microprocessor to provide integrated support for instruction & data cache First pipelined microprocessor (sustains 1 instruction/clock) Implemented in ,000 transistors 5-8 MIPS

0$zero 1$at 2$v0 3$v1 4$a0 5$a1 6$a2 7$a3 8$t0 9$t1 10$t2 11$t3 12$t4 13$t5 14$t6 15$t7 16$s0 17$s1 18$s2 19$s3 20$s4 21$s5 22$s6 23$s7 24$t8 NumberNameValue Registers pass parameters to functions return values from functions $s0-$s7 are callee-saved registers – use these registers for values that must be maintained across function calls. $t0-$t7 are caller saved registers – use these registers in functions

Instruction Word Formats Register format Immediate format Jump format op-code rs rt rd shamt funct op-code rs rt immediate value op-code 26 bit current segment address

Register Format (R-Format) Register format op: basic operation of instruction funct: variant of instruction rs: first register source operand rt: second register source operand rd: register destination operand shamt: shift amount op-code rs rt rd shamt funct

R-Format Example Register format (op, funct)=(0,32): add rs=17: first source operand is $s1 rt=18: second source operand is $s2 Rd=8: register destination is $t0 add $t0, $s1, $s

Immediate Format (I-Format) Immediate format op determines the instruction rs is the source register rt is the destination register 16bit immediate value op rs rt immediate value

I-Format Example Immediate format op=8 means addi rs=29 means source register is $sp rt=29 means $sp is destination register immediate value = 4 addi $sp, $sp,

How can we load a 32bit constant? How can we load $s0 with Load upper 16bits with lui $s0, Ox003d so that $s0 contains Add immediate 16bit value to complete load addi $s0, $s0, 0x0900 so that $s0 contains value

MIPS Addressing Modes Register addressing Base displacement addressing Immediate addressing PC-relative addressing address is the sum of the PC and a constant in the instruction Pseudo-direct addressing jump address is 26bits of instruction concatenated with upper bits of PC

What next? Details of the arithmetic logic unit Chapter 4 Project: Build your own ALU Details of datapath and control Chapter 5 Project: Build your own CPU Pipelining Caching