CMPUT 329 - Computer Organization and Architecture II1 CMPUT329 - Fall 2003 TopicI: Building a Multicycle Data Path and a Control Path for a Microprocessor.

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

Microprocessor Design Multi-cycle Datapath Nia S. Bradley Vijay.
1 Chapter Five The Processor: Datapath and Control.
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.
CSE378 Multicycle impl,.1 Drawbacks of single cycle implementation All instructions take the same time although –some instructions are longer than others;
1 5.5 A Multicycle Implementation A single memory unit is used for both instructions and data. There is a single ALU, rather than an ALU and two adders.
CMPUT Computer Organization and Architecture II1 CMPUT229 - Fall 2003 TopicE: Building a Data Path and a Control Path for a Microprocessor José Nelson.
©UCB CS 161Computer Architecture Chapter 5 Lecture 11 Instructor: L.N. Bhuyan Adapted from notes by Dave Patterson (http.cs.berkeley.edu/~patterson)
Preparation for Midterm Binary Data Storage (integer, char, float pt) and Operations, Logic, Flip Flops, Switch Debouncing, Timing, Synchronous / Asynchronous.
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.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 TopicH: Building a Data Path and a Control Path for a Microprocessor José Nelson.
331 W10.1Spring :332:331 Computer Architecture and Assembly Language Spring 2005 Week 10 Building a Multi-Cycle Datapath [Adapted from Dave Patterson’s.
CSE431 L05 Basic MIPS Architecture.1Irwin, PSU, 2005 CSE 431 Computer Architecture Fall 2005 Lecture 05: Basic MIPS Architecture Review Mary Jane Irwin.
Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
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.
CMPE 421 Advanced Computer Architecture Supplementary material for Pipelining PART1.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Datapath and Control: MultiCycle Implementation. Performance of Single Cycle Machines °Assume following operation times: Memory units : 200 ps ALU and.
CPE232 Basic MIPS Architecture1 Computer Organization Multi-cycle Approach Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides
C HAPTER 5 T HE PROCESSOR : D ATAPATH AND C ONTROL M ULTICYCLE D ESIGN.
1 A single-cycle MIPS processor  An instruction set architecture is an interface that defines the hardware operations which are available to software.
Multicycle Implementation
LECTURE 6 Multi-Cycle Datapath and Control. SINGLE-CYCLE IMPLEMENTATION As we’ve seen, single-cycle implementation, although easy to implement, could.
ECE-C355 Computer Structures Winter 2008 The MIPS Datapath Slides have been adapted from Prof. Mary Jane Irwin ( )
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
Fall 2015, Sep ELEC / Lecture 5 1 ELEC / Computer Architecture and Design Fall 2015 Datapath and Control (Chapter.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 2.
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
RegDst 1: RegFile destination No. for the WR Reg. comes from rd field. 0: RegFile destination No. for the WR Reg. comes from rt field.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Design a MIPS Processor (II)
Multi-Cycle Datapath and Control
Chapter 5: A Multi-Cycle CPU.
Computer Architecture
IT 251 Computer Organization and Architecture
/ Computer Architecture and Design
ECE/CS 552: Multicycle Data Path
Systems Architecture I
Multi-Cycle CPU.
Single Cycle Processor
D.4 Finite State Diagram for the Multi-cycle processor
Multi-Cycle CPU.
MIPS processor continued
The Multicycle Implementation
CSCI206 - Computer Organization & Programming
A Multiple Clock Cycle Instruction Implementation
Systems Architecture II
Chapter Five The Processor: Datapath and Control
The Multicycle Implementation
Systems Architecture I
The Processor Lecture 3.2: Building a Datapath with Control
Vishwani D. Agrawal James J. Danaher Professor
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Processor: Multi-Cycle Datapath & Control
Chapter Four The Processor: Datapath and Control
Finite State Machine for Control
Control Unit for Multiple Cycle Implementation
5.5 A Multicycle Implementation
Processor Design Datapath and Design.
MIPS processor continued
Systems Architecture I
Control Unit for Multiple Cycle Implementation
FloorPlan for Multicycle MIPS
Alternative datapath (book): Multiple Cycle Datapath
The Processor: Datapath & Control.
Presentation transcript:

CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 TopicI: Building a Multicycle Data Path and a Control Path for a Microprocessor José Nelson Amaral

CMPUT Computer Organization and Architecture II2 Reading Material (optional) Patterson, David A., and Hennessy, John L., Computer Organization & Design: The Hardware/Software Interface, San Mateo, CA: Morgan Kaufmann Pub., Chapter 5 Appendix B Appendix C

CMPUT Computer Organization and Architecture II3 What is Wrong with the Single Cycle Datapath yThe clock cycle must have the same length for every instruction yTherefore the clock cycle cannot be shorter than the longest possible path yIn our example, this path is the load instruction, it uses: the instruction memory, the register file, the ALU, the data memory, and the register file.

CMPUT Computer Organization and Architecture II4 What is Wrong with the Single Cycle Datapath yIf we consider a machine with more complex instructions (p.e., floating-point arithmetics), or more powerful addressing modes, the single cycle penalty is unnaceptable. yThe solution is to adopt a design with shorter clock cycles, but that requires multiple clock cycles per instruction.

CMPUT Computer Organization and Architecture II5 MuxMux 0 1 MuxMux 0 1 MuxMux PC Sign ext. Shift left 2 Read address Write address Write data MemData Instruction [31-26] Instruction [25-0] Instruction register Memory Read register 1 Read register 2 Write register Write data Read data 1 Read data 2 Registers 4 32 MuxMux MuxMux ALU result Zero ALU 16 I[25-21] I[20-16] I[15-0] [15-11] A Multiple Cycle Datapath

CMPUT Computer Organization and Architecture II6 The Jump Instruction j loop Concatenate the 4 most significant bits of the PC with the 26 least significant bits of the IR[25-0] field of the instruction code and shift the result by two. Write the resulting value in the PC. PC  concat(PC[31-28],IR[25-0])<< OpCodeaddress I-Type Instruction Format

CMPUT Computer Organization and Architecture II7 Values to be written into the PC. Three possible values can be written into the PC according to the instruction executed: For taken branches: PC  PC (sign-extend(IR[15-0]) << 2) For jumps: PC  concat(PC[31-28],IR[25-0])<<2 For all other instructions: PC  PC + 4

CMPUT Computer Organization and Architecture II8 Steps to Execute Each Instruction Type

MuxMux 0 1 MuxMux 0 1 MuxMux MuxMux PC Sign ext. Shift left 2 Conc/ Shift left 2 Read address Write address Write data MemData Instruction [31-26] Instruction [25-0] Instruction register Memory Read register 1 Read register 2 Write register Write data Read data 1 Read data 2 Registers 4 32 MuxMux MuxMux ALU result Zero ALU Target I[25-21] I[20-16] I[15-0] [15-11]

MuxMux 0 1 MuxMux 0 1 MuxMux MuxMux PC Sign ext. Shift left 2 Conc/ Shift left 2 Read address Write address Write data MemData Instruction [31-26] Instruction [25-0] Instruction register Memory Read register 1 Read register 2 Write register Write data Read data 1 Read data 2 Registers 4 32 MuxMux MuxMux ALU result Zero ALU Target TargetWrite PCSource ALU control IorD MemWrite MemRead IRWrite MemtoReg ALUSelB RegDst RegWrite ALUSelA ALUOp I[25-21] I[20-16] I[15-0] [15-11] PcWrite

MuxMux 0 1 MuxMux 0 1 MuxMux MuxMux PC Sign ext. Shift left 2 ALU control Conc/ Shift left 2 Read address Write address Write data MemData Instruction [31-26] Instruction [25-0] Instruction register Memory Read register 1 Read register 2 Write register Write data Read data 1 Read data 2 Registers 4 32 MuxMux MuxMux ALU result Zero ALU Target Control Unit PcWrite PcWriteCond IorD MemWrite MemRead IRWrite MemtoReg ALUSelBRegDst RegWrite TargetWrite ALUSelA PCSource ALUOp I[25-21] I[20-16] I[15-0] [15-11] 32

CMPUT Computer Organization and Architecture II12 Designing the Control Unit for the Multicycle Datapath Instruction Fetch Instruction Decode Address Computation Execution Jump Completion Branch Completion Memory Read Memory Write R-Type Completion Write Back Load + Store R-type BranchJump Load Store

MemRead ALUSelA=0 IorD=0 IRWrite ALUSelB=01 ALUOp=00 PCWrite PCSource=00 ALUSelA=0 ALUSelB=11 ALUOp=00 TargetWrite ALUSelA=1 ALUSelB=10 ALUOp=00 ALUSelA=1 ALUSelB=00 ALUOp=10 PCWrite PCSource=10 ALUSelA=1 ALUSelB=00 ALUOp=01 PCWriteCond PCSource=01 MemRead ALUSelA=1 IorD=1 ALUSelB=10 ALUOp=00 MemWrite ALUSelA=1 IorD=1 ALUSelB=10 ALUOp=00 ALUSelA=1 RegDst=1 RegWrite MemtoReg=0 ALUSelB=0 ALUOp=10 MemRead ALUSelA=1 IorD=1 RegWrite MemtoReg=1 RegDst=0 ALUSelB=10 ALUOp=00 Load + Store R-type BranchJump Load Store

CMPUT Computer Organization and Architecture II14 Conventions All outputs that are not explictly asserted, are de-asserted, i.e., they must be specified for the correct operation of the datapath. If a signal that controls a multiplexor is not specified in a state, its value is don’t care, and the machine will work properly regardless of the input that is selected.

CMPUT Computer Organization and Architecture II15 Finite State Machine Controller State Register Input from Instruction Register Opcode Field 17 Datapath Control Outputs 21 Outputs 10 Inputs Combinatorial Control Logic