July 2005Computer Architecture, Data Path and ControlSlide 1 Part IV Data Path and Control.

Slides:



Advertisements
Similar presentations
Nov. 2014Computer Architecture, Data Path and ControlSlide 1 Part IV Data Path and Control.
Advertisements

13 Instruction Execution Steps
1 Chapter Five The Processor: Datapath and Control.
Part IV Data Path 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.
CSCE 212 Chapter 5 The Processor: Datapath and Control Instructor: Jason D. Bakos.
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.
14 Control Unit Synthesis
Copyright 1998 Morgan Kaufmann Publishers, Inc. All rights reserved. Digital Architectures1 Machine instructions execution steps (1) FETCH = Read the instruction.
1 The Processor: Datapath and Control We will design a microprocessor that includes a subset of the MIPS instruction set: –Memory access: load/store word.
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.
FAMU-FSU College of Engineering 1 Computer Architecture EEL 4713/5764, Spring 2006 Dr. Michael Frank Module #13 – Instruction Execution Steps (in a Single-Cycle.
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
A Small Set of Instructions Fig MicroMIPS instruction formats and naming of the various fields. Seven R-format ALU instructions ( add, sub,
The CPU Processor (CPU): the active part of the computer, which does all the work (data manipulation and decision-making) Datapath: portion of the processor.
1. 2 Instructions: Words of the language understood by CPU Instruction set: CPU’s vocabulary Instruction Set Architecture (ISA): CPU’s vocabulary together.
1 COMP541 Multicycle MIPS Montek Singh Apr 4, 2012.
CPE232 Basic MIPS Architecture1 Computer Organization Multi-cycle Approach Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides
Part IV Data Path and Control
1 CS/COE0447 Computer Organization & Assembly Language Multi-Cycle Execution.
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 Processor: Datapath and Control Single cycle processor –Datapath and Control Multicycle processor –Datapath and Control Microprogramming –Vertical and.
COMP541 Multicycle MIPS Montek Singh Mar 25, 2010.
Computer Architecture, Data Path and ControlSlide 1 Part IV Data Path and Control.
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.
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.
MIPS Processor.
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)
CS 230: Computer Organization and Assembly Language
IT 251 Computer Organization and Architecture
Part IV Data Path and Control
Systems Architecture I
Multi-Cycle CPU.
Multi-Cycle CPU.
Basic MIPS Architecture
CS/COE0447 Computer Organization & Assembly Language
Designing MIPS Processor (Single-Cycle) Presentation G
Instruction Execution in Simple Computer
CSCI206 - Computer Organization & Programming
CSCE 212 Chapter 5 The Processor: Datapath and Control
Systems Architecture II
Chapter Five The Processor: Datapath and Control
Topic 5: Processor Architecture Implementation Methodology
Composing the Elements
Composing the Elements
Systems Architecture I
The Processor Lecture 3.2: Building a Datapath with Control
Topic 5: Processor Architecture
Part IV Data Path and Control
Part IV Data Path and Control
14.1 A Multicycle Implementation
Chapter Four The Processor: Datapath and Control
5.5 A Multicycle Implementation
Systems Architecture I
FloorPlan for Multicycle MIPS
The Processor: Datapath & Control.
Processor: Datapath and Control
CS161 – Design and Architecture of Computer Systems
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

July 2005Computer Architecture, Data Path and ControlSlide 1 Part IV Data Path and Control

July 2005Computer Architecture, Data Path and ControlSlide 2 IV Data Path and Control Topics in This Part Chapter 13 Instruction Execution Steps Chapter 14 Control Unit Synthesis Chapter 15 Pipelined Data Paths Chapter 16 Pipeline Performance Limits Design a simple computer (MicroMIPS) to learn about: Data path – part of the CPU where data signals flow Control unit – guides data signals through data path Pipelining – a way of achieving greater performance

