Guerilla Section #4 10/05 SDS & MIPS Datapath

Slides:



Advertisements
Similar presentations
The Processor: Datapath & Control
Advertisements

CS61C L26 Single Cycle CPU Datapath II (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
CS61C L26 CPU Design : Designing a Single-Cycle CPU II (1) Garcia, Spring 2007 © UCB 3.6 TB DVDs? Maybe!  Researchers at Harvard have found a way to use.
Savio Chau Single Cycle Controller Design Last Time: Discussed the Designing of a Single Cycle Datapath Control Datapath Memory Processor (CPU) Input Output.
331 Lec 14.1Fall 2002 Review: Abstract Implementation View  Split memory (Harvard) model - single cycle operation  Simplified to contain only the instructions:
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
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.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
CS61C L26 CPU Design : Designing a Single-Cycle CPU II (1) Garcia, Fall 2006 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
EEM 486: Computer Architecture Lecture 3 Designing a Single Cycle Datapath.
CS61C L26 CPU Design : Designing a Single-Cycle CPU II (1) Garcia, Spring 2010 © UCB inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine Structures.
CS61C L27 Single Cycle CPU Control (1) Garcia, Fall 2006 © UCB Wireless High Definition?  Several companies will be working on a “WirelessHD” standard,
Chapter 4 Sections 4.1 – 4.4 Appendix D.1 and D.2 Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
CS3350B Computer Architecture Winter 2015 Lecture 5.6: Single-Cycle CPU: Datapath Control (Part 1) Marc Moreno Maza [Adapted.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Computer Organization CS224 Fall 2012 Lesson 26. Summary of Control Signals addsuborilwswbeqj RegDst ALUSrc MemtoReg RegWrite MemWrite Branch Jump ExtOp.
EEM 486: Computer Architecture Designing Single Cycle Control.
EEM 486: Computer Architecture Designing a Single Cycle Datapath.
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
CPE 442 single-cycle datapath.1 Intro. To Computer Architecture CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath.
1 Processor: Datapath and Control Single cycle processor –Datapath and Control Multicycle processor –Datapath and Control Microprogramming –Vertical and.
1  1998 Morgan Kaufmann Publishers Simple Implementation Include the functional units we need for each instruction Why do we need this stuff?
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
CS 61C: Great Ideas in Computer Architecture Sequential Elements, Synchronous Digital Systems 1 Instructors: Vladimir Stojanovic & Nicholas Weaver
Single Cycle Controller Design
CS 110 Computer Architecture Lecture 9: Finite State Machines, Functional Units Instructor: Sören Schwertfeger School of.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
EE204 Computer Architecture
CS Computer Architecture Week 10: Single Cycle Implementation
CS161 – Design and Architecture of Computer Systems
Problem with Single Cycle Processor Design
CS 230: Computer Organization and Assembly Language
Flip Flops Lecture 10 CAP
Single-Cycle Datapath and Control
Processor Design & Implementation
Morgan Kaufmann Publishers
Introduction CPU performance factors
(Chapter 5: Hennessy and Patterson) Winter Quarter 1998 Chris Myers
Morgan Kaufmann Publishers
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Morgan Kaufmann Publishers The Processor
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
MIPS processor continued
CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath Start: X:40.
Single Cycle CPU Design
Single-Cycle CPU DataPath.
Instructors: Randy H. Katz David A. Patterson
Datapath & Control MIPS
Levels in Processor Design
Rocky K. C. Chang 6 November 2017
Composing the Elements
Composing the Elements
CS152 Computer Architecture and Engineering Lecture 8 Designing a Single Cycle Datapath Start: X:40.
The Processor Lecture 3.2: Building a Datapath with Control
COMS 361 Computer Organization
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Simple Implementation
inst.eecs.berkeley.edu/~cs61c-to
Computer Architecture Processor: Datapath
COMP541 Sequential Logic Timing
MIPS processor continued
Instructors: Randy H. Katz David A. Patterson
The Processor: Datapath & Control.
COMS 361 Computer Organization
What You Will Learn In Next Few Sets of Lectures
Instructor: Michael Greenbaum
Processor: Datapath and Control
Presentation transcript:

Guerilla Section #4 10/05 SDS & MIPS Datapath Computers are Cool!!!

FSMs An abstract machine which can be in one of one of a finite number of states before receiving input and transitioning to another. We start at a state and given an input, we follow some edge to another (or the same) state. Possibly outputs as well. With combinational logic and registers, any FSM can be implemented in hardware. Finite number of states Input leads you from one state to another (or back to the same state)

FSM example This FSM takes inputs of 0 or 1, and outputs 1 after seeing a group of three consecutive 1’s, and 0 otherwise.

What is a Synchronous System? All operations coordinated by a central clock Consist of two basic types of circuits, combinational logic and sequential logic Combinational Logic (CL) circuits perform a function on its inputs, e.g. add them and output the result. ALUs Sequential Logic (SL) circuits store information, input and output are updated on flip flop of central clock. Used to synchronize flow of information between CL circuits. registers

Review of timing terms Setup Time: when the input must be stable before the edge of the CLK Hold Time: when the input must be stable after the edge of the CLK “CLK-to-Q” Delay: how long it takes the output to change, measured from the edge of the CLK Camera Analogy Timing: Set up time: don’t move since about to take picture Hold time: need to hold still after shutter opens until camera shutter closes Time to click data: time from open shutter until can see image on output (viewscreen)

Critical Path The critical path is the path data could flow through in a circuit which would cause the longest delay. Max delay = Setup Time + CLK-to-Q Delay + CL Delay Assuming we have no registers, and all CL gates have a delay of 10 ns, what’s the critical path and max delay of the circuit below?

Critical Path The critical path is the path data could flow through in a circuit which would cause the longest delay. Max delay = Setup Time + CLK-to-Q Delay + CL Delay Assuming we have no registers, and all CL gates have a delay of 10 ns, what’s the critical path and max delay of the circuit below? 40 ns

Max Clock Frequency When there are registers in the circuit, there are constraints on clock frequency Min Period = Max Delay Max Freq = 1/Min Period Max clock frequency limited by time needed to get correct next state to register (t_setup) Two constraints on max clock frequency t_hold <= t_input <= t_clk_period - t_setup

Max frequency/Hold time example Each logic gate has a combinational logic delay of 10ns, the clk-to-q delay is 5ns and the setup time is 15ns. Calculate the minimum clock period that will allow the circuit to function correctly.

Max frequency/Hold time example Each logic gate has a combinational logic delay of 10ns, the clk-to-q delay is 5ns and the setup time is 15ns. Calculate the minimum clock period that will allow the circuit to function correctly. 5ns + 3 * 10ns + 15ns = 50ns I need time to wait for the input to update on the register + I need time to calculate/do ALL of my logic (LONGEST PATH) + I need time to set up the result in the register = 50ns

Max frequency/Hold time example Each logic gate has a combinational logic delay of 10ns, the clk-to-q delay is 5ns and the setup time is 15ns. 2) Assuming the hold time of the registers is 20ns, calculate the minimum combinational logic delay per logic gate for the circuit to function correctly.

Max frequency/Hold time example Each logic gate has a combinational logic delay of 10ns, the clk-to-q delay is 5ns and the setup time is 15ns. 2) Assuming the hold time of the registers is 20ns, calculate the minimum combinational logic delay per logic gate for the circuit to function correctly. 5ns + 3 * 10ns + 15ns = 50ns I need time to wait for the input to update on the register + I need time to calculate/do ALL of my logic (LONGEST PATH) + I need time to set up the result in the register = 50ns

