Levels in Processor Design

Slides:



Advertisements
Similar presentations
The Processor: Datapath & Control
Advertisements

1  1998 Morgan Kaufmann Publishers Chapter Five The Processor: Datapath and 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.
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.
Chapter Five The Processor: Datapath and Control.
CSE431 L05 Basic MIPS Architecture.1Irwin, PSU, 2005 CSE 431 Computer Architecture Fall 2005 Lecture 05: Basic MIPS Architecture Review Mary Jane Irwin.
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
Processor: Datapath and Control
Gary MarsdenSlide 1University of Cape Town Chapter 5 - The Processor  Machine Performance factors –Instruction Count, Clock cycle time, Clock cycles per.
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]
Datapath and Control Unit Design
1 A single-cycle MIPS processor  An instruction set architecture is an interface that defines the hardware operations which are available to software.
1 Processor: Datapath and Control Single cycle processor –Datapath and Control Multicycle processor –Datapath and Control Microprogramming –Vertical and.
MIPS processor continued. In Class Exercise Question Show the datapath of a processor that supports only R-type and jr reg instructions.
1 Processor: Datapath and Control Single cycle processor –Datapath and Control Multicycle processor –Datapath and Control Microprogramming –Vertical and.
D ATA P ATH OF A PROCESSOR (MIPS) Module 1.1 : Elements of computer system UNIT 1.
December 26, 2015©2003 Craig Zilles (derived from slides by Howard Huang) 1 A single-cycle MIPS processor  As previously discussed, an instruction set.
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.
February 22, 2016©2003 Craig Zilles (derived from slides by Howard Huang) 1 A single-cycle MIPS processor  As previously discussed, an instruction set.
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.
Gary MarsdenSlide 1University of Cape Town Computer Architecture – Introduction Andrew Hutchinson & Gary Marsden (me) ( ) September 2003.
MIPS Processor.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Access the Instruction from Memory
CS161 – Design and Architecture of Computer Systems
Single-Cycle Datapath and Control
Computer Architecture
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
MIPS processor continued
CS/COE0447 Computer Organization & Assembly Language
Single-Cycle CPU DataPath.
CS/COE0447 Computer Organization & Assembly Language
CSCI206 - Computer Organization & Programming
MIPS Processor.
Levels in Processor Design
Topic 5: Processor Architecture Implementation Methodology
Rocky K. C. Chang 6 November 2017
Levels in Processor Design
The Processor Lecture 3.2: Building a Datapath with Control
The Processor Lecture 3.1: Introduction & Logic Design Conventions
Topic 5: Processor Architecture
COMS 361 Computer Organization
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Levels in Processor Design
Lecture 14: Single Cycle MIPS Processor
Processor: Multi-Cycle Datapath & Control
Control Unit (single cycle implementation)
Levels in Processor Design
Computer Architecture Processor: Datapath
Control Unit for Multiple Cycle Implementation
MIPS processor continued
Levels in Processor Design
CS/COE0447 Computer Organization & Assembly Language
Control Unit for Multiple Cycle Implementation
FloorPlan for Multicycle MIPS
Control Unit (single cycle implementation)
The Processor: Datapath & Control.
COMS 361 Computer Organization
MIPS Processor.
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

Levels in Processor Design Circuit design Keywords: transistors, wires etc.Results in gates, flip-flops etc. Logical design Putting gates (AND, NAND, …) and flip-flops together to build basic blocks such as registers, ALU’s etc (cf. CSE 370) Register transfer Describes execution of instructions by showing data flow between the basic blocks Processor description (the ISA) System description Includes memory hierarchy, I/O, multiprocessing etc CSE378 Single cycle implementation.

Register transfer level Two types of components (cf. CSE 370) Combinational : the output is a function of the input (e.g., adder) Sequential: state is remembered (e.g., register) CSE378 Single cycle implementation.

Synchronous design Use of a periodic clock edge-triggered clocking determines when signals can be read and when the output of circuits is stable Values in storage elements can be updated only at clock edges Clock tells when events can occur, e.g., when signals sent by control unit are obeyed in the ALU Note: the same storage element can be read/written in the same cycle Stor. Elem 1 Stor. Elem 2 Comb.logic Clock cycle CSE378 Single cycle implementation.

Processor design: data path and control unit CPU Combinational Memory hierarchy control ALU PC Registers state Sequential Memory bus Data path CSE378 Single cycle implementation.

Processor design Data path Control unit Memory hierarchy How does data flow between various basic blocks What operations can be performed when data flows What can be done in one clock cycle Control unit Sends signals to data path elements Tells what data to move, where to move it, what operations are to be performed Memory hierarchy Holds program and data CSE378 Single cycle implementation.

Data path basic building blocks. Storage elements Basic building block (at the RT level) is a register In our mini-MIPS implementation registers will be 32-bits A register can be read or written Input bus Register Write enable signal Output bus CSE378 Single cycle implementation.

