Computer Organization CS224 Fall 2012 Lesson 22. The Big Picture  The Five Classic Components of a Computer  Chapter 4 Topic: Processor Design Control.

Slides:



Advertisements
Similar presentations
Datorteknik DatapathControl bild 1 Designing a Single Cycle Datapath & Datapath Control.
Advertisements

361 datapath Computer Architecture Lecture 8: Designing a Single Cycle Datapath.
Savio Chau Single Cycle Controller Design Last Time: Discussed the Designing of a Single Cycle Datapath Control Datapath Memory Processor (CPU) Input Output.
Inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 25 CPU design (of a single-cycle CPU) Sat Google in Mountain.
Lec 17 Nov 2 Chapter 4 – CPU design data path design control logic design single-cycle CPU performance limitations of single cycle CPU multi-cycle CPU.
CS61C L25 Single Cycle CPU Datapath (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
ECE 232 L13. Control.1 ©UCB, DAP’ 97 ECE 232 Hardware Organization and Design Lecture 13 Control Design
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.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
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.
CS61C L25 CPU Design : Designing a Single-Cycle CPU (1) Garcia, Spring 2007 © UCB Google Summer of Code  Student applications are now open (through );
EEM 486: Computer Architecture Lecture 3 Designing a Single Cycle Datapath.
CS 61C L16 Datapath (1) A Carle, Summer 2004 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #16 – Datapath Andy.
CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 28: Single-Cycle CPU Datapath Control Part 1 Guest Lecturer: Sagar Karandikar.
361 control Computer Architecture Lecture 9: Designing Single Cycle Control.
ECE 232 L12.Datapath.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 12 Datapath.
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.
Chapter 4 CSF 2009 The processor: Building the datapath.
Lecture 8: Processors, Introduction EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014,
Processor: Datapath and Control
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
CS 61C: Great Ideas in Computer Architecture Datapath
ECE 445 – Computer Organization
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /19/2013 Lecture 17: The Processor - Overview Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
EEM 486: Computer Architecture Designing a Single Cycle Datapath.
CDA 3101 Fall 2013 Introduction to Computer Organization
IT253: Computer Organization Lecture 9: Making a Processor: Single-Cycle Processor Design Tonga Institute of Higher Education.
Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture The Processor: Datapath.
CPE 442 single-cycle datapath.1 Intro. To Computer Architecture CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath.
W.S Computer System Design Lecture 4 Wannarat Suntiamorntut.
Datapath and Control Unit Design
Computer Organization CS224 Chapter 4 Part a The Processor Spring 2011 With thanks to M.J. Irwin, T. Fountain, D. Patterson, and J. Hennessy for some lecture.
Designing a Single- Cycle Processor 國立清華大學資訊工程學系 黃婷婷教授.
By Wannarat Computer System Design Lecture 4 Wannarat Suntiamorntut.
Cpu control.1 2/14 Datapath Components for Lab The Processor! ( th ed)
CPU Overview Computer Organization II 1 February 2009 © McQuain & Ribbens Introduction CPU performance factors – Instruction count n Determined.
CS4100: 計算機結構 Designing a Single-Cycle Processor 國立清華大學資訊工程學系 一零零學年度第二學期.
Csci 136 Computer Architecture II –Single-Cycle Datapath Xiuzhen Cheng
Single Cycle Controller Design
Morgan Kaufmann Publishers The Processor
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
CS161 – Design and Architecture of Computer Systems
Designing a Single-Cycle Processor
Morgan Kaufmann Publishers
IT 251 Computer Organization and Architecture
Introduction CPU performance factors
(Chapter 5: Hennessy and Patterson) Winter Quarter 1998 Chris Myers
Morgan Kaufmann Publishers The Processor
Morgan Kaufmann Publishers
Processor (I).
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath Start: X:40.
Single Cycle CPU Design
Instructors: Randy H. Katz David A. Patterson
MIPS Processor.
Morgan Kaufmann Publishers The Processor
Rocky K. C. Chang 6 November 2017
CS152 Computer Architecture and Engineering Lecture 8 Designing a Single Cycle Datapath Start: X:40.
The Processor Lecture 3.1: Introduction & Logic Design Conventions
Systems Architecture I
COMS 361 Computer Organization
CSC3050 – Computer Architecture
COMS 361 Computer Organization
What You Will Learn In Next Few Sets of Lectures
Designing a Single-Cycle Processor
MIPS Processor.
Processor: Datapath and Control
Presentation transcript:

Computer Organization CS224 Fall 2012 Lesson 22

The Big Picture  The Five Classic Components of a Computer  Chapter 4 Topic: Processor Design Control Datapath Memory Processor Input Output

Introduction  CPU performance factors l Instruction count -Determined by ISA and compiler l CPI and Cycle time -Determined by CPU hardware  We will examine two MIPS implementations l A simplified version l A more realistic pipelined version  Simple subset, shows most aspects Memory reference: lw, sw Arithmetic/logical: add, sub, and, ori, slt Control transfer: beq, j §4.1 Introduction

The Performance Perspective  Performance of a machine is determined by: l Instruction count l Clock cycle time l Clock cycles per instruction  Processor design (datapath and control) will determine: l Clock cycle time--CCT l Clock cycles per instruction--CPI  This week: Single cycle processor (datapath + control) l Advantage: One clock cycle per instruction l Disadvantage: long cycle time CPI Inst. CountCycle Time

Processor Design Steps 1. Analyze instruction set => datapath requirements l the meaning of each instruction is given by the register transfers (ISA model => RTL model) l datapath must include storage element for ISA registers -possibly more l datapath must support each register transfer 2. Select set of datapath components and establish clocking methodology 3. Assemble datapath meeting the RTL requirements

Processor Design (cont’d) 4. Analyze implementation of each instruction to determine setting of control points that effect the register transfer. 5. Assemble the control logic 6. RTL datapath and control design are refined to track physical design and functional validation l Changes made for timing and errata (a.k.a. “bug”) fixes l Amount of work varies with capabilities of CAD tools and degree of optimization for cost/performance

Subset of Instructions  To simplify our study of processor design, we will focus on a subset of the MIPS instructions Memory: lw and sw Arithmetic: add, sub, and, ori, and slt Branch: beq and j  Example in lecture uses ori rather than or covered in text, to demonstrate one more category of instructions  The method of implementing other instructions should come naturally from these

MIPS Format Review  R-Format l add rd, rs, rt l sub rd, rs, rt OP=0rs rt rdsafunct Bits first source register second source register result register shift amount function code

MIPS Format Review (cont)  I-Format l lw rt, rs, imm l sw rt, rs, imm l beq rs, rt, imm l ori rt, rs, imm  Reminders l Branch uses PC Relative addressing (PC × imm) OPrs rt imm Bits65516 first source register second source register immediate

MIPS Format Review (cont)  J-Format l j target  Reminders l Uses pseudodirect addressing (target × 4) to allow addressing 2 28 bits directly l Uses top 4 bits from PC OPtarget Bits626 jump target address

Execution Cycle Instruction Fetch Instruction Decode Operand Fetch Execute Result Store Next Instruction Obtain instruction from program storage Determine required actions and instruction size Locate and obtain operand data Compute result value or status Deposit results in storage for later use Determine successor instruction

What Happens?  It’s hard to see how we should go about organizing the processor  To start thinking about it, look at what happens on each instruction l The instruction specified by the PC is fetched from memory One or two registers are read ( lw vs. add for instance) l The ALU must be used to add, subtract, etc. l The results are stored (to memory or a register)

Instruction Execution  PC  instruction memory, fetch instruction  Register numbers  register file, read registers  Depending on instruction class l Use ALU to calculate -Arithmetic result -Memory address for load/store -Branch target address l Access data memory for load/store l PC  target address or PC + 4

Processor Overview Data flows through memory and functional units

Multiplexers Can’t just join wires together Use multiplexers

Control

Logic Design Basics §4.2 Logic Design Conventions  Information encoded in binary l Low voltage = 0, High voltage = 1 l One wire per bit l Multi-bit data encoded on multi-wire buses  Combinational element l Operate on data l Output is a function of input l Example: ALU  State (sequential) elements l Store information or state l Example: Register File

1-bit Full Adder 1 bit ALU  Using a MUX we can add the AND, OR, and adder operations into a single ALU A B Cout Cin ALUOp Mux Result

4 bit ALU A0 B0 1-bit ALU Result0 CIn0 COut0 A1 B1 1-bit ALU Result1 CIn1 COut1 A2 B2 1-bit ALU Result2 CIn2 COut2 A3 B3 1-bit ALU Result3 CIn3 COut3 ALUop 4 4 A B ALUop 3

Combinational Elements 32 A B Sum Carry Adder Carry_In 32 A B Y Select MUX 32 A B Result Zero OP ALU Adder ALU MUX 32

D Latches  Modified SR Latch  Latches value when C is asserted C D Q Q

D Flip Flop  Uses Master/Slave D Latches D CLK Q Q D Latch D C Q Q D Latch D C Q Q

Storage Element: Register  Register l Similar to D Flip Flop -N bit input and output -Write Enable input l Write Enable -0: Data Out will not change -1: Data Out will become Data In l Data changes only on falling edge! Clk Data In Write Enable NN Data Out

Storage Element: Reg File  Register File consists of 32 registers l Two 32 bit output busses -busA and busB l One 32 bit input bus -busW l Register 0 hard wired to value 0 l Register selected by -RA selects register to put on busA -RB selects register to put on busB -RW selects register to be written via busW when Write Enable is 1 l Clock input (CLK) -CLK input is a factor only for write operation -During read, behaves as combinational logic block –RA or RB stable  busA or busB valid after “access time” –Minor simplification of reality Clk busW Write Enable 32 busA 32 busB 555 RWRARB bit Registers

Storage Element: Memory  Memory l One input bus: Data In l One output bus: Data Out l Address selection -Address selects the word to put on Data Out -To write to address, set Write Enable to 1 l Clock input (CLK) -CLK input is a factor only for write operation -During read, behaves as combinational logic block –Valid Address  Data Out valid after “access time” –Minor simplification of reality Clk Data In Write Enable 32 Data Out Address

Some Logic Design…  All storage elements have same clock l Edge-triggered clocking l “Instantaneous” state change (simplification!) l Timing always work if the clock is slow enough Cycle Time = Clk-to-Q + Longest Delay + Setup + Clock Skew Clk Don’t Care SetupHold SetupHold