ECE/CS 552: Single Cycle Control Path

Slides:



Advertisements
Similar presentations
Pipeline Example: cycle 1 lw R10,9(R1) sub R11,R2, R3 and R12,R4, R5 or R13,R6, R7.
Advertisements

The Processor: Datapath & Control
Chapter 5 The Processor: Datapath and Control Basic MIPS Architecture Homework 2 due October 28 th. Project Designs due October 28 th. Project Reports.
Levels in Processor Design
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 Datapath Andreas Klappenecker CPSC321 Computer Architecture.
©UCB CS 161Computer Architecture Chapter 5 Instructor: L.N. Bhuyan LECTURE 10.
Datapath and Control Andreas Klappenecker CPSC321 Computer Architecture.
The Processor: Datapath & Control. Implementing Instructions Simplified instruction set memory-reference instructions: lw, sw arithmetic-logical instructions:
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.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Gary MarsdenSlide 1University of Cape Town Chapter 5 - The Processor  Machine Performance factors –Instruction Count, Clock cycle time, Clock cycles per.
CS2100 Computer Organisation
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
MIPS processor continued. In Class Exercise Question Show the datapath of a processor that supports only R-type and jr reg instructions.
Chapter 5 Instructor: Mozafar Bag-Mohammadi Spring 2010 Ilam University.
ECE-C355 Computer Structures Winter 2008 The MIPS Datapath Slides have been adapted from Prof. Mary Jane Irwin ( )
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
PC Instruction Memory Address Instr. [31-0] 4 Fig 4.6 p 309 Instruction Fetch.
ECE/CS 552: Data Path and Control Instructor:Mikko H Lipasti Fall 2010 University of Wisconsin-Madison Lecture notes based on set created by Mark Hill.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 2.
MIPS processor continued
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.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Design a MIPS Processor (II)
Single-cycle CPU Control
Access the Instruction from Memory
EE204 Computer Architecture
CS Computer Architecture Week 10: Single Cycle Implementation
MIPS Microarchitecture Single-Cycle Processor Control
Single Cycle CPU - Control
CS161 – Design and Architecture of Computer Systems
CS 230: Computer Organization and Assembly Language
Single-Cycle Datapath and Control
CDA 3101 Spring 2016 Introduction to Computer Organization
Computer Architecture
ECE/CS 552: Multicycle Data Path
Single Cycle Processor
Multi-Cycle CPU.
CS/COE0447 Computer Organization & Assembly Language
ECE/CS 552: Single Cycle Datapath
MIPS processor continued
Review: MIPS Pipeline Data and Control Paths
CS/COE0447 Computer Organization & Assembly Language
Single-Cycle CPU DataPath.
CS/COE0447 Computer Organization & Assembly Language
CSCI206 - Computer Organization & Programming
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
Levels in Processor Design
Rocky K. C. Chang 6 November 2017
Composing the Elements
Composing the Elements
The Processor Lecture 3.2: Building a Datapath with Control
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Instructor: Mozafar Bag-Mohammadi Spring 2006 University of Ilam
Lecture 14: Single Cycle MIPS Processor
Control Unit (single cycle implementation)
MIPS processor continued
CS/COE0447 Computer Organization & Assembly Language
Control Unit (single cycle implementation)
The Processor: Datapath & Control.
COMS 361 Computer Organization
CPU Design use pipeline
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

ECE/CS 552: Single Cycle Control Path © Prof. Mikko Lipasti Lecture notes based in part on slides created by Mark Hill, David Wood, Guri Sohi, John Shen and Jim Smith

Control Overview Single-cycle implementation Datapath: combinational logic, I-mem, regs, D-mem, PC Last three written at end of cycle Need control – just combinational logic! Inputs: Instruction (I-mem out) Zero (for beq) Outputs: Control lines for muxes ALUop Write-enables

Control Overview Fast control E.g. Divide up work on “need to know” basis Logic with fewer inputs is faster E.g. Global control need not know which ALUop

ALU Control Assume ALU uses 000 and 001 or 010 add 110 sub 111 slt (set less than) others don’t care

ALU Control ALU-ctrl = f(opcode,function) Instruction Operation Opcode add 000000 100000 sub 100010 and 100100 or 100101 slt 101010 ALU-ctrl = f(opcode,function)

But…don’t forget To simplify ALU-ctrl Instruction Operation Opcode function lw add 100011 xxxxxx sw 101011 beq sub 000100 100010 To simplify ALU-ctrl ALUop = f(opcode) 2 bits 6 bits

ALU Control ALU-ctrl = f(ALUop, function) 3 bits 2 bits 6 bits 10 add, sub, and, … 00 lw, sw 01 beq ALU-ctrl = f(ALUop, function) 3 bits 2 bits 6 bits Requires only five gates plus inverters

Control Signals Needed

Global Control R-format: opcode rs rt rd shamt function 6 5 5 5 5 6 I-format: opcode rs rt address/immediate 6 5 5 16 J-format: opcode address 6 26

Global Control Route instruction[25:21] as read reg1 spec Route instruction[20:16] are read reg2 spec Route instruction[20:16] (load) and and instruction[15:11] (others) to Write reg mux Call instruction[31:26] op[5:0]

Global Control Global control outputs ALU-ctrl - see above ALU src - R-format, beq vs. ld/st MemRead - lw MemWrite - sw MemtoReg - lw RegDst - lw dst in bits 20:16, not 15:11 RegWrite - all but beq and sw PCSrc - beq taken

Global Control Global control outputs Replace PCsrc with Branch beq PCSrc = Branch * Zero What are the inputs needed to determine above global control signals? Just Op[5:0]

Global Control Instruction Opcode RegDst ALUSrc rrr 000000 1 lw 100011 lw 100011 sw 101011 x beq 000100 ??? others RegDst = ~Op[0] ALUSrc = Op[0] RegWrite = ~Op[3] * ~Op[2]

Global Control More complex with entire MIPS ISA Common solution: PLA Need more systematic structure Want to share gates between control signals Common solution: PLA MIPS opcode space designed to minimize PLA inputs, minterms, and outputs Refer to MIPS Opcode map

PLA In AND-plane, & selected inputs to get minterms In OR-plane, | selected minterms to get outputs E.g.

Control Signals; Add Jumps

Control Signals w/Jumps

What’s wrong with single cycle? Instructions Cycles Program Instruction Time Cycle (code size) X (CPI) (cycle time) Critical path probably lw: I-mem, reg-read, alu, d-mem, reg-write Other instructions faster E.g. rrr: skip d-mem Instruction variation much worse for full ISA and real implementation: FP divide Cache misses (what the heck is this? – later)

Single Cycle Implementation Solution Variable clock? Too hard to control, design Fixed short clock Variable cycles per instruction Multicycle control (next lecture)

Summary Processor implementation Single cycle implementation Datapath Control Single cycle implementation