Register file Array of registers (32 for the integer registers in MIPS) ISA tells us that we should be able to: read 2 registers, write one register in a given instruction (at this point we want one instruction per cycle) Register file needs to know which registers to read/write Read register number bus 0 Write register number Read register number bus 1 Write enable Read data output bus 0 Write data input bus Register file Read data output bus 1 CSE378 Single cycle implementation.

Memory Conceptually, like register file but much larger Can only read one location or write to one location per cycle Read memory address Write memory address Read control signal Write enable Memory Read data bus Write data bus CSE378 Single cycle implementation.

Combinational elements Multiplexor (MUX): selects the value of one of its inputs to be routed to the output Input busses Mux Select control signal Demultiplexor (deMUX or SEL): routes its input to one of its outputs Output bus Output busses Sel Select control signal Input bus CSE378 Single cycle implementation.

Arithmetic and Logic Unit (ALU - combinational) Computes (arithmetic or logical operation) output from its two inputs Zero result bit Input bus 0 ALU Output bus Input bus 1 ALU control (opcode/function) CSE378 Single cycle implementation.

Putting basic blocks together (skeleton of data path for arith/logical operations) Zero result bit Read register number bus 0 Write register number Read register number bus 1 Write enable Read data 0 ALU Register file Read data 1 ALU control (opcode/function) Write data input bus CSE378 Single cycle implementation.

Introducing instruction fetch Zero result bit Read Reg #0 Read Reg #1 Write Reg # Read data 0 ALU Reg. File Read data 1 ALU control (opcode/function) Write data Instruction address Instr. memory PC CSE378 Single cycle implementation.

PC has to be incremented (assume no branch) 4 Adder Instruction address Instruction Instr. memory PC CSE378 Single cycle implementation.

Load-Store instructions Read enable Instruction Read data 0 Read Reg #0 Read Reg #1 Write Reg # ALU Data memory R/W address Reg. File 32-bit “store” data Sign extend 16-bit offset Write enable Data from “load” CSE378 Single cycle implementation.

Data path for straight code (reg-reg,imm,load/store) Read enable Instruction Read data 0 Read Reg #0 Read Reg #1 Write Reg # ALU Read data 1 Data memory R/W address Reg. File 32-bit Sign. ext “store” data 16-bit offset Write enable Data for result register Mux CSE378 Single cycle implementation.

Branch data path ALU 4 Adder Inst. memory PC sll 2 32-bit Instruction Sign.ext CSE378 Single cycle implementation.

Control Unit Control unit sends control signals to data path and memory depending on the opcode (and function field) results in the ALU (for example for Zero test) These signals control muxes; read/write enable for registers and memory etc. Some “control” comes directly from instruction register names Some actions are performed at every instruction so no need for control (in this single cycle implementation) incrementing PC by 4; reading instr. memory for fetching next inst. CSE378 Single cycle implementation.

Building the control unit Decompose the problem into Data path control (register transfers) ALU control Setting of control lines by control unit totally specified in the ISA for ALU by opcode + function bits if R-R format for register names by instruction (including opcode) for reading/writing memory and writing register by opcode muxes by opcode PC by opcode + result of ALU CSE378 Single cycle implementation.

Example Limit ourselves to: ALU control R-R instructions: add, sub, and, or, slt – OPcode = 0 but different function bits Load-store: lw, sw Branch: beq ALU control Need to add for: add, lw, sw Need to sub for: sub, beq Need to and for :and Need to or for :or Need to set less than for : slt CSE378 Single cycle implementation.

ALU Control ALU control: combination of opcode and function bits Decoding of opcodes yields 3 possibilities hence 2 bits AluOp1 and ALUOp2 ALU control: Input 2 ALUop bits and 6 function bits Output one of 5 possible ALU functions Of course lots of don’t care for this *very* limited implementation CSE378 Single cycle implementation.

Implementation of Overall Control Unit Input: opcode (and function bits for R-R instructions) Output: setting of control lines Can be done by logic equations If not too many, like in RISC machines Use of PAL’s (cf. CSE 370). In RISC machines the control is “hardwired” If too large (too many states etc.) Use of microprogramming (a microprogram is a hardwired program that interprets the ISA) Or use a combination of both techniques (Pentium) CSE378 Single cycle implementation.

Where are control signals needed (cf. Figure 5.15) Register file RegWrite (Register write signal for R-type, Load) RegDst (Register destination signal: rd for R-type, rt for Load) ALU ALUSrc (What kind of second operand: register or immediate) ALUop (What kind of function: ALU control for R-type) Data memory MemRead (Load) or MemWrite (Store) MemtoReg (Result register written from ALU or memory) Branch control PCSrc (PC modification if branch is taken) CSE378 Single cycle implementation.

How are the control signals asserted Decoding of the opcode by control unit yields Control of the 3 muxes (RegDst, ALUSrc,MemtoReg): 3 control lines Signals for RegWrite, Memread,Memwrite: 3 control lines Signals to activate ALU control (e.g., restrict ourselves to 2) Signal for branch (1 control line) decoding of opcode ANDed with ALU zero result Input Opcode: 6 bits Output 9 control lines (see Figure 5.17) CSE378 Single cycle implementation.