The Processor Data Path & Control Chapter 5 Part 1 - Introduction and Single Clock Cycle Design N. Guydosh 2/29/04.

Slides:



Advertisements
Similar presentations
CS/COE1541: Introduction to Computer Architecture Datapath and Control Review Sangyeun Cho Computer Science Department University of Pittsburgh.
Advertisements

Adding the Jump Instruction
331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
The Processor: Datapath & Control
1  1998 Morgan Kaufmann Publishers Chapter Five The Processor: Datapath and Control.
The Processor Data Path & Control Chapter 5 Part 2 - Multi-Clock Cycle Design N. Guydosh 2/29/04.
Levels in Processor Design
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.
Preparation for Midterm Binary Data Storage (integer, char, float pt) and Operations, Logic, Flip Flops, Switch Debouncing, Timing, Synchronous / Asynchronous.
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.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Chapter Five The Processor: Datapath and Control.
Lecture 16: Basic CPU Design
Shift Instructions (1/4)
Processor I CPSC 321 Andreas Klappenecker. Midterm 1 Thursday, October 7, during the regular class time Covers all material up to that point History MIPS.
S. Barua – CPSC 440 CHAPTER 5 THE PROCESSOR: DATAPATH AND CONTROL Goals – Understand how the various.
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
Chapter 4 CSF 2009 The processor: Building the datapath.
Fall EE 333 Lillevik 333f06-l8 University of Portland School of Engineering Computer Organization Lecture 8 Detailed MIPS datapath Timing overview.
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
Gary MarsdenSlide 1University of Cape Town Chapter 5 - The Processor  Machine Performance factors –Instruction Count, Clock cycle time, Clock cycles per.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /19/2013 Lecture 17: The Processor - Overview Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
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.
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. Building A CPU  We’ve built a small ALU l Add, Subtract, SLT, And, Or l Could figure out Multiply and Divide  What about the rest l How do.
Computer Architecture Lecture 9 MIPS ALU and Data Paths Ralph Grishman Oct NYU.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
Elements of Datapath for the fetch and increment The first element we need: a memory unit to store the instructions of a program and supply instructions.
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.
Gary MarsdenSlide 1University of Cape Town Computer Architecture – Introduction Andrew Hutchinson & Gary Marsden (me) ( ) September 2003.
MIPS Processor.
MIPS processor continued. Review Different parts in the processor should be connected appropriately to be able to carry out the functions. Connections.
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:
CS161 – Design and Architecture of Computer Systems
Single-Cycle Datapath and Control
Introduction CPU performance factors
Morgan Kaufmann Publishers The Processor
Morgan Kaufmann Publishers
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
Design of the Control Unit for Single-Cycle Instruction Execution
MIPS processor continued
CS/COE0447 Computer Organization & Assembly Language
Single-Cycle CPU DataPath.
CS/COE0447 Computer Organization & Assembly Language
Design of the Control Unit for One-cycle Instruction Execution
CSCI206 - Computer Organization & Programming
MIPS Processor.
Levels in Processor Design
Topic 5: Processor Architecture Implementation Methodology
Rocky K. C. Chang 6 November 2017
The Processor Lecture 3.2: Building a Datapath with Control
Topic 5: Processor Architecture
Systems Architecture I
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Lecture 14: Single Cycle MIPS Processor
Processor: Multi-Cycle Datapath & Control
MIPS processor continued
CS/COE0447 Computer Organization & Assembly Language
The Processor: Datapath & Control.
MIPS Processor.
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

The Processor Data Path & Control Chapter 5 Part 1 - Introduction and Single Clock Cycle Design N. Guydosh 2/29/04

Introduction Starting point: –The specification of the MIPS instruction set drives the design of the hardware. –Will restrict design to integer type instructions –Arithmetic element design from chapter 4. Identify common functions to all instructions, and within instruction classes – easy to do in a RISC architecture –Instruction fetch –Access one or more registers –Use ALU Asserted signals – a high or low level of a signal which implies a logically “true” condition … an “action” level. The text will only assert a logically high level, ie., a “1”. Clocking –Assume “edge triggered” clocking (as opposed to level sensitive). –A storage circuit or flip-flop stores a value on the clock transition edge. –Model is flip-flops with combinational logic between them –Propagation delay through combinations logic between storage elements determines clock cycle length. –Single clock cycle vs. multi-clock cycle design approach

Example of Edge Triggering

Setting and sampling the same state element in the same clock cycle: This is allowable if the delays through the combinational Logic is sufficiently long relative to the clock cycle time In this example, state element B captures a value based on the original value of A, and then A gets modified to a new value Based on Fig 5.3

Single vs Multi-clock Cycle Design Start out with a single “long” clock cycle for each instruction. –Entire instruction gets executed in a single clock pulse –Controller is pure combinational logic –Design is simple –You would think that a single clock cycle per instruction execution would give us super high performance – but not so: Slowest instruction determines speed of all instructions. –Ultimately we will go with a multi-clock cycle design – let each instruction run as fast is it could go – bottle neck is now not the slowest instruction, but the slowest “phase of execution” within an instruction – many instructions may never have this phase – penalize only those instructions employing the “slow phases” Because various phases of the instructions need the same hardware resource, & all is needed at the same time (clock pulse) – Some hardware is redundant – another disadvantage of single phase Examples: 2 memories: instruction and data memory 2 adders and an ALU

Single Clock Cycle with Design Summary Has a performance bottleneck –The clock cycle time is determined by the longest path in the machine –The simple jmp instruction will take as long as the load word (lw) –The instruction which uses the longest data path dictates the time for all others. What about a variable time clock design? –Still a single clock –Clock pulse interval is a function of the opcode –Average time for instruction theoretically improves But –It difficult to implement - lots of overhead to overcome But what the hey! Let’s start simple with a single clock cycle design for simplicity reasons and later convert to multi-clock cycle.

Basic Abstract View of the Data Path Shows common functions for most instructions Note state vs combinational elements Fig. 5.1

Data Path for Instruction Fetching Single Clock Cycle Fig. 5.5

Basic Data Path for R-type Instruction Single Clock Cycle Orange lines are for control- will design controls later Fig. 5.7

Adding the Data Path for lw & sw Instruction Single Clock Cycle Implements: lw $t1, offset_value($t2) sw $t1, offset_value($t2) The offset_value is a 16 bit signed immediate field & must be sign extended to 32 bits Immediate offset data  Fig. 5.9

Adding the Data Path for beq Instruction Single Clock Cycle Implements beq $t1, $t2, offset Offset is a signed 16 bit immediate field, & thus must be sign extended. In addition we shift left by 2 (make low bits are 00) to address to a word boundary To PC Fig. 5.10

Putting It All Together Single Clock Cycle j instruction to be added later Need controls circuits to drive control lines in orange. Two control units will be design: ALU Control & “Main Control Incremented PC or beq branch address unsuccessful branch Successful branch Fig. 5.13

ALU Control Unit Single Clock Cycle ALU control inputALU function 000and 001or 010add 110subtract 111set on less than Desired outputs of ALU control unit (inputs to ALU) See ALU design from chapter 4, pp The most significant bit in ALU control input is Bnegate of fig The two least significant bits are the “ALU operation” MUX input in fig 4.17: 00 is “and”, 01 is “or”, 10 is “add”, 11 is “set on less than”.

ALU Control Unit (continued) Single Clock Cycle Define an intermediate pair of control lines called ALUop which partially associates instruction opcodes with ALU control inputs. ALUop will be generated by the main controller as an input to ALU controller. ALU Controller will also need the instruction function field as input to do the job. Remember the instruction function is completely determined by opcode and Function field. Theoretically, we could have fed the op-code directly to the ALU control unit rather than ALUop, but the opcode is already decoded in he main controller, so simple use this result

ALU Control Unit (continued) Single Clock Cycle Truth table which implements the ALU controller Completely specifies the ALU controller.

ALU Control Unit Implementation Single Clock Cycle Figure from 1 st ed of book

What We Have So Far Single Clock Cycle  just added in Fig. 5.17

Designing the Main Control Unit Single Clock Cycle

Designing the Main Control Unit (continued) Single Clock Cycle

Main Control Unit Implementation Single Clock Cycle Figure from 1 st ed of book

Putting It All Together Again Single Clock Cycle Fig 5.19 Use this for R-type, memory, & beq instructions scenarios.

Addition of the Unconditional Jump Single Clock Cycle We now add one more op code to our single cycle design : –Op code 2: “j” –The format is op field is a “2” –Remaining 26 low bits is the immediate target address The full 32 bit target address is computed by concatenating: –Upper 4 bits of PC+4 –26 bit immediate field of the jump instruction –Bits 00 in the lowest positions (word boundary) –See text chapter 3, p. 150 An additional control line from the main controller will have to be generated to select this “new” instruction A two bit shifter is also added to get the two low order zeros

Final Design with jump Instruction Single Clock Cycle Fig. 5.29