Team Brian Leslie Stephen Brenner Brian Leslie Ben Whitcher

Slides:



Advertisements
Similar presentations
Integer Arithmetic: Multiply, Divide, and Bitwise Operations
Advertisements

Lecture 5: MIPS Instruction Set
Group Number One GITHU Processor Tom Bozic Ian Nuber Greg Ramsey Henry Romero Matt Unangst.
CMPT 334 Computer Organization Chapter 2 Instructions: Language of the Computer [Adapted from Computer Organization and Design 5 th Edition, Patterson.
Introduction to PipelineCS510 Computer ArchitecturesLecture Lecture 6 Introduction to Pipelining.
Computer Structure - Computer Arithmetic Goal: Representing Numbers in Binary  Base 10 (decimal) - Numbers are represented using 10 numerals: 0, 1, 2,
EECS 362 Group 2: Kevin Cheung Michael Glowacki Alex Romine Dave Sexton.
Computer Systems Organization: Lecture 3
Logical & shift ops (1) Fall 2007 Lecture 05: Logical Operations.
Lecture 5 Sept 14 Goals: Chapter 2 continued MIPS assembly language instruction formats translating c into MIPS - examples.
ECE 15B Computer Organization Spring 2010 Dmitri Strukov Lecture 6: Logic/Shift Instructions Partially adapted from Computer Organization and Design, 4.
MIPS on FLEET Amir Kamil. Goals Run most MIPS assembly code on FLEET  Attempt to duplicate level of support in SPIM interpreter  MIPS assembly translated.
1  1998 Morgan Kaufmann Publishers Chapter Four Arithmetic for Computers.
Chapter 3 Arithmetic for Computers. Arithmetic Where we've been: Abstractions: Instruction Set Architecture Assembly Language and Machine Language What's.
Week 3 Presentation Kevin Cheung Michael Glowacki Alex Romine Dave Sexton.
VHDL Synthesis of a MIPS-32 Processor Bryan Allen Dave Chandler Nate Ransom.
IT253: Computer Organization Lecture 5: Assembly Language and an Introduction to MIPS Tonga Institute of Higher Education.
Computer Organization and Design Instruction Sets Montek Singh Wed, Sep 12, 2012 Lecture 5.
CSE378 Instr. encoding.1 Instruction encoding The ISA defines –The format of an instruction (syntax) –The meaning of the instruction (semantics) Format.
1. 2 Instructions: Words of the language understood by CPU Instruction set: CPU’s vocabulary Instruction Set Architecture (ISA): CPU’s vocabulary together.
Computer Architecture Chapter 3 Instructions: Arithmetic for Computer Yu-Lun Kuo 郭育倫 Department of Computer Science and Information Engineering Tunghai.
Chapter 10 The Assembly Process. What Assemblers Do Translates assembly language into machine code. Assigns addresses to all symbolic labels (variables.
MIPS Logic & Shift. Bitwise Logic Bitwise operations : logical operations applied to each bit Bitwise OR:
True Assembly Language Part I. The Assembly Process The process of translating a MAL code (an assembly language program) into machine code (a sequence.
MIPS coding. Review Shifting – Shift Left Logical (sll) – Shift Right Logical (srl) – Moves all of the bits to the left/right and fills in gap with 0’s.
RISC Processor Design RISC Instruction Set Virendra Singh Indian Institute of Science Bangalore Lecture 8 SE-273: Processor Design.
Computer Organization CS224 Fall 2012 Lessons 7 and 8.
EI 209 Chapter 3.1CSE, 2015 EI 209 Computer Organization Fall 2015 Chapter 3: Arithmetic for Computers Haojin Zhu ( )
MIPS Instructions Instructions: Language of the Machine
MIPS Assembly Language Chapter 13 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
Integer Multiplication, Division Arithmetic shift Twice the number of places MIPS multiply unit. mult, multu Significant bits Mfhi, mflo, div, divu Arithmetic.
1 Signed Arithmetic Logical Operations Ellen Spertus MCS 111 October 1, 2002.
CMPUT Computer Organization and Architecture I1 CMPUT229 - Fall 2003 Topic6: Logic, Multiply and Divide Operations José Nelson Amaral.
MIPS Assembly Language Chapter 15 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer, 2003.
CDA 3101 Spring 2016 Introduction to Computer Organization
COM181 Computer Hardware Lecture 6: The MIPs CPU.
Oct. 11, 2000Machine Organization1 Machine Organization (CS 570) Lecture 3: Instruction Set Principles and Examples * Jeremy R. Johnson Wed. Oct. 11, 2000.
Pirouz Bazargan SabetDecember 2003 Effective Implementation of a 32-bit RISC Processor Pirouz Bazargan Sabet University of Paris 6 - LIP6 - ASIM
MIPS Arithmetic and Logic Instructions
CS Computer Organization Numbers and Instructions Dr. Stephen P. Carl.
CSE 340 Computer Architecture Spring 2016 MIPS Arithmetic Review.
Instructor: Prof. Hany H Ammar, LCSEE, WVU
Integer Multiplication, Division Arithmetic shift
Computer Organization and Design Instruction Sets - 2
Computer Organization and Design Instruction Sets - 2
ENGR 3410 – Computer Architecture Mark L. Chang Fall 2006
Computer Organization and Design Instruction Sets
MPIS Instructions Functionalities of instructions Instruction format
MISP Assembly.
How to represent signed integers
ECE232: Hardware Organization and Design
The University of Adelaide, School of Computer Science
Part II Instruction-Set Architecture
MIPS Assembly.
/ Computer Architecture and Design
Flow of Control -- Conditional branch instructions
Basic Building Blocks Multiplexer Demultiplexer Adder +
Team Stephen Brenner Brian Leslie Ben Whitcher
Logical instructions And rd rs rt Nor rd rs rt Or rd rs rt
Basic Building Blocks Multiplexer Demultiplexer Adder +
MIPS Assembly.
Flow of Control -- Conditional branch instructions
MIPS assembly.
CS352H Computer Systems Architecture
Reduced Instruction Set Computer (RISC)
Logical Instructions And rd rs rt Nor rd rs rt Or rd rs rt
MIPS Arithmetic and Logic Instructions
MIPS Arithmetic and Logic Instructions
7/6/
MIPS instructions.
Presentation transcript:

Team Brian Leslie Stephen Brenner Brian Leslie Ben Whitcher DLX Register Ops Team Brian Leslie Stephen Brenner Brian Leslie Ben Whitcher

Instruction Types I-type (immediate) R-type (register to register) J-type (jump)

Arithmetic & Logical Instructions Shift Set-On-Comparison

Arithmetic ADD, SUB, MULT, DIV ADDI, SUBI ADDU, SUBU, MULTU, DIVU Two registers ADDI, SUBI Register & 16-bit immediate ADDU, SUBU, MULTU, DIVU Treats source register as unsigned integer ADDUI, SUBUI

Arithmetic examples ADD R1, R2, R3 SUBI R1, R2, #2 Regs[R1] <- Regs[R2] + Regs[R3] SUBI R1, R2, #2 Regs[R1] <- Regs[R2] + 2

Logical AND, OR, XOR, ANDI, ORI, XORI, LHI LHI: Load High Immediate Places 16-bit immediate into the most significant portion of destination register. Fills remaining portion with 0s

Logical examples AND R1, R2, R3 LHI R1, 0x42 Regs[R1] <- Regs[R2] & Regs[R3] LHI R1, 0x42 Regs[R1] <- 0x420000

Shift SLL, SLLI SRL, SRLI SRA, SRAI Shift Left Logical Shifts contents of a register left by the number of bits specified by the other value SRL, SRLI Shift Right Logical SRA, SRAI Shift Right Arithmetic Shifts contents of a register right. Keeps the same sign bit.

Shift examples SLL R1, R2, R3 SRAI R1, R2, 0x2 Regs[R1] <- Regs[R2] << Regs[R3] SRAI R1, R2, 0x2 Regs[R1] <- Regs[R2] >> 0x2 Keep R2’s sign

Set-On-Comparison Sets the destination register to: 1 when true, 0 when false SLT, SLTI Set Less Than SGT, SGTI Set Greater Than SLE, SLEI Set Less Than or Equal SGE, SGEI Set Greater Than or Equal SEQ, SEQI Set Equal SNE, SNEI Set Not Equal

Set-On-Comparison examples SLT R1, R2, R3 If (Regs[R2] < Regs[R3]) Regs[R1] <- 1 else Regs[R1] <- 0 SNEI R1, R2, 0x7 If (Regs[R2] != 0x7) Regs[R1] <- 1 else Regs[R1] <- 0