July 2005Computer Architecture, Data Path and ControlSlide 3 14 Control Unit Synthesis The control unit for the single-cycle design is memoryless Problematic when instructions vary greatly in complexity Multiple cycles needed when resources must be reused Topics in This Chapter 14.1 A Multicycle Implementation 14.2 Choosing the Clock Cycle 14.3 The Control State Machine 14.4 Performance of the Multicycle Design 14.5 Microprogramming 14.6 Exception Handling (Multicycle CPU Design)

July 2005Computer Architecture, Data Path and ControlSlide A Multicycle Implementation Fig Single-cycle versus multicycle instruction execution.

July 2005Computer Architecture, Data Path and ControlSlide 5 A Multicycle Data Path Fig Abstract view of a multicycle instruction execution unit for MicroMIPS. For naming of instruction fields, see Fig

July 2005Computer Architecture, Data Path and ControlSlide 6 Multicycle Data Path with Control Signals Shown Fig Key elements of the multicycle MicroMIPS data path.

July 2005Computer Architecture, Data Path and ControlSlide Clock Cycle and Control Signals Table 14.1 Control signal0123 JumpAddr jtaSysCallAddr PCSrc 1, PCSrc 0 Jump addr x reg z regALU out PCWrite Don’t writeWrite InstData PC z reg MemRead Don’t readRead MemWrite Don’t writeWrite IRWrite Don’t writeWrite RegWrite Don’t writeWrite RegDst 1, RegDst 0 rtrd$31 RegInSrc Data reg z reg ALUSrcX PC x reg ALUSrcY 1, ALUSrcY 0 4 y regimm 4  imm AddSub AddSubtract LogicFn 1, LogicFn 0 ANDORXORNOR FnClass 1, FnClass 0 luiSet lessArithmeticLogic Register file ALU Cache Program counter

July 2005Computer Architecture, Data Path and ControlSlide 8 Execution Cycles Table 14.2 Execution cycles for multicycle MicroMIPS InstructionOperationsSignal settings Any Read out the instruction and write it into instruction register, increment PC InstData = 0, MemRead = 1 IRWrite = 1, ALUSrcX = 0 ALUSrcY = 0, ALUFunc = ‘+’ PCSrc = 3, PCWrite = 1 Any Read out rs & rt into x & y registers, compute branch address and save in z register ALUSrcX = 0, ALUSrcY = 3 ALUFunc = ‘+’ ALU type Perform ALU operation and save the result in z register ALUSrcX = 1, ALUSrcY = 1 or 2 ALUFunc: Varies Load/Store Add base and offset values, save in z register ALUSrcX = 1, ALUSrcY = 2 ALUFunc = ‘+’ Branch If (x reg) =  < (y reg), set PC to branch target address ALUSrcX = 1, ALUSrcY = 1 ALUFunc= ‘  ’, PCSrc = 2 PCWrite = ALUZero or ALUZero or ALUOut 31 Jump Set PC to the target address jta, SysCallAddr, or ( rs ) JumpAddr = 0 or 1, PCSrc = 0 or 1, PCWrite = 1 ALU type Write back z reg into rd RegDst = 1, RegInSrc = 1 RegWrite = 1 LoadRead memory into data reg InstData = 1, MemRead = 1 StoreCopy y reg into memory InstData = 1, MemWrite = 1 Load Copy data register into rt RegDst = 0, RegInSrc = 0 RegWrite = 1 Fetch & PC incr Decode & reg read ALU oper & PC update Reg write or mem access Reg write for lw

July 2005Computer Architecture, Data Path and ControlSlide The Control State Machine Fig The control state machine for multicycle MicroMIPS.

July 2005Computer Architecture, Data Path and ControlSlide 10 State and Instruction Decoding Fig State and instruction decoders for multicycle MicroMIPS. addiInst

July 2005Computer Architecture, Data Path and ControlSlide 11 Control Signal Generation Certain control signals depend only on the control state ALUSrcX = ControlSt2  ControlSt5  ControlSt7 RegWrite = ControlSt4  ControlSt8 Auxiliary signals identifying instruction classes addsubInst = addInst  subInst  addiInst logicInst = andInst  orInst  xorInst  norInst  andiInst  oriInst  xoriInst Logic expressions for ALU control signals AddSub = ControlSt5  (ControlSt7  subInst) FnClass 1 = ControlSt7  addsubInst  logicInst FnClass 0 = ControlSt7  (logicInst  sltInst  sltiInst) LogicFn 1 = ControlSt7  (xorInst  xoriInst  norInst) LogicFn 0 = ControlSt7  (orInst  oriInst  norInst)

July 2005Computer Architecture, Data Path and ControlSlide Performance of the Multicycle Design Fig The MicroMIPS data path unfolded (by depicting the register write step as a separate block) so as to better visualize the critical-path latencies. R-type44% 4 cycles Load24% 5 cycles Store12% 4 cycles Branch18% 3 cycles Jump 2% 3 cycles Contribution to CPI R-type 0.44  4= 1.76 Load 0.24  5= 1.20 Store 0.12  4= 0.48 Branch 0.18  3= 0.54 Jump 0.02  3= 0.06 _____________________________ Average CPI  4.04

July 2005Computer Architecture, Data Path and ControlSlide Microprogramming Fig Possible 22-bit microinstruction format for MicroMIPS.

July 2005Computer Architecture, Data Path and ControlSlide 14 Control Unit for Microprogramming Fig Microprogrammed control unit for MicroMIPS. fetch: andi: Multiway branch

July 2005Computer Architecture, Data Path and ControlSlide 15 Microprogram for MicroMIPS Fig The complete MicroMIPS microprogram. fetch:PCnext, CacheFetch, PC+4# State 0 (start) PC + 4imm,  PCdisp1# State 1 lui1:lui(imm)# State 7lui rt  z,  PCfetch# State 8lui add1:x + y# State 7add rd  z,  PCfetch# State 8add sub1:x - y# State 7sub rd  z,  PCfetch# State 8sub slt1:x - y# State 7slt rd  z,  PCfetch# State 8slt addi1:x + imm# State 7addi rt  z,  PCfetch# State 8addi slti1:x - imm# State 7slti rt  z,  PCfetch# State 8slti and1:x  y# State 7and rd  z,  PCfetch# State 8and or1:x  y# State 7or rd  z,  PCfetch# State 8or xor1:x  y# State 7xor rd  z,  PCfetch# State 8xor nor1:x  y# State 7nor rd  z,  PCfetch# State 8nor andi1:x  imm# State 7andi rt  z,  PCfetch# State 8andi ori1:x  imm# State 7ori rt  z,  PCfetch# State 8ori xori:x  imm# State 7xori rt  z,  PCfetch# State 8xori lwsw1:x + imm, mPCdisp2# State 2 lw2:CacheLoad# State 3 rt  Data,  PCfetch# State 4 sw2:CacheStore,  PCfetch# State 6 j1:PCjump,  PCfetch# State 5j jr1:PCjreg,  PCfetch# State 5jr branch1:PCbranch,  PCfetch# State 5branch jal1:PCjump, $31  PC,  PCfetch# State 5jal syscall1:PCsyscall,  PCfetch# State 5syscall

July 2005Computer Architecture, Data Path and ControlSlide Exception Handling Exceptions and interrupts alter the normal program flow Examples of exceptions (things that can go wrong):  ALU operation leads to overflow (incorrect result is obtained)  Opcode field holds a pattern not representing a legal operation  Cache error-code checker deems an accessed word invalid  Sensor signals a hazardous condition (e.g., overheating) Exception handler is an OS program that takes care of the problem  Derives correct result of overflowing computation, if possible  Invalid operation may be a software-implemented instruction Interrupts are similar, but usually have external causes (e.g., I/O)

July 2005Computer Architecture, Data Path and ControlSlide 17 Exception Control States Fig Exception states 9 and 10 added to the control state machine.