PA1 Introduction Lab Section. But first: Homework 1 C Problem A quick note on this is to use scanf to read input from the terminal You can use a format.

Slides:



Advertisements
Similar presentations
331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
Advertisements

Sample Undergraduate Lecture: MIPS Instruction Set Architecture Jason D. Bakos Optics/Microelectronics Lab Department of Computer Science University of.
1 RISC Pipeline Han Wang CS3410, Spring 2010 Computer Science Cornell University See: P&H Chapter 4.6.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
1  2004 Morgan Kaufmann Publishers Chapter Six. 2  2004 Morgan Kaufmann Publishers Pipelining The laundry analogy.
1 COMP541 Sequencing – III (Sequencing a Computer) Montek Singh April 9, 2007.
Lec 8: Pipelining Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University.
Computer Structure - Datapath and Control Goal: Design a Datapath  We will design the datapath of a processor that includes a subset of the MIPS instruction.
CS61C L25 CPU Design : Designing a Single-Cycle CPU (1) Garcia, Fall 2006 © UCB T-Mobile’s Wi-Fi / Cell phone  T-mobile just announced a new phone that.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 25 CPU design (of a single-cycle CPU) Intel is prototyping circuits that.
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
VHDL Synthesis of a MIPS-32 Processor Bryan Allen Dave Chandler Nate Ransom.
The Processor Data Path & Control Chapter 5 Part 1 - Introduction and Single Clock Cycle Design N. Guydosh 2/29/04.
Computer Science 210 Computer Organization The Instruction Execution Cycle.
COMPUTER ORGANIZATION CSCE 230 Final Project. OVERVIEW  Implemented RISC processor  VHDL  Test program created to demonstrate abilities.
CS3350B Computer Architecture Winter 2015 Lecture 5.6: Single-Cycle CPU: Datapath Control (Part 1) Marc Moreno Maza [Adapted.
IT253: Computer Organization Lecture 5: Assembly Language and an Introduction to MIPS Tonga Institute of Higher Education.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
1 Pipelining Reconsider the data path we just did Each instruction takes from 3 to 5 clock cycles However, there are parts of hardware that are idle many.
CSCI 211 Intro Computer Organization –Consists of gates for logic And Or Not –Processor –Memory –I/O interface.
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
EEM 486: Computer Architecture Designing a Single Cycle Datapath.
Computer Organization & Programming Chapter 6 Single Datapath CPU Architecture.
Electrical and Computer Engineering University of Cyprus LAB 2: MIPS.
CS2100 Computer Organisation The Processor: Datapath (AY2015/6) Semester 1.
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
TEAM FRONT END ECEN 4243 Digital Computer Design.
Team DataPath Research Computer Architechture. PC and IF in the Processor.
1 A single-cycle MIPS processor  An instruction set architecture is an interface that defines the hardware operations which are available to software.
ECE 353 Lab 2 Pipeline Simulator. Aims Further experience in C programming Handling strings Further experience in the use of assertions Reinforce concepts.
1. Building A CPU  We’ve built a small ALU l Add, Subtract, SLT, And, Or l Could figure out Multiply and Divide  What about the rest l How do.
December 26, 2015©2003 Craig Zilles (derived from slides by Howard Huang) 1 A single-cycle MIPS processor  As previously discussed, an instruction set.
Computer Architecture Lecture 10 MIPS Control Unit Ralph Grishman Oct NYU.
1  1998 Morgan Kaufmann Publishers Chapter Six. 2  1998 Morgan Kaufmann Publishers Pipelining Improve perfomance by increasing instruction throughput.
EE 3755 Datapath Presented by Dr. Alexander Skavantzos.
CS61C L20 Datapath © UC Regents 1 Microprocessor James Tan Adapted from D. Patterson’s CS61C Copyright 2000.
February 22, 2016©2003 Craig Zilles (derived from slides by Howard Huang) 1 A single-cycle MIPS processor  As previously discussed, an instruction set.
Elements of Datapath for the fetch and increment The first element we need: a memory unit to store the instructions of a program and supply instructions.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
MIPS Processor.
1  2004 Morgan Kaufmann Publishers No encoding: –1 bit for each datapath operation –faster, requires more memory (logic) –used for Vax 780 — an astonishing.
CS203 – Advanced Computer Architecture Pipelining Review.
CS 61C: Great Ideas in Computer Architecture MIPS Datapath 1 Instructors: Nicholas Weaver & Vladimir Stojanovic
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Chapter Six.
CS161 – Design and Architecture of Computer Systems
Electrical and Computer Engineering University of Cyprus
IT 251 Computer Organization and Architecture
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Instruction Format MIPS Instruction Set.
ECE 353 Lab 3 Pipeline Simulator
Computer Science 210 Computer Organization
Single-cycle datapath, slightly rearranged
Computer Science 210 Computer Organization
Systems Architecture II
MIPS Processor.
Topic 5: Processor Architecture Implementation Methodology
Chapter Six.
Chapter Six.
Guest Lecturer TA: Shreyas Chand
Topic 5: Processor Architecture
Instruction Execution Cycle
COMS 361 Computer Organization
Branch instructions We’ll implement branch instructions for the eight different conditions shown here. Bits 11-9 of the opcode field will indicate the.
Instruction Format MIPS Instruction Set.
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
Review: The whole processor
MIPS Processor.
Presentation transcript:

PA1 Introduction Lab Section

But first: Homework 1 C Problem A quick note on this is to use scanf to read input from the terminal You can use a format string to read formatted data from stdin and store them in specified locations based on function parameters. See man scanf

PA1 Introduction We’re making a miniature MIPS microprocessor! – MIPS is a RISC instruction set that is easy to understand and implement. – This + PA2 is a really cool project that will teach you the basics of what is happening on the machine level when you run some arbitrary code.

Design Docs! Will help put you ideas into words and help others understand your design decisions/control signals. Approach top-down – break everything into modules and decide the interface between them Design doc meetings Example Design Doc

Implementation We’ll go over a few things in this section – A few details about the processor – A few details about the ISA – Review of different types of instructions R-type I-Type J-Type – Logisim Details – Decoding Tips – Go through the PA1 docs

Processor Details You will need 5-stages: fetch, decode, execute, writeback, and memory. – This is the most common organization to MIPS and most similar to book/class Needs a program counter, a read-only program memory, a register file, the provided ALU, and any other components needed. Should fetch instructions to execute from ROM, increment PC by 4, decode, select args from register file, compute results, do nothing in MEM stage, and store results back in register file.

What to Implement/Not to Implement Memory Stage for P1 – just make this a pass- through to the next stage that does nothing for now. Delay Slots for P1 – Will not be implemented for now.

Continued Decode all instructions in Table B (but don’t need to implement them yet. – Can do anything you want as long as execution of instructions in Table A are not interfered with and no value in the register file changes. Data Hazards: Implement forwarding to handle them. No-op/stalls are easy but incur a performance overhead.

ISA Details The ISA exposes bit registers that can hold values – Actually 32 but $0 is always 0 – (actually this is kind of like dev/null … might be useful for no-ops). But if registers aren’t enough, we also have the ability to load/store to 32-bit memory. All instructions are 32-bits – the first six bits are the opcode Instructions are layed out in instruction memory with a 32-bit program counter – We use a modified Harvard Architecture – separate.

Instructions Every instruction starts with a 6-bit opcode. – R-Type specifies three registers, a SA field, and a function field – I-Type specifies two registers and a 16-bit immediate value that is either sign/zero extended – J-Type use a 26-bit jump target after opcode

From the Lecture Slides

R-Type Instruction Result and two source registers with shift amount Opcode is always 0 (use this knowledge to decode them) All R-Type instructions will do something to two registers and store the answer in the result register The last 6 function bits will determine what you do (ADDU, SUBU, AND, OR, XOR, NOR …)

I-Type Instruction Specifies two registers and a 16-bit immediate value that is either sign/zero extended Do something to the register and the immediate value in the instruction – then store in the result register. Opcode can be anything other than , 00001x, 0100xx (specifies other types of instructions) ADDIU, ANDI, ORI, XORI

J-Type Instruction Just J and JAL Jumping is used to go to other parts of instruction memory – usually used to execute new procedures Opcodes are and But the target in the instruction is only 26 bits! – Pad the LSB with 2 empty bits so we go from word to word – The remaining 4 bits use bits PC=PC+4 Jump targets are computed with PC+4 not PC

Logisim Details Load up the cs3410.jar Program ROM ALU Register File

Decoding Tips Find common ground between different types of instructions/opcodes just like Lab 1 Try to figure out what components to use and what control signals might be necessary Tip: Make a chart of all the instructions and what the control signals need to be.