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.

Slides:



Advertisements
Similar presentations
MIPS assembly. Review  Lat lecture, we learnt  addi,  and, andi, or, ori, xor, xori, nor,  beq, j, bne  An array is stored sequentially in the memory.
Advertisements

ECE 15B Computer Organization Spring 2010 Dmitri Strukov Lecture 5: Data Transfer Instructions / Control Flow Instructions Partially adapted from Computer.
Comp Sci instruction encoding 1 Instruction Encoding MIPS machine language Binary encoding of instructions MIPS instruction = 32 bits Three instruction.
CPE 731 Advanced Computer Architecture Instruction Set Principles Dr. Gheith Abandah Adapted from the slides of Prof. David Patterson, University of California,
MIPS Assembler Programming
CS61CL Machine Structures Lec 6 – Number Representation David Culler Electrical Engineering and Computer Sciences University of California, Berkeley.
Lecture 5 Sept 14 Goals: Chapter 2 continued MIPS assembly language instruction formats translating c into MIPS - examples.
1 CS 430 Computer Architecture Clap if you like pizza! Pointless Poll.
ECE 15B Computer Organization Spring 2010 Dmitri Strukov Lecture 6: Logic/Shift Instructions Partially adapted from Computer Organization and Design, 4.
L6 – Simulator 1 Comp 411 – Fall /12/06 Adventures in Assembly Land What is an Assembler ASM Directives ASM Syntax Intro to SPIM Simple examples.
L5 – Simulator 1 Comp 411 – Fall /16/09 Adventures in Assembly Land What is an Assembler ASM Directives ASM Syntax Intro to SPIM/MARS Simple examples.
VHDL Synthesis of a MIPS-32 Processor Bryan Allen Dave Chandler Nate Ransom.
83 Assembly Language Readings: Chapter 2 ( , 2.8, 2.9, 2.13, 2.15), Appendix A.10 Assembly language Simple, regular instructions – building blocks.
IT253: Computer Organization Lecture 5: Assembly Language and an Introduction to MIPS Tonga Institute of Higher Education.
Registers and MAL Lecture 12. The MAL Architecture MAL is a load/store architecture. MAL supports only those addressing modes supported by the MIPS RISC.
CSCI 136 Lab 1: 135 Review.
FAMU-FSU College of Engineering 1 Computer Architecture EEL 4713/5764, Spring 2006 Dr. Michael Frank Module #7 – MIPS ISA, part 2: Procedures and Data.
IT 251 Computer Organization and Architecture More MIPS Control Instructions Chia-Chi Teng.
Chapter 10 The Assembly Process. What Assemblers Do Translates assembly language into machine code. Assigns addresses to all symbolic labels (variables.
Computer Organization and Design Assembly & Simulation
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.
Computer Organization and Design Jair Gonzalez Enero 2004 MIPS ISA.
MIPS Assembly Language Chapter 13 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
EE 3755 Datapath Presented by Dr. Alexander Skavantzos.
EEL5708/Bölöni Lec 3.1 Fall 2006 Sept 1, 2006 Lotzi Bölöni EEL 5708 High Performance Computer Architecture Lecture 3 Review: Instruction Sets.
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.
MIPS Instruction Set Architecture Prof. Sirer CS 316 Cornell University.
Computer Organization and Design Assembly & Simulation Montek Singh Wed, Sep 26, 2012 Lecture 7.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
Computer Organization and Design Assembly & Simulation Montek Singh Feb 22, 2016 Lecture 6.
EEL5708/Bölöni Lec 3.1 Fall 2004 Sept 1, 2004 Lotzi Bölöni Fall 2004 EEL 5708 High Performance Computer Architecture Lecture 3 Review: Instruction Sets.
CSE 340 Computer Architecture Spring 2016 MIPS Arithmetic Review.
Instruction Set Architecture of MIPS Processor Presentation B
Instructor: Prof. Hany H Ammar, LCSEE, WVU
Digital Logic Design Alex Bronstein
Computer Organization and Design Assembly & Simulation
Computer Organization and Design Instruction Sets - 2
Computer Organization and Design Instruction Sets - 2
These are slides from Comp411
32-bit MIPS ISA.
ENGR 3410 – Computer Architecture Mark L. Chang Fall 2006
Computer Organization and Design Instruction Sets
CSCE 212 Chapter 2: Instruction Set Architecture
Designing MIPS Processor (Single-Cycle) Presentation G
Adventures in Assembly Land
Appendix A Classifying Instruction Set Architecture
MPIS Instructions Functionalities of instructions Instruction format
ECE232: Hardware Organization and Design
Today’s Lecture Quick Review of Last Lecture
Computer Organization and Design Assembly & Simulation
Instruction encoding The ISA defines Format = Encoding
Part II Instruction-Set Architecture
MIPS Assembly.
Flow of Control -- Conditional branch instructions
UCSD ECE 111 Prof. Farinaz Koushanfar Fall 2018
Assembly and Simulation
MIPS Instruction Set Architecture
MIPS Assembly.
Flow of Control -- Conditional branch instructions
MIPS assembly.
CS352H Computer Systems Architecture
Reduced Instruction Set Computer (RISC)
Adventures in Assembly Land
MIPS Arithmetic and Logic Instructions
Adventures in Assembly Land
Pointless Poll Clap if you like pizza!.
MIPS Arithmetic and Logic Instructions
MIPS instructions.
Presentation transcript:

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 to FLEET assembly  Small set of SHIPs used to implement MIPS operations  Register file abstraction provided Eventual goal: run C code on FLEET  Compile C  MIPS  FLEET

MIPS Instructions Each instruction is implemented as a codebag When an instruction is done, it sends the next instruction codebag to the FetchShip The next instruction’s release is predicated on notification from the previous instruction that it is done

Instruction Example Example: AND $t0, $s0, $s1 PC0x400000: { copy s0fifo.out  logic.A copy s1fifo.out  logic.B “AND”  logic.cmd move token.out  logic.out move logic.out  t0fifo.in move t0fifo.out  () accept+ack t0fifo.in  fetch.release PC0x  fetch.codebag move fetch.done  () }

MIPS Registers Registers implemented using FIFOs Operations  Initialization: add 0 to FIFO  Read: copy output  Write: move input to FIFO, send output to bitbucket 0 0 xxx yxy

MIPS ALU Operations ALU operations  Addition ( ADD, ADDI, ADDIU, ADDU )  Subtraction ( SUB, SUBU )  Multiplication ( MULT, MULTU )  Division ( DIV, DIVU )  Shifts ( SLL, SLLV, SRA, SRAV, SRL, SRLV )  Logic ( AND, ANDI, OR, ORI, XOR, XORI, NOR )

Arithmetic Implementation Addition and subtraction implemented directly using ArithmeticShip Signed multiplication uses Dominic’s MultiplierShip Unclear what to do for division and unsigned multiplication  Can build on top of ArithmeticShip, MultiplerShip, and ShiftShip, but result complicated and slow  Can also build into hardware, on top of MIPS instructions, or a combination of the above

Logic Implementation Logical operations can be built either on top of the BitwiseShip, or on a simpler LogicShip  Since no one has built a BitwiseShip, I’m using a LogicShip for now  Commands: AND, OR, XOR, NOR Logic Ship DataAin::int Inbox Outbox DataBin::int Commandin::int DataOut::int

Shift Implementation Shift operations can use the IES31 ShiftShip  However, lots of operations required to perform a shift of more than 1  Also, complicated to implement variable shifts  Can use new ship:  Commands: SLL, SRA, SRL Shift Ship DataAin::int Inbox Outbox DataBin::int Commandin::int DataOut::int

MIPS Control Flow Operations Control flow operations  Branches ( BEQ, BGEZ, BGTZ, BLEZ, BLTZ, BNE )  Jumps ( J, JAL, JALR, JR ) Set operations  Set on less than ( SLT, SLTI, SLTIU, SLTU )

Comparisons Branches and sets compare values, so a ComparatorShip needs to be defined  Can use ArithmeticShip, but slower and more complicated  Commands: EQ, NEQ, GT, GEQ, LT, LEQ Comparator Ship DataAin::int Inbox Outbox DataBin::int Commandin::int DataOut::boolean

Selections Branches and sets also select between two values  The SELECT command on the ArithmeticShip can be used to do so  Example: BEQ $s, $t, off Comp $s $t EQ Arith SELECT Fetch PC+1 PC+off

MIPS Memory Access Operations Memory access operations  Loads ( LB, LBU, LUI, LH, LHU, LW )  Stores ( SB, SH, SW ) Memory byte-addressed, so need new byte- addressed memory ships  Example: SW $t, off($s) Byte Mem Write 0 1 Arith $s ADD off 0$t

Other MIPS Operations Register moves ( MFHI, MTHI, MFLO, MTLO )  Easy to implement System calls ( SYSCALL )  Only a few calls implemented Floating point instructions  Not implemented

Future Work Add more complete support for system calls  Need I/O specification for FLEET first Add floating point instructions  Need floating point specification for FLEET first Optimize instruction sequencing logic  Remove sequencing where it is unnecessary Add support for instruction-level parallelism  Take advantage of duplicated SHIPs, or even multiple FLEETs