EECC250 - Shaaban #1 lec #22 Winter99 2-16-2000 The Von-Neumann Computer Model Partitioning of the computing engine into components: –Central Processing.

Slides:



Advertisements
Similar presentations
CS152 Lec9.1 CS152 Computer Architecture and Engineering Lecture 9 Designing Single Cycle Control.
Advertisements

EECC550 - Shaaban #1 Lec # 4 Summer Major CPU Design Steps 1Using independent RTN, write the micro- operations required for all target ISA.
361 datapath Computer Architecture Lecture 8: Designing a Single Cycle Datapath.
The Processor: Datapath & Control
CS61C L26 Single Cycle CPU Datapath II (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
CS61C L20 Single-Cycle CPU Control (1) Beamer, Summer 2007 © UCB Scott Beamer Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS152 / Kubiatowicz Lec8.1 9/26/01©UCB Fall 2001 CS152 Computer Architecture and Engineering Lecture 8 Designing Single Cycle Control September 26, 2001.
CS61C L26 CPU Design : Designing a Single-Cycle CPU II (1) Garcia, Spring 2007 © UCB 3.6 TB DVDs? Maybe!  Researchers at Harvard have found a way to use.
Savio Chau Single Cycle Controller Design Last Time: Discussed the Designing of a Single Cycle Datapath Control Datapath Memory Processor (CPU) Input Output.
Processor II CPSC 321 Andreas Klappenecker. Midterm 1 Tuesday, October 5 Thursday, October 7 Advantage: less material Disadvantage: less preparation time.
CPU Organization (Design)
EECC550 - Shaaban #1 Lec # 5 Winter CPU Design Steps 1. Analyze instruction set operations using independent RTN => datapath requirements.
Ceg3420 control.1 ©UCB, DAP’ 97 CEG3420 Computer Design Lecture 9.2: Designing Single Cycle Control.
EECC550 - Shaaban #1 Lec # 4 Winter CPU Organization Datapath Design: –Capabilities & performance characteristics of principal Functional.
CS 61C L35 Single Cycle CPU Control II (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L34 Single Cycle CPU Control I (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
Microprocessor Design
ECE 232 L13. Control.1 ©UCB, DAP’ 97 ECE 232 Hardware Organization and Design Lecture 13 Control Design
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.
CS61C L25 CPU Design : Designing a Single-Cycle CPU (1) Garcia, Fall 2006 © UCB T-Mobile’s Wi-Fi / Cell phone  T-mobile just announced a new phone that.
CS 61C L17 Control (1) A Carle, Summer 2006 © UCB inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #17: CPU Design II – Control
EECC550 - Shaaban #1 Lec # 4 Winter CPU Organization (Design) Datapath Design: –Capabilities & performance characteristics of principal.
CS151B Computer Systems Architecture Winter 2002 TuTh 2-4pm BH Instructor: Prof. Jason Cong Lecture 8 Designing a Single Cycle Control.
CS61C L26 CPU Design : Designing a Single-Cycle CPU II (1) Garcia, Fall 2006 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
Inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 25 CPU design (of a single-cycle CPU) Intel is prototyping circuits that.
EECC550 - Shaaban #1 Lec # 4 Winter CPU Organization (Design) Datapath Design: –Capabilities & performance characteristics of principal.
EECC550 - Shaaban #1 Lec # 4 Winter Major CPU Design Steps 1Using independent RTN, write the micro- operations required for all target.
EEM 486: Computer Architecture Lecture 3 Designing a Single Cycle Datapath.
CS61C L27 Single-Cycle CPU Control (1) Garcia, Spring 2010 © UCB inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine Structures Lecture 27 Single-cycle.
CS 61C L16 Datapath (1) A Carle, Summer 2004 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #16 – Datapath Andy.
CS61C L20 Single Cycle Datapath, Control (1) Chae, Summer 2008 © UCB Albert Chae, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
361 control Computer Architecture Lecture 9: Designing Single Cycle Control.
CS61C L26 CPU Design : Designing a Single-Cycle CPU II (1) Garcia, Spring 2010 © UCB inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine Structures.
ECE 232 L12.Datapath.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 12 Datapath.
ELEN 350 Single Cycle Datapath Adapted from the lecture notes of John Kubiatowicz(UCB) and Hank Walker (TAMU)
CS61C L27 Single Cycle CPU Control (1) Garcia, Fall 2006 © UCB Wireless High Definition?  Several companies will be working on a “WirelessHD” standard,
CS3350B Computer Architecture Winter 2015 Lecture 5.6: Single-Cycle CPU: Datapath Control (Part 1) Marc Moreno Maza [Adapted.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Computer Organization CS224 Fall 2012 Lesson 26. Summary of Control Signals addsuborilwswbeqj RegDst ALUSrc MemtoReg RegWrite MemWrite Branch Jump ExtOp.
EEM 486: Computer Architecture Designing Single Cycle Control.
Gary MarsdenSlide 1University of Cape Town Chapter 5 - The Processor  Machine Performance factors –Instruction Count, Clock cycle time, Clock cycles per.
Designing a Single Cycle Datapath In this lecture, slides from lectures 3, 8 and 9 from the course Computer Architecture ECE 201 by Professor Mike Schulte.
EEM 486: Computer Architecture Designing a Single Cycle Datapath.
CPE 442 single-cycle datapath.1 Intro. To Computer Architecture CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath.
CS3350B Computer Architecture Winter 2015 Lecture 5.7: Single-Cycle CPU: Datapath Control (Part 2) Marc Moreno Maza [Adapted.
EECC550 - Shaaban #1 Lec # 4 Winter CPU Organization (Design) Datapath Design: –Capabilities & performance characteristics of principal.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
Csci 136 Computer Architecture II –Single-Cycle Datapath Xiuzhen Cheng
EEM 486: Computer Architecture Lecture 3 Designing Single Cycle Control.
CS 61C: Great Ideas in Computer Architecture (Machine Structures) Single-Cycle CPU Datapath & Control Part 2 Instructors: Krste Asanovic & Vladimir Stojanovic.
Single Cycle Controller Design
CS 110 Computer Architecture Lecture 11: Single-Cycle CPU Datapath & Control Instructor: Sören Schwertfeger School of Information.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
IT 251 Computer Organization and Architecture
(Chapter 5: Hennessy and Patterson) Winter Quarter 1998 Chris Myers
CS/COE0447 Computer Organization & Assembly Language
CPU Organization (Design)
CS/COE0447 Computer Organization & Assembly Language
Instructors: Randy H. Katz David A. Patterson
Topic 5: Processor Architecture Implementation Methodology
CS152 Computer Architecture and Engineering Lecture 8 Designing a Single Cycle Datapath Start: X:40.
The Processor Lecture 3.2: Building a Datapath with Control
COMS 361 Computer Organization
Prof. Giancarlo Succi, Ph.D., P.Eng.
Instructors: Randy H. Katz David A. Patterson
The Processor: Datapath & Control.
COMS 361 Computer Organization
What You Will Learn In Next Few Sets of Lectures
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

EECC250 - Shaaban #1 lec #22 Winter The Von-Neumann Computer Model Partitioning of the computing engine into components: –Central Processing Unit (CPU): Control Unit (instruction decode, sequencing of operations), Datapath (registers, arithmetic and logic unit, buses). –Memory: Instruction and operand storage. –Input/Output (I/O). –The stored program concept: Instructions from an instruction set are fetched from a common memory and executed one at a time. - Memory (instructions, data) Control Datapath registers ALU, buses CPU Computer System Input Output I/O Devices

EECC250 - Shaaban #2 lec #22 Winter Hardware Components of Any Computer Processor (active) Computer Control Unit Datapath Memory (passive) (where programs, data live when running) Devices Input Output Keyboard, Mouse, etc. Display, Printer, etc. Disk Five classic components of all computers: 1. Control Unit; 2. Datapath; 3. Memory; 4. Input; 5. Output 1. Control Unit; 2. Datapath; 3. Memory; 4. Input; 5. Output } Processor

EECC250 - Shaaban #3 lec #22 Winter CPU Organization Datapath Design: –Capabilities & performance characteristics of principal Functional Units (FUs): –(e.g., Registers, ALU, Shifters, Logic Units,...) –Ways in which these components are interconnected (buses connections, multiplexors, etc.). –How information flows between components. Control Unit Design: –Logic and means by which such information flow is controlled. –Control and coordination of FUs operation to realize the targeted Instruction Set Architecture to be implemented (can either be implemented using a finite state machine or a microprogram). Hardware description with a suitable language, possibly using Register Transfer Notation (RTN).

EECC250 - Shaaban #4 lec #22 Winter Hardware Description Hardware visualization: –Block diagrams (spatial visualization): Two-dimensional representations of functional units and their interconnections. –Timing charts (temporal visualization): Waveforms where events are displayed vs. time. Register Transfer Notation (RTN): –A way to describe microoperations capable of being performed by the data flow (data registers, data buses, functional units) at the register transfer level of design (RT). –Also describes conditional information in the system which cause operations to come about. –A “shorthand” notation for microoperations. Hardware Description Languages: –Examples: VHDL: VHSIC (Very High Speed Integrated Circuits) Hardware Description Language, Verilog.

EECC250 - Shaaban #5 lec #22 Winter Register Transfer Notation (RTN) Dependent RTN: When RTN is used after the data flow is assumed to be frozen. No data transfer can take place over a path that does not exist. No statement implies a function the data flow hardware is incapable of performing. Independent RTN: Describe actions on registers without regard to nonexistence of direct paths or intermediate registers. No predefined data flow. The general format of an RTN statement: Conditional information: Action1; Action2 The conditional statement is often an AND of literals (status and control signals) in the system (a p-term). The p-term is said to imply the action. Possible actions include transfer of data to/from registers/memory data shifting, functional unit operations etc.

EECC250 - Shaaban #6 lec #22 Winter RTN Statement Examples A  B –A copy of the data in entity B (typically a register) is placed in Register A –If the destination register has fewer bits than the source, the destination accepts only the lowest-order bits. –If the destination has more bits than the source, the value of the source is sign extended to the left. CTL  T0: A = B –The contents of B are presented to the input of combinational circuit A –This action to the right of “:” takes place when control signal CTL is active and signal T0 is active.

EECC250 - Shaaban #7 lec #22 Winter RTN Statement Examples MD  M[MA] –Memory locations are indicated by square brackets. –Means the memory data register receives the contents of the main memory (M) as addressed from the Memory Address (MA) register. AC(0), AC(1), AC(2),AC(3) –Register fields are indicated by parenthesis. –The concatenation operation is indicated by a comma. –Bit AC(0) is bit 0 of the accumulator AC –The above expression means AC bits 0, 1, 2, 3 –More commonly represented by AC(0-3) E  T3: CLRWRITE –The control signal CLRWRITE is activated when the condition E  T3 is active.

EECC250 - Shaaban #8 lec #22 Winter 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 requirements. 4. Analyze implementation of each instruction to determine setting of control points that effects the register transfer. 5. Assemble the control logic.

EECC250 - Shaaban #9 lec #22 Winter Instruction Processing Steps Obtain instruction from program storage Determine instruction type Obtain operands from registers Compute result value or status Store result in register/memory if needed (usually called Write Back). Update program counter to address of next instruction } Common steps for all instructions Instruction Fetch Instruction Decode Execute Result Store Next Instruction

EECC250 - Shaaban #10 lec #22 Winter A Subset of MIPS Instructions ADD and SUB: addU rd, rs, rt subU rd, rs, rt OR Immediate: ori rt, rs, imm16 LOAD and STORE Word lw rt, rs, imm16 sw rt, rs, imm16 BRANCH: beq rs, rt, imm16 oprsrtrdshamtfunct bits 5 bits oprsrtimmediate bits16 bits5 bits oprsrtimmediate bits16 bits5 bits oprsrtimmediate bits16 bits5 bits

EECC250 - Shaaban #11 lec #22 Winter Overview of MIPS Instruction Micro-operations All instructions go through these two steps: –Send program counter to instruction memory and fetch the instruction. (fetch) –Read one or two registers, using instruction fields. (decode) Load reads one register only. Additional instruction execution actions (execution) depend on the instruction in question, but similarities exist: –All instruction classes use the ALU after reading the registers: Memory reference instructions use it for address calculation. Arithmetic and logic instructions (R-Type), use it for the specified operation. Branches use it for comparison. Additional execution steps where instruction classes differ: –Memory reference instructions: Access memory for a load or store. –Arithmetic and logic instructions: Write ALU result back in register. –Branch instructions: Change next instruction address based on comparison.

EECC250 - Shaaban #12 lec #22 Winter Datapath Components Datapath Components Two state elements needed to store and access instructions: 1 Instruction memory: Only read access. No read control signal. 2 Program counter: 32-bit register. Written at end of every clock cycle: No write control signal. 32-bit Adder: To compute the the next instruction address. Instruction Word

EECC250 - Shaaban #13 lec #22 Winter More Datapath Components Register File: Contains all registers. Two read ports and one write port. Register writes by asserting write control signal Writes are edge-triggered. Can read and write to the same register in the same clock cycle. Register File Main ALU

EECC250 - Shaaban #14 lec #22 Winter Instruction Word  Mem[PC]Fetch the instruction PC  PC + 4Increment PC R[rd]  R[rs] + R[rt]Add register rs to register rt result in register rd R-Type Example: Micro-Operation Sequence For ADDU OPrs rt rdshamtfunct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits addU rd, rs, rt

EECC250 - Shaaban #15 lec #22 Winter Building The Datapath Portion of the datapath used for fetching instructions and incrementing the program counter. Instruction Fetch & PC Update:

EECC250 - Shaaban #16 lec #22 Winter Instruction Word  Mem[PC]Fetch the instruction PC  PC + 4Increment PC R[rt]  R[rs] OR ZeroExt[imm16]OR register rs with immediate field zero extended to 32 bits, result in register rt Example : Micro-Operation Sequence For ORI Logical Operations with Immediate Example : Micro-Operation Sequence For ORI oprsrtimmediate bits16 bits5 bits ori rt, rs, imm16

EECC250 - Shaaban #17 lec #22 Winter Datapath For Logical Instructions With Immediate 32 Result ALUctr Clk busW RegWr 32 busA 32 busB 555 RwRaRb bit Registers Rs RtRd RegDst ZeroExt Mux imm16 ALUSrc ALU

EECC250 - Shaaban #18 lec #22 Winter Instruction Word  Mem[PC]Fetch the instruction PC  PC + 4Increment PC R[rt]  Mem[R[rs] + SignExt[imm16]]Immediate field sign extended to 32 bits and added to register rs to form memory load address, word at load address to register rt Example : Micro-Operation Sequence For LW Load Operations Example : Micro-Operation Sequence For LW oprsrtimmediate bits16 bits5 bits lw rt, rs, imm16

EECC250 - Shaaban #19 lec #22 Winter Additional Datapath Components For Loads & Stores Inputs for address and write (store) data Output for read (load) result 16-bit input sign-extended into a 32-bit value at the output

EECC250 - Shaaban #20 lec #22 Winter Datapath For Loads 32 ALUctr Clk busW RegWr 32 busA 32 busB 555 RwRaRb bit Registers Rs RtRd RegDst Extender Mux imm16 ALUSrc ExtOp Clk Data In WrEn 32 Adr Data Memory 32 ALU MemWr Mu x W_Src

EECC250 - Shaaban #21 lec #22 Winter Instruction Word  Mem[PC]Fetch the instruction PC  PC + 4Increment PC Mem[R[rs] + SignExt[imm16]]  R[rt] Immediate field sign extended to 32 bits and added to register rs to form memory store address, register rt written to memory at store address. Example : Micro-Operation Sequence For SW Store Operations Example : Micro-Operation Sequence For SW oprsrtimmediate bits16 bits5 bits sw rt, rs, imm16

EECC250 - Shaaban #22 lec #22 Winter Datapath For Stores ALUSrc ExtOp 32 ALUctr Clk busW RegWr 32 busA 32 busB 555 RwRaRb bit Registers Rs Rt Rd RegDst Extender Mux imm16 Clk Data In WrEn 32 Adr Data Memory MemWr ALU 32 Mu x W_Src

EECC250 - Shaaban #23 lec #22 Winter Instruction Word  Mem[PC]Fetch the instruction PC  PC + 4Increment PC Equal  R[rs] == R[rt]Calculate the branch condition if (COND eq 0) PC  PC ( SignExt(imm16) x 4 ) Calculate the next instruction’s PC else address PC  PC + 4 Example : Micro-Operation Sequence For BEQ Conditional Branch Example : Micro-Operation Sequence For BEQ oprsrtimmediate bits16 bits5 bits beqrs, rt, imm16

EECC250 - Shaaban #24 lec #22 Winter Datapath For Branch Instructions ALU to evaluate branch condition Adder to compute branch target: Sum of incremented PC and the sign-extended lower 16-bits on the instruction.

EECC250 - Shaaban #25 lec #22 Winter Combining The Datapaths For Memory Instructions and R-Type Instructions Highlighted muliplexors and connections added to combine the datapaths of memory and R-Type instructions into one datapath

EECC250 - Shaaban #26 lec #22 Winter Instruction Fetch Datapath Added to ALU R-Type and Memory Instructions Datapath

EECC250 - Shaaban #27 lec #22 Winter A Simple Datapath For The MIPS Architecture Datapath of branches and a program counter multiplexor are added. Resulting datapath can execute in a single cycle the basic MIPS instruction: - load/store word - ALU operations - Branches

EECC250 - Shaaban #28 lec #22 Winter Single Cycle MIPS Datapath Necessary multiplexors and control lines are identified here:

EECC250 - Shaaban #29 lec #22 Winter Instruction Word  Mem[PC]Fetch the instruction PC  PC + 4Increment PC PC  PC(31-28),jump_target,00 Update PC with jump address : Micro-Operation Sequence For Jump: J Adding Support For Jump : Micro-Operation Sequence For Jump: J OP Jump_target 6 bits 26 bits j jump_target

EECC250 - Shaaban #30 lec #22 Winter Datapath For Jump 32 PC Clk 00 Mux nPC_sel imm16 Adder 4 PC Ext Next Instruction Address Mux JUMP Shift left 2 jump_target Instruction(15-0) Instruction(25-0) PC+4(31-28)

EECC250 - Shaaban #31 lec #22 Winter RegDst ALUctr ALUSrc MemtoReg Equal Instruction Imm16RdRsRt Adr Instruction Memory DATA PATH ExtOp MemWr Control Unit Op Fun nPC_sel RegWr Jump_target Jump

EECC250 - Shaaban #32 lec #22 Winter Single Cycle MIPS Datapath Extended To Handle Jump with Control Unit Added

EECC250 - Shaaban #33 lec #22 Winter Control Signal Generation addsuborilwswbeqjump RegDst ALUSrc MemtoReg RegWrite MemWrite nPCsel Jump ExtOp ALUctr x Add x Subtract Or Add x 1 x x 0 x x Subtract x x x x xxx func op Don’t Care

EECC250 - Shaaban #34 lec #22 Winter PLA Implementation of the Main Control op.... op.. op.. op.. op.. R-typeorilwswbeqjump RegWrite ALUSrc MemtoReg MemWrite Branch Jump RegDst ExtOp ALUop