COMP303 - Computer Architecture Lecture 10. Multi-Cycle Design & Exceptions
|
|
- Dylan Dean
- 6 years ago
- Views:
Transcription
1 COP33 - Computer Architecture Lecture ulti-cycle Design & Exceptions
2 Single Cycle Datapath We designed a processor that requires one cycle per instruction RegDst busw 32 Clk RegWr Rd ux imm6 Rt 5 5 Rs 5 Rw Ra Rb bit Registers 6 Rt busb 32 Sign Extender npc_sel Clk busa ux ALUSrc Fetch Unit ALUctr Data In ALU 32 Clk Equal 32 <3:> Rt <2:25> WrEn Rs <6:2> emwr Adr Data emory Rd emrd <:5> 32 <:5> Imm6 ux emtoreg
3 What s wrong with our CPI= processor? Arithmetic & Logical PC Inst emory Reg File mux ALU mux setup Load PC Inst emory Reg File mux ALU Data em mux setup Critical Path Store PC Inst emory Reg File mux ALU Data em Branch PC Inst emory Reg File cmp mux Long cycle time All instructions take as much time as the slowest Real memory is not so nice as our idealized memory cannot always get the job done in one (short) cycle
4 Reducing Cycle Time Cut combinational dependency graph and insert register / latch Do same work in two fast cycles, rather than one slow one storage element storage element Acyclic Combinational Logic Acyclic Combinational Logic (A) => storage element storage element Acyclic Combinational Logic (B) storage element
5 Basic Limits on Cycle Time Next address logic PC <= branch? PC offset : PC + 4 Fetch Reg <= em[pc] Operand Fetch A <= R[rs], B <= R[rt] ALU execution ALUOut <= A op B Data emory Access <= em[aluout] Result Store R[rd] <= ALUOut Control npc_sel ALUSrc ALUctr emrd emwr RegDst RegWr Next PC PC Fetch Operand Fetch Exec emory Access Reg. File Result Store
6 Partitioning the CPI= Datapath Add registers between smallest steps Exec Next PC PC Fetch Operand Fetch emory Access Reg. File npc_sel ALUSrc ALUctr emrd emwr RegDst RegWr Result Store Allow the instruction to take multiple cycles.
7 Example ulticycle Datapath Fetch Operand Fetch Result Store em Access Next PC PC IR Ext ALU Reg. File npc_sel ALUSrc ALUctr emrd emwr emtoreg RegDst RegWr Reg File A B S Additional registers are added to store values between stages.
8 R-type instructions (add, sub,...) inst Logical Register Transfers ADD R[rd] R[rs] + R[rt]; PC PC + 4 inst ADD Physical Register Transfers IR E[PC] A R[rs]; B R[rt] S A + B R[rd] S; PC PC + 4 Next PC PC Inst. em IR Reg File A B Exec S em Access Reg. File
9 Load instruction inst LW inst LW Logical Register Transfers R[rt] E(R[rs] + sx(im6); PC PC + 4 Physical Register Transfers IR E[PC] A R[rs]; B R[rt] S A + SignEx(Im6) E[S] R[rd] ; PC PC + 4 Next PC PC Inst. em IR Reg File A B Exec S em Access Reg. File
10 Store instruction inst SW inst SW Logical Register Transfers E(R[rs] + sx(im6) R[rt]; PC PC + 4 Physical Register Transfers IR E[PC] A R[rs]; B R[rt] S A + SignEx(Im6); E[S] B PC PC + 4 Next PC PC Inst. em IR Reg File A B Exec S em Access Reg. File
11 Branch instruction inst BEQ Logical Register Transfers if R[rs] == R[rt] then PC PC + sx(im6) else PC PC + 4 inst Physical Register Transfers IR E[pc] A R[rs]; B R[rt] Eq =(A - B = = ) BEQ&Eq PC PC + sx(im6) Next PC PC Inst. em IR Reg File A B Exec S em Access Reg. File
12 ulticycle Implementation Each step in a multicycle implementation will take clock cycle. ulticycle implementation allows a functional unit to be used more than once per instruction, as long as it is used on different clock cycles. Using a functional unit more than once can help to reduce the amount of hardware required. The ability to allow instructions to take different number of clock cycles is another advantage of multicycle implementation.
13 ulticycle Datapath (Figure 5.26, p.32) PC u x Address emory emdata Write data [25-2] [2-6] [5-] Instr. [5-] register [5-] emory data register u x u x Read reg Read reg 2 Write register Write data Read data Registers Read data 2 Sign extend 6 32 A Shift left 2 B 4 u x 2 3 ALU zero ALU result ALUout Differences between single-cycle and multicycle datapath A single memory unit is used for both instruction and data. There is a single ALU, rather than an ALU and two adders. One or more registers are added after every major functional unit to hold the output of that unit until the value is used in a subsequent clock cycle.
14 ulticycle Datapath with Control Lines emread IorD emwrite IRWrite RegDst RegWrite ALUSrcA PC u x Address emory emdata Write data [25-2] [2-6] [5-] Instr. [5-] register [5-] emory data register u x u x Read reg Read reg 2 Write register Write data Read data Registers Read data 2 Sign extend 6 32 A Shift left 2 B 4 u x 2 3 ALU zero ALU result ALU control ALUout [5-] emtoreg ALUSrcB ALUop
15 Figure 5.28: Complete Datapath & Control Signals for ulticycle Implementation (including jump instruction) PCWriteCond PCWrite lord emread emwrite emtoreg IRWrite Outputs Control Op [5-] PCSource ALUOp ALUSrcB ALUSrcA RegWrite RegDst [25-] Shift left 2 Jump address [3-] u 2 x PC u x Address emory emdata Write data [3-26] [25-2] [2-6] [5-] Instr. [5-] register [5-] emory data register u x Read reg Read reg 2 Write register Write data Read data Registers Read data 2 u x Sign extend 6 32 Shift left 2 A B 4 u x u 2 x 3 PC [3-28] ALU control ALU Zero ALU result ALUOut [5-]
16 Execution Steps () Fetch IR = emory[pc]; PC = PC + 4;
17 Execution Steps (2) Decode and Register Fetch A = Reg[IR[25..2]]; B = Reg[IR[2..6]]; ALUOut = PC + (signextend(ir[5..]) << 2);
18 Execution Steps (3) Execution, memory address computation or branch completion emory Reference: ALUOut = A + signextend(ir[5..]); Arithmetic/Logical Operation: ALUOut = A op B; Branch: If (A == B) PC = ALUOut; Jump: PC = PC[3..28] (IR[25..) << 2);
19 Execution Steps (4) emory access or R-type instruction completion emory Reference: DR = emory[aluout]; or emory[aluout] = B; Arithmetic/Logical s (R-type): Reg[IR[5..]] = ALUOut; Branch, Jump: Nothing
20 Execution Steps (5) emory Read completion (Load only) Reg[IR[2..6]] = DR;
21 Finite State achine Control for ulticycle Datapath Start emread ALUSrcA = lord = IRWrite ALUSrcB = ALUOp = PCWrite PCSource = fetch decode/ register fetch ALUSrcA = ALUSrcB = ALUOp = emory address computation Execution Branch completion ALUSrcA = ALUSrcA = ALUSrcA = ALUSrcB = ALUSrcB = ALUSrcB = PCWrite ALUOp = ALUOp = ALUOp = PCWriteCond PCSource = PCSource = (Op = J ) Jump completion (Op = LW ) emory access emory access R-type completion emread lord = emwrite lord = RegDst = RegWrite emtoreg = 4 emory read completion step RegDst = RegWrite emtoreg =
22 Implementation of Finite State achine Controller PCWrite Datapath control outputs ALUOp ALUSrcB ALUSrcA RegWrite RegDst Combinational control logic Outputs PCWriteCond IorD emread emwrite IRWrite emtoreg PCSource Datapath control outputs Inputs NS3 NS2 NS NS Op5 Op4 Op3 Op2 Op Op instruction register opcode field S3 S2 S S State register Next State
23 Logic Equation for Control Signal Outputs Output PCWrite PCWriteCond IorD emread emwrite IRWrite emtoreg PCSource PCSource ALUOp ALUOp ALUSrcB ALUSrcB ALUSrcA RegWrite RegDst Current States state + state9 state8 state3 + state5 state + state3 state5 state state4 state9 state8 state6 state8 state + state2 state + state state2 + state6 + state8 state4 + state7 state7 For Example: PCWrite = S3 S2 S S + S3 S2 S S
24 Logic Equation for Next State Outputs Output Current States Op NextState state4 + state5 + state7 + state8 + state9 NextState state NextState2 state (Op = lw ) + (Op = sw ) NextState3 state2 (Op = lw ) NextState4 state3 NextState5 state2 (Op = sw ) NextState6 state (Op = R-type ) NextState7 state6 NextState8 state (Op = beq ) NextState9 state (Op = jump ) For Example: NextState = State = S3 S2 S S NextState3 = State2 (Op[5-]= lw ) = S3 S2 S S Op5 Op4 Op3 Op2 Op
25 Performance Evaluation What is the average CPI? state diagram gives CPI for each instruction type workload gives frequency of each type Type CPI i for type Frequency CPI i x freq i Arith/Logic 4 4%.6 Load 5 3%.5 Store 4 %.4 branch 3 2%.6 Average CPI: 4.
26 Exceptions and Interrupts Exceptions are exceptional events that disrupt the normal flow of a program Terminology varies between different machines Examples of Interrupts User hitting the keyboard Disk drive asking for attention Arrival of a network packet Examples of Exceptions Divide by zero Overflow Invalid instruction Page fault (non-resident page in memory)
27 Exception Flow When an exception (or interrupt) occurs, control is transferred to the OS User program Operating System Event exception System exception handler Exception return (optional)
28 IPS convention Exception means any unexpected change in control flow, without distinguishing internal or external; Use the term interrupt only when the event is externally caused. Type of event From where? IPS terminology I/O device request External Interrupt Invoke OS from user program Internal Exception Arithmetic overflow Internal Exception Using an undefined instruction Internal Exception Hardware malfunctions Either Exception or Interrupt
29 Handling Exceptions and Interrupts When do we jump to an exception? Upon detection, invoke the OS to service the event What about in the middle of executing a multi-cycle instruction Difficult to abort the middle of an instruction Processor checks for event at the end of every instruction Processor provides EPC & Cause registers to inform OS of cause EPC a 32-bit register used to hold the address of the affected instruction. Cause a register used to record the cause of the exception. To simplify the discussion, assume undefined instruction= arithmetic overflow=
30 Handling Exceptions and Interrupts Status - interrupt mask and enable bits and determines what exceptions can occur. Control signals to write EPC, Cause, and Status Be able to write exception address into PC, increase mux set PC to exception address (8 8 hex ). ay have to undo PC = PC + 4, since want EPC to point to offending instruction (not its successor); PC = PC 4
31 Figure 5.39: The multicycle datapath with the addition needed to implement exceptions PCWriteCond PCWrite lord emread emwrite emtoreg IRWrite Outputs Control Op [5-] CauseWrite IntCause EPCWrite PCSource ALUOp ALUSrcB ALUSrcA RegWrite RegDst PC u x Address emory emdata Write data [3-26] [25-2] [2-6] [5-] Instr. [5-] register [5-] emory data register [25-] u x Read reg Read reg 2 Write register Write data Read data Registers Read data 2 u x Sign extend 6 32 Shift left 2 A B 4 u x u 2 x Shift left 2 PC [3-28] ALU control ALU Zero ALU result Jump address [3-] 8 8 ALUOut u 2 x 3 EPC u x Cause [5-]
32 How Control Detects Exceptions Undefined detected when no next state is defined from state for the op value. We handle this exception by defining the next state value for all op values other than lw, sw, (R-type), j, and beq as new state. Shown symbolically using other to indicate that the op field does not match any of the opcodes that label arcs out of state. Arithmetic overflow included logic in the ALU to detect overflow, and a signal called Overflow is provided as an output from the ALU. This signal is used in the modified finite state machine to specify an additional possible next state. Note: Challenge in designing control of a real machine is to handle different interactions between instructions and other exceptioncausing events such that control logic remains small and fast. Complex interactions makes the control unit the most challenging aspect of hardware design
33 Figure 5.4: Finite state machine to handle exception detection Start emread ALUSrcA = lord = IRWrite ALUSrcB = ALUOp = PCWrite PCSource = fetch decode/ Register fetch ALUSrcA = ALUSrcB = ALUOp = emory address computation Execution Branch completion Branch completion ALUSrcA = ALUSrcA = ALUSrcA = ALUSrcB = ALUSrcB = ALUSrcB = PCWrite ALUOp = ALUOp = ALUOp = PCWriteCond PCSource = PCSource = (Op = J ) (Op = LW ) emory emory access access R-type completion IntCause = CauseWrite emread RegDst = emread ALUSrcA = lord = RegWrite Overflow lord = ALUSrcB = emtoreg = ALUOp = EPCWrite PCWrite PCSource = Write-back step Overflow 4 IntCause = CauseWrite ALUSrcA = ALUSrcB = ALUOp = EPCWrite PCWrite PCSource = RegWrite emtoreg = RegDst =
34 Summary Disadvantages of the Single Cycle Processor Long cycle time Cycle time is too long for all instructions except the Load ulticycle implementations have the advantage of using a different number of cycles for executing each instruction. ulticycle Processor: Divide the instructions into smaller steps Execute each step (instead of the entire instruction) in one cycle Control is specified by finite state diagram (icroprogramming is used for complex instruction set) The most widely used machine implementation is neither single cycle, nor multicycle it s the pipelined implementation (next improvement we will study).
35 Optional Homework In Ch.5: 2, 8,, 27, 3, 33, 36, 43
Lecture 10 Multi-Cycle Implementation
Lecture 10 ulti-cycle Implementation 1 Today s enu ulti-cycle machines Why multi-cycle? Comparative performance Physical and Logical Design of Datapath and Control icroprogramming 2 ulti-cycle Solution
More informationMajor CPU Design Steps
Datapath Major CPU Design Steps. Analyze instruction set operations using independent RTN ISA => RTN => datapath requirements. This provides the the required datapath components and how they are connected
More informationCPU Design Steps. EECC550 - Shaaban
CPU Design Steps 1. Analyze instruction set operations using independent RTN => datapath requirements. 2. Select set of datapath components & establish clock methodology. 3. Assemble datapath meeting the
More informationCOMP303 - Computer Architecture Lecture 8. Designing a Single Cycle Datapath
COMP33 - Computer Architecture Lecture 8 Designing a Single Cycle Datapath The Big Picture The Five Classic Components of a Computer Processor Input Control Memory Datapath Output The Big Picture: The
More informationCSE 2021 Computer Organization. Hugh Chesser, CSEB 1012U W10-M
CSE 22 Computer Organization Hugh Chesser, CSEB 2U Agenda Topics:. ultiple cycle implementation - complete Patterson: Appendix C, D 2 Breaking the Execution into Clock Cycles Execution of each instruction
More informationDesigning a Multicycle Processor
Designing a Multicycle Processor Arquitectura de Computadoras Arturo Díaz D PérezP Centro de Investigación n y de Estudios Avanzados del IPN adiaz@cinvestav.mx Arquitectura de Computadoras Multicycle-
More informationRISC Processor Design
RISC Processor Design Single Cycle Implementation - MIPS Virendra Singh Indian Institute of Science Bangalore virendra@computer.org Lecture 13 SE-273: Processor Design Feb 07, 2011 SE-273@SERC 1 Courtesy:
More informationProcessor: Multi- Cycle Datapath & Control
Processor: Multi- Cycle Datapath & Control (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann, 27) COURSE
More informationLecture 5: The Processor
Lecture 5: The Processor CSCE 26 Computer Organization Instructor: Saraju P. ohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed from various books, websites, authors pages, and
More informationCPE 335. Basic MIPS Architecture Part II
CPE 335 Computer Organization Basic MIPS Architecture Part II Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides http://www.abandah.com/gheith/courses/cpe335_s08/index.html CPE232 Basic MIPS Architecture
More informationInf2C - Computer Systems Lecture 12 Processor Design Multi-Cycle
Inf2C - Computer Systems Lecture 12 Processor Design Multi-Cycle Boris Grot School of Informatics University of Edinburgh Previous lecture: single-cycle processor Inf2C Computer Systems - 2017-2018. Boris
More informationComputer Organization & Design The Hardware/Software Interface Chapter 5 The processor : Datapath and control
Computer Organization & Design The Hardware/Software Interface Chapter 5 The processor : Datapath and control Qing-song Shi http://.24.26.3 Email: zjsqs@zju.edu.cn Chapter 5 The processor : Datapath and
More informationCOMP303 Computer Architecture Lecture 9. Single Cycle Control
COMP33 Computer Architecture Lecture 9 Single Cycle Control A Single Cycle Datapath We have everything except control signals (underlined) RegDst busw Today s lecture will look at how to generate the control
More informationALUOut. Registers A. I + D Memory IR. combinatorial block. combinatorial block. combinatorial block MDR
Microprogramming Exceptions and interrupts 9 CMPE Fall 26 A. Di Blas Fall 26 CMPE CPU Multicycle From single-cycle to Multicycle CPU with sequential control: Finite State Machine Textbook Edition: 5.4,
More informationWhat do we have so far? Multi-Cycle Datapath (Textbook Version)
What do we have so far? ulti-cycle Datapath (Textbook Version) CPI: R-Type = 4, Load = 5, Store 4, Branch = 3 Only one instruction being processed in datapath How to lower CPI further? #1 Lec # 8 Summer2001
More informationENE 334 Microprocessors
ENE 334 Microprocessors Lecture 6: Datapath and Control : Dejwoot KHAWPARISUTH Adapted from Computer Organization and Design, 3 th & 4 th Edition, Patterson & Hennessy, 2005/2008, Elsevier (MK) http://webstaff.kmutt.ac.th/~dejwoot.kha/
More informationCS 152 Computer Architecture and Engineering. Lecture 10: Designing a Multicycle Processor
CS 152 Computer Architecture and Engineering Lecture 1: Designing a Multicycle Processor October 1, 1997 Dave Patterson (http.cs.berkeley.edu/~patterson) lecture slides: http://www-inst.eecs.berkeley.edu/~cs152/
More informationLECTURE 6. Multi-Cycle Datapath and Control
LECTURE 6 Multi-Cycle Datapath and Control SINGLE-CYCLE IMPLEMENTATION As we ve seen, single-cycle implementation, although easy to implement, could potentially be very inefficient. In single-cycle, we
More information361 datapath.1. Computer Architecture EECS 361 Lecture 8: Designing a Single Cycle Datapath
361 datapath.1 Computer Architecture EECS 361 Lecture 8: Designing a Single Cycle Datapath Outline of Today s Lecture Introduction Where are we with respect to the BIG picture? Questions and Administrative
More informationﻪﺘﻓﺮﺸﻴﭘ ﺮﺗﻮﻴﭙﻣﺎﻛ يرﺎﻤﻌﻣ MIPS يرﺎﻤﻌﻣ data path and ontrol control
معماري كامپيوتر پيشرفته معماري MIPS data path and control abbasi@basu.ac.ir Topics Building a datapath support a subset of the MIPS-I instruction-set A single cycle processor datapath all instruction actions
More informationRISC Architecture: Multi-Cycle Implementation
RISC Architecture: Multi-Cycle Implementation Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab Department of Electrical Engineering Indian Institute of Technology Bombay
More informationSystems Architecture I
Systems Architecture I Topics A Simple Implementation of MIPS * A Multicycle Implementation of MIPS ** *This lecture was derived from material in the text (sec. 5.1-5.3). **This lecture was derived from
More informationLecture 5 and 6. ICS 152 Computer Systems Architecture. Prof. Juan Luis Aragón
ICS 152 Computer Systems Architecture Prof. Juan Luis Aragón Lecture 5 and 6 Multicycle Implementation Introduction to Microprogramming Readings: Sections 5.4 and 5.5 1 Review of Last Lecture We have seen
More informationMIPS-Lite Single-Cycle Control
MIPS-Lite Single-Cycle Control COE68: Computer Organization and Architecture Dr. Gul N. Khan http://www.ee.ryerson.ca/~gnkhan Electrical and Computer Engineering Ryerson University Overview Single cycle
More informationRISC Architecture: Multi-Cycle Implementation
RISC Architecture: Multi-Cycle Implementation Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab Department of Electrical Engineering Indian Institute of Technology Bombay
More information361 control.1. EECS 361 Computer Architecture Lecture 9: Designing Single Cycle Control
36 control. EECS 36 Computer Architecture Lecture 9: Designing Single Cycle Control Recap: The MIPS Subset ADD and subtract add rd, rs, rt sub rd, rs, rt OR Imm: ori rt, rs, imm6 3 3 26 2 6 op rs rt rd
More informationCpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath
CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath CPE 442 single-cycle datapath.1 Outline of Today s Lecture Recap and Introduction Where are we with respect to the BIG picture?
More informationRISC Design: Multi-Cycle Implementation
RISC Design: Multi-Cycle Implementation Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab Department of Electrical Engineering Indian Institute of Technology Bombay http://www.ee.iitb.ac.in/~viren/
More informationCSE 2021 COMPUTER ORGANIZATION
CSE 22 COMPUTER ORGANIZATION HUGH CHESSER CHESSER HUGH CSEB 2U 2U CSEB Agenda Topics:. Sample Exam/Quiz Q - Review 2. Multiple cycle implementation Patterson: Section 4.5 Reminder: Quiz #2 Next Wednesday
More informationCS3350B Computer Architecture Winter Lecture 5.7: Single-Cycle CPU: Datapath Control (Part 2)
CS335B Computer Architecture Winter 25 Lecture 5.7: Single-Cycle CPU: Datapath Control (Part 2) Marc Moreno Maza www.csd.uwo.ca/courses/cs335b [Adapted from lectures on Computer Organization and Design,
More informationInitial Representation Finite State Diagram. Logic Representation Logic Equations
Control Implementation Alternatives Control may be designed using one of several initial representations. The choice of sequence control, and how logic is represented, can then be determined independently;
More informationECE 313 Computer Organization EXAM 2 November 9, 2001
ECE 33 Computer Organization EA 2 November 9, 2 This exam is open book and open notes. You have 5 minutes. Credit for problems requiring calculation will be given only if you show your work. Choose and
More informationInitial Representation Finite State Diagram Microprogram. Sequencing Control Explicit Next State Microprogram counter
Control Implementation Alternatives Control may be designed using one of several initial representations. The choice of sequence control, and how logic is represented, can then be determined independently;
More informationPoints available Your marks Total 100
CSSE 3 Computer Architecture I Rose-Hulman Institute of Technology Computer Science and Software Engineering Department Exam Name: Section: 3 This exam is closed book. You are allowed to use the reference
More informationThe Big Picture: Where are We Now? EEM 486: Computer Architecture. Lecture 3. Designing a Single Cycle Datapath
The Big Picture: Where are We Now? EEM 486: Computer Architecture Lecture 3 The Five Classic Components of a Computer Processor Input Control Memory Designing a Single Cycle path path Output Today s Topic:
More informationT = I x CPI x C. Both effective CPI and clock cycle C are heavily influenced by CPU design. CPI increased (3-5) bad Shorter cycle good
CPU performance equation: T = I x CPI x C Both effective CPI and clock cycle C are heavily influenced by CPU design. For single-cycle CPU: CPI = 1 good Long cycle time bad On the other hand, for multi-cycle
More informationCSE 2021 COMPUTER ORGANIZATION
CSE 2021 COMPUTER ORGANIZATION HUGH LAS CHESSER 1012U HUGH CHESSER CSEB 1012U W10-M Agenda Topics: 1. Multiple cycle implementation review 2. State Machine 3. Control Unit implementation for Multi-cycle
More informationCO Computer Architecture and Programming Languages CAPL. Lecture 18 & 19
CO2-3224 Computer Architecture and Programming Languages CAPL Lecture 8 & 9 Dr. Kinga Lipskoch Fall 27 Single Cycle Disadvantages & Advantages Uses the clock cycle inefficiently the clock cycle must be
More informationCPU Organization (Design)
ISA Requirements CPU Organization (Design) Datapath Design: Capabilities & performance characteristics of principal Functional Units (FUs) needed by ISA instructions (e.g., Registers, ALU, Shifters, Logic
More informationCC 311- Computer Architecture. The Processor - Control
CC 311- Computer Architecture The Processor - Control Control Unit Functions: Instruction code Control Unit Control Signals Select operations to be performed (ALU, read/write, etc.) Control data flow (multiplexor
More informationCS152 Computer Architecture and Engineering Lecture 13: Microprogramming and Exceptions. Review of a Multiple Cycle Implementation
CS152 Computer Architecture and Engineering Lecture 13: Microprogramming and Exceptions March 3, 1995 Dave Patterson (patterson@cs) and Shing Kong (shing.kong@eng.sun.com) Slides available on http://http.cs.berkeley.edu/~patterson
More informationAlternative to single cycle. Drawbacks of single cycle implementation. Multiple cycle implementation. Instruction fetch
Drawbacks of single cycle implementation Alternative to single cycle All instructions take the same time although some instructions are longer than others; e.g. load is longer than add since it has to
More informationELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control
ELEC 52/62 Computer Architecture and Design Spring 217 Lecture 4: Datapath and Control Ujjwal Guin, Assistant Professor Department of Electrical and Computer Engineering Auburn University, Auburn, AL 36849
More informationLab 8: Multicycle Processor (Part 1) 0.0
Lab 8: ulticycle Processor (Part ). Introduction In this lab and the next, you will design and build your own multicycle IPS processor! Your processor should match the design from the text reprinted below
More informationTopic #6. Processor Design
Topic #6 Processor Design Major Goals! To present the single-cycle implementation and to develop the student's understanding of combinational and clocked sequential circuits and the relationship between
More informationChapter 5 Solutions: For More Practice
Chapter 5 Solutions: For More Practice 1 Chapter 5 Solutions: For More Practice 5.4 Fetching, reading registers, and writing the destination register takes a total of 300ps for both floating point add/subtract
More informationMicroprogramming. Microprogramming
Microprogramming Alternative way of specifying control FSM State -- bubble control signals in bubble next state given by signals on arc not a great language to specify when things are complex Treat as
More informationCS61C : Machine Structures
inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #19 Designing a Single-Cycle CPU 27-7-26 Scott Beamer Instructor AI Focuses on Poker CS61C L19 CPU Design : Designing a Single-Cycle CPU
More informationFull Datapath. CSCI 402: Computer Architectures. The Processor (2) 3/21/19. Fengguang Song Department of Computer & Information Science IUPUI
CSCI 42: Computer Architectures The Processor (2) Fengguang Song Department of Computer & Information Science IUPUI Full Datapath Branch Target Instruction Fetch Immediate 4 Today s Contents We have looked
More informationLecture #17: CPU Design II Control
Lecture #7: CPU Design II Control 25-7-9 Anatomy: 5 components of any Computer Personal Computer Computer Processor Control ( brain ) This week ( ) path ( brawn ) (where programs, data live when running)
More informationECE 313 Computer Organization FINAL EXAM December 14, This exam is open book and open notes. You have 2 hours.
This exam is open book and open notes. You have 2 hours. Problems 1-4 refer to a proposed MIPS instruction lwu (load word - update) which implements update addressing an addressing mode that is used in
More informationMulti-cycle Approach. Single cycle CPU. Multi-cycle CPU. Requires state elements to hold intermediate values. one clock cycle or instruction
Multi-cycle Approach Single cycle CPU State element Combinational logic State element clock one clock cycle or instruction Multi-cycle CPU Requires state elements to hold intermediate values State Element
More informationCSE 2021: Computer Organization Fall 2010 Solution to Assignment # 3: Multicycle Implementation
CSE 2021: Computer Organization Fall 2010 Solution to Assignment # 3: Multicycle Implementation Note that these questions are taken from the previous final exmas of CSE2021 and should serve as practice
More informationChapter 5: The Processor: Datapath and Control
Chapter 5: The Processor: Datapath and Control Overview Logic Design Conventions Building a Datapath and Control Unit Different Implementations of MIPS instruction set A simple implementation of a processor
More informationWorking on the Pipeline
Computer Science 6C Spring 27 Working on the Pipeline Datapath Control Signals Computer Science 6C Spring 27 MemWr: write memory MemtoReg: ALU; Mem RegDst: rt ; rd RegWr: write register 4 PC Ext Imm6 Adder
More informationCS 110 Computer Architecture Single-Cycle CPU Datapath & Control
CS Computer Architecture Single-Cycle CPU Datapath & Control Instructor: Sören Schwertfeger http://shtech.org/courses/ca/ School of Information Science and Technology SIST ShanghaiTech University Slides
More informationECE468 Computer Organization and Architecture. Designing a Single Cycle Datapath
ECE468 Computer Organization and Architecture Designing a Single Cycle Datapath ECE468 datapath1 The Big Picture: Where are We Now? The Five Classic Components of a Computer Processor Control Input Datapath
More informationCS 61C: Great Ideas in Computer Architecture. MIPS CPU Datapath, Control Introduction
CS 61C: Great Ideas in Computer Architecture MIPS CPU Datapath, Control Introduction Instructor: Alan Christopher 7/28/214 Summer 214 -- Lecture #2 1 Review of Last Lecture Critical path constrains clock
More informationControl Unit for Multiple Cycle Implementation
Control Unit for Multiple Cycle Implementation Control is more complex than in single cycle since: Need to define control signals for each step Need to know which step we are on Two methods for designing
More informationRecap: A Single Cycle Datapath. CS 152 Computer Architecture and Engineering Lecture 8. Single-Cycle (Con t) Designing a Multicycle Processor
CS 52 Computer Architecture and Engineering Lecture 8 Single-Cycle (Con t) Designing a Multicycle Processor February 23, 24 John Kubiatowicz (www.cs.berkeley.edu/~kubitron) lecture slides: http://inst.eecs.berkeley.edu/~cs52/
More informationCS 61C: Great Ideas in Computer Architecture Control and Pipelining
CS 6C: Great Ideas in Computer Architecture Control and Pipelining Instructors: Vladimir Stojanovic and Nicholas Weaver http://inst.eecs.berkeley.edu/~cs6c/sp6 Datapath Control Signals ExtOp: zero, sign
More informationCS152 Computer Architecture and Engineering. Lecture 8 Multicycle Design and Microcode John Lazzaro (www.cs.berkeley.
CS152 Computer Architecture and Engineering Lecture 8 Multicycle Design and Microcode 2004-09-23 John Lazzaro (www.cs.berkeley.edu/~lazzaro) Dave Patterson (www.cs.berkeley.edu/~patterson) www-inst.eecs.berkeley.edu/~cs152/
More informationEECS 322 Computer Architecture Improving Memory Access: the Cache
EECS 322 Computer Architecture Improving emory Access: the Cache Instructor: Francis G. Wolff wolff@eecs.cwru.edu Case Western Reserve University This presentation uses powerpoint animation: please viewshow
More informationCS61C : Machine Structures
inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 34 Single Cycle CPU Control I 24-4-16 Lecturer PSOE Dan Garcia www.cs.berkeley.edu/~ddgarcia 1.5 Quake?! NBC movie on May 3 rd. Truth stranger
More informationMultiple Cycle Data Path
Multiple Cycle Data Path CS 365 Lecture 7 Prof. Yih Huang CS365 1 Multicycle Approach Break up the instructions into steps, each step takes a cycle balance the amount of work to be done restrict each cycle
More informationLecture 8: Control COS / ELE 375. Computer Architecture and Organization. Princeton University Fall Prof. David August
Lecture 8: Control COS / ELE 375 Computer Architecture and Organization Princeton University Fall 2015 Prof. David August 1 Datapath and Control Datapath The collection of state elements, computation elements,
More informationECE369. Chapter 5 ECE369
Chapter 5 1 State Elements Unclocked vs. Clocked Clocks used in synchronous logic Clocks are needed in sequential logic to decide when an element that contains state should be updated. State element 1
More informationCS359: Computer Architecture. The Processor (A) Yanyan Shen Department of Computer Science and Engineering
CS359: Computer Architecture The Processor (A) Yanyan Shen Department of Computer Science and Engineering Eecuting R-type Instructions 7 Instructions ADD and subtract add rd, rs, rt sub rd, rs, rt OR Immediate:
More informationCSCI 402: Computer Architectures. Fengguang Song Department of Computer & Information Science IUPUI. Today s Content
3/6/8 CSCI 42: Computer Architectures The Processor (2) Fengguang Song Department of Computer & Information Science IUPUI Today s Content We have looked at how to design a Data Path. 4.4, 4.5 We will design
More informationCSE 141 Computer Architecture Summer Session Lecture 3 ALU Part 2 Single Cycle CPU Part 1. Pramod V. Argade
CSE 141 Computer Architecture Summer Session 1 2004 Lecture 3 ALU Part 2 Single Cycle CPU Part 1 Pramod V. Argade Reading Assignment Announcements Chapter 5: The Processor: Datapath and Control, Sec. 5.3-5.4
More informationUC Berkeley CS61C : Machine Structures
inst.eecs.berkeley.edu/~cs6c UC Berkeley CS6C : Machine Structures The Internet is broken?! The Clean Slate team at Stanford wants to revamp the Internet, making it safer (from viruses), more reliable
More informationCS 61C: Great Ideas in Computer Architecture Datapath. Instructors: John Wawrzynek & Vladimir Stojanovic
CS 61C: Great Ideas in Computer Architecture Datapath Instructors: John Wawrzynek & Vladimir Stojanovic http://inst.eecs.berkeley.edu/~cs61c/fa15 1 Components of a Computer Processor Control Enable? Read/Write
More informationSingle-Cycle Examples, Multi-Cycle Introduction
Single-Cycle Examples, ulti-cycle Introduction 1 Today s enu Single cycle examples Single cycle machines vs. multi-cycle machines Why multi-cycle? Comparative performance Physical and Logical Design of
More informationMapping Control to Hardware
C A P P E N D I X A custom format such as this is slave to the architecture of the hardware and the instruction set it serves. The format must strike a proper compromise between ROM size, ROM-output decoding,
More informationECE 313 Computer Organization Name SOLUTION EXAM 2 November 3, Floating Point 20 Points
ECE Computer Organization Name SOLTION EA November, This exam is open book and open notes. Credit for problems requiring calculation will be given only if you show your work.. Floating Point Points Translate
More informationThe Processor: Datapath & Control
Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture The Processor: Datapath & Control Processor Design Step 3 Assemble Datapath Meeting Requirements Build the
More informationTHE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination
THE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination May 23, 2014 Name: Email: Student ID: Lab Section Number: Instructions: 1. This
More informationEECS150 - Digital Design Lecture 10- CPU Microarchitecture. Processor Microarchitecture Introduction
EECS150 - Digital Design Lecture 10- CPU Microarchitecture Feb 18, 2010 John Wawrzynek Spring 2010 EECS150 - Lec10-cpu Page 1 Processor Microarchitecture Introduction Microarchitecture: how to implement
More informationUniversity of California College of Engineering Computer Science Division -EECS. CS 152 Midterm I
Name: University of California College of Engineering Computer Science Division -EECS Fall 996 D.E. Culler CS 52 Midterm I Your Name: ID Number: Discussion Section: You may bring one double-sided pages
More informationUC Berkeley CS61C : Machine Structures
inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine Structures Lecture 25 CPU Design: Designing a Single-cycle CPU Lecturer SOE Dan Garcia www.cs.berkeley.edu/~ddgarcia T-Mobile s Wi-Fi / Cell phone
More informationEEM 486: Computer Architecture. Lecture 3. Designing Single Cycle Control
EEM 48: Computer Architecture Lecture 3 Designing Single Cycle The Big Picture: Where are We Now? Processor Input path Output Lec 3.2 An Abstract View of the Implementation Ideal Address Net Address PC
More informationThe Processor: Datapath & Control
Chapter Five 1 The Processor: Datapath & Control We're ready to look at an implementation of the MIPS Simplified to contain only: memory-reference instructions: lw, sw arithmetic-logical instructions:
More informationImplementing the Control. Simple Questions
Simple Questions How many cycles will it take to execute this code? lw $t2, 0($t3) lw $t3, 4($t3) beq $t2, $t3, Label add $t5, $t2, $t3 sw $t5, 8($t3) Label:... #assume not What is going on during the
More informationUC Berkeley CS61C : Machine Structures
inst.eecs.berkeley.edu/~cs6c UC Berkeley CS6C : Machine Structures Lecture 26 Single-cycle CPU Control 27-3-2 Exhausted TA Ben Sussman www.icanhascheezburger.com Qutrits Bring Quantum Computers Closer:
More informationSingle Cycle CPU Design. Mehran Rezaei
Single Cycle CPU Design Mehran Rezaei What does it mean? Instruction Fetch Instruction Memory clk pc 32 32 address add $t,$t,$t2 instruction Next Logic to generate the address of next instruction The Branch
More informationHow to design a controller to produce signals to control the datapath
ECE48 Computer Organization and Architecture Designing Single Cycle How to design a controller to produce signals to control the datapath ECE48. 2--7 Recap: The MIPS Formats All MIPS instructions are bits
More informationCh 5: Designing a Single Cycle Datapath
Ch 5: esigning a Single Cycle path Computer Systems Architecture CS 365 The Big Picture: Where are We Now? The Five Classic Components of a Computer Processor Control Memory path Input Output Today s Topic:
More informationCS 61C: Great Ideas in Computer Architecture (Machine Structures) Single- Cycle CPU Datapath & Control Part 2
CS 6C: Great Ideas in Computer Architecture (Machine Structures) Single- Cycle CPU Datapath & Control Part 2 Instructors: Krste Asanovic & Vladimir Stojanovic hfp://inst.eecs.berkeley.edu/~cs6c/ Review:
More informationChapter 4. The Processor. Computer Architecture and IC Design Lab
Chapter 4 The Processor Introduction CPU performance factors CPI Clock Cycle Time Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS
More informationCS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 28: Single- Cycle CPU Datapath Control Part 1
CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 28: Single- Cycle CPU Datapath Control Part 1 Guest Lecturer: Sagar Karandikar hfp://inst.eecs.berkeley.edu/~cs61c/ http://research.microsoft.com/apps/pubs/default.aspx?id=212001!
More informationCOMPUTER ORGANIZATION AND DESIGN. The Hardware/Software Interface. Chapter 4. The Processor: A Based on P&H
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface Chapter 4 The Processor: A Based on P&H Introduction We will examine two MIPS implementations A simplified version A more realistic pipelined
More informationProcessor (I) - datapath & control. Hwansoo Han
Processor (I) - datapath & control Hwansoo Han Introduction CPU performance factors Instruction count - Determined by ISA and compiler CPI and Cycle time - Determined by CPU hardware We will examine two
More informationDesign of the MIPS Processor
Design of the MIPS Processor We will study the design of a simple version of MIPS that can support the following instructions: I-type instructions LW, SW R-type instructions, like ADD, SUB Conditional
More informationinst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 18 CPU Design: The Single-Cycle I ! Nasty new windows vulnerability!
inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 18 CPU Design: The Single-Cycle I CS61C L18 CPU Design: The Single-Cycle I (1)! 2010-07-21!!!Instructor Paul Pearce! Nasty new windows vulnerability!
More informationComputer and Information Sciences College / Computer Science Department The Processor: Datapath and Control
Computer and Information Sciences College / Computer Science Department The Processor: Datapath and Control Chapter 5 The Processor: Datapath and Control Big Picture: Where are We Now? Performance of a
More informationECE232: Hardware Organization and Design
ECE232: Hardware Organization and Design Lecture 14: One Cycle MIPs Datapath Adapted from Computer Organization and Design, Patterson & Hennessy, UCB R-Format Instructions Read two register operands Perform
More informationComputer Architecture Chapter 5. Fall 2005 Department of Computer Science Kent State University
Compter Architectre Chapter 5 Fall 25 Department of Compter Science Kent State University The Processor: Datapath & Control Or implementation of the MIPS is simplified memory-reference instrctions: lw,
More informationECE473 Computer Architecture and Organization. Processor: Combined Datapath
Computer Architecture and Organization Processor: Combined path Lecturer: Prof. Yifeng Zhu Fall, 2014 Portions of these slides are derived from: Dave Patterson CB 1 Where are we? Want to build a processor
More informationMulticycle Approach. Designing MIPS Processor
CSE 675.2: Introduction to Computer Architecture Multicycle Approach 8/8/25 Designing MIPS Processor (Multi-Cycle) Presentation H Slides by Gojko Babić and Elsevier Publishing We will be reusing functional
More informationLets Build a Processor
Lets Build a Processor Almost ready to move into chapter 5 and start building a processor First, let s review Boolean Logic and build the ALU we ll need (Material from Appendix B) operation a 32 ALU result
More information