Note about Pipelining Inserting SL units (registers) between CL Units decreases the length of the critical path, thus allowing the maximum clock frequency to rise and improving data throughput. However, more registers means greater latency between the first input and first output

add $t0 $t1 $t2 #what do i do??

1. Hi. add $t0 $t1 $t2 #WHO AM I???? 3. OH I DO ADDING 2. Oh I am R-type! t0=rd t1=rs t2=rt 4. Nah man.

add $t0 $t1 $t2 1. Hi. Increment PC by the appropriate ammount → PC = PC + 4 or new address

2. Oh I am R type and t0=rd, t1=rs, t2=rt add $t0 $t1 $t2 Decodes: register numbers, opcode, funct (if needed), shamt, immedate, or address (depends on instr) Does all of this, but only necessary fields used later on

3. I DO ADDING add $t0 $t1 $t2

4. Nah. add $t0 $t1 $t2

5. t0 needs that info add $t0 $t1 $t2

WHICH INSTRUCTION IS THE ONLY ONE THAT USES ALL 5 STAGES?

You have these Controls that tell your Datapath what to do!!

regWr = am I going to write to a register? RegDst = should I write the result to $rd or $rs? nPC_sel = do I get normal PC + 4 or PC + some branch/jump? ALUSrc = $rs is always the first argument, but should the second argument be $rt or an immediate? ExtOp = sign or zero extend the immediate? ALUCtr/Alu0123.. = what operation do I do in the ALU? Add, subtract, multiply? MemWr = am I writing to memory? MemToReg = if I got a value from memory do I need to go back to the regfile and store the memory value in a register?

regWr = am I going to write to a register? RegDst = should I write the result to $rd or $rs? nPC_sel = do I get normal PC + 4 or PC + some branch/jump? ALUSrc = $rs is always the first argument, but should the second argument be $rt or an immediate? ExtOp = sign or zero extend the immediate? ALUCtr/Alu0123.. = what operation do I do in the ALU? Add, subtract, multiply? MemWr = am I writing to memory? MemToReg = if I got a value from memory do I need to go back to the regfile and store the memory value in a register?