CDA 3101 Fall 2013 Introduction to Computer Organization

Slides:



Advertisements
Similar presentations
Adding the Jump Instruction
Advertisements

MIPS processor continued. Review Different parts in the processor should be connected appropriately to be able to carry out the functions. Connections.
Datorteknik DatapathControl bild 1 Designing a Single Cycle Datapath & Datapath Control.
Processor II CPSC 321 Andreas Klappenecker. Midterm 1 Tuesday, October 5 Thursday, October 7 Advantage: less material Disadvantage: less preparation time.
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.
Computer ArchitectureFall 2007 © October 3rd, 2007 Majd F. Sakr CS-447– Computer Architecture.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 TopicH: Building a Data Path and a Control Path for a Microprocessor José Nelson.
The Datapath Andreas Klappenecker CPSC321 Computer Architecture.
Datapath and Control Andreas Klappenecker CPSC321 Computer Architecture.
S. Barua – CPSC 440 CHAPTER 5 THE PROCESSOR: DATAPATH AND CONTROL Goals – Understand how the various.
Computing Systems The Processor: Datapath and Control.
Fall EE 333 Lillevik 333f06-l7 University of Portland School of Engineering Computer Organization Lecture 7 ALU design MIPS data path.
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.
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.
1 COMP541 Multicycle MIPS Montek Singh Apr 4, 2012.
Computer Organization CS224 Fall 2012 Lesson 22. The Big Picture  The Five Classic Components of a Computer  Chapter 4 Topic: Processor Design Control.
ECE 445 – Computer Organization
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /19/2013 Lecture 17: The Processor - Overview Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
Computer Organization & Programming Chapter 6 Single Datapath CPU Architecture.
CDA 3101 Fall 2013 Introduction to Computer Organization Multicycle Datapath 9 October 2013.
Datapath and Control Unit Design
1 A single-cycle MIPS processor  An instruction set architecture is an interface that defines the hardware operations which are available to software.
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.
MIPS processor continued. In Class Exercise Question Show the datapath of a processor that supports only R-type and jr reg instructions.
CPU Overview Computer Organization II 1 February 2009 © McQuain & Ribbens Introduction CPU performance factors – Instruction count n Determined.
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.
MIPS processor continued
COM181 Computer Hardware Lecture 6: The MIPs CPU.
MIPS Processor.
MIPS processor continued. Review Different parts in the processor should be connected appropriately to be able to carry out the functions. Connections.
CDA 3101 Spring 2016 Introduction to Computer Organization Microprogramming and Exceptions 08 March 2016.
Computer Organization Lecture Set – 05.1 Chapter 5 Huei-Yung Lin.
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:
Access the Instruction from Memory
Single-Cycle Datapath and Control
COMP541 Datapaths I Montek Singh Mar 28, 2012.
Morgan Kaufmann Publishers
IT 251 Computer Organization and Architecture
Introduction CPU performance factors
/ Computer Architecture and Design
Morgan Kaufmann Publishers The Processor
Morgan Kaufmann Publishers
Morgan Kaufmann Publishers The Processor
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
Design of the Control Unit for Single-Cycle Instruction Execution
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
MIPS Processor.
Datapath & Control MIPS
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
COMS 361 Computer Organization
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
COMP541 Datapaths I Montek Singh Mar 18, 2010.
Review Fig 4.15 page 320 / Fig page 322
CS/COE0447 Computer Organization & Assembly Language
The Processor: Datapath & Control.
COMS 361 Computer Organization
MIPS Processor.
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

CDA 3101 Fall 2013 Introduction to Computer Organization Single-Cycle Datapath 7 October 2013

Review Construction of the Datapath Instruction-specific building blocks (R, I, J formats) Modular design ALU, Register File, Data Memory ALU or adder for computing branch target address (BTA) Instruction-specific connection of datapath components Instruction Formats and the Datapath R: ALU operation, I: Load/store - Data I/O from register file/memory I: Conditional branch – Eval. condition, Compute BTA J: Jump (unconditional branch) – Compute JTA

Overview of Today’s Lecture Can we make a datapath operate in one cycle? All instructions executed in CPI = 1 Increases efficiency of software Composition of simple datapath components Build up the datapath iteratively R-format instruction I-format J-format Problems with the single-cycle assumption

Processor Performance CPU time = IC * CPI * Cycle time Program Compiler ISA Microarchitecture Hardware

Implementation Review Instruction memory Data rd Data memory rs Address PC Registers Address ALU rt Instruction +4 Data imm Opcode, funct Controller Datapath is based on register transfers required to execute instructions Control causes the right transfers to happen at the right time

Component: R-format Datapath Format: opcode r1, r2, r3 ALU Read Data 1 Read Data 2 Read Reg 1 Read Reg 2 Write Register Write Data Register Write ALU op Register File 3 Instruction Zero Result

Component: Load/Store Datapath Fetch Decode Execute

Component: Branch Datapath Fetch Decode Execute

R-format Datapath Actions Instruction: add $t0, $t1, $t2 Fetch instruction and increment PC Input $t0 and $t1 from Register File ALU operates on $t0 and $t1, per the funct field of the MIPS instruction (Bits 5-0) Result from ALU written to Register File using bits 15-11 of instruction to select destination register (e.g., $t0).

Load/Store Datapath Actions Instruction: lw $t1, offset($t2) Fetch instruction and increment PC Read register value (e.g., base address in $t2) from Register File ALU adds value from $t2 to sign-extended lower 16 bits of the instruction (i.e., offset) Result from ALU = address to Data Memory Retrieve data from memory, write to Register File, per register number in $t1 (Bits 20-16)

R-format + Load/Store Datapath Fetch Decode Execute

Branch Datapath Actions Instruction: beq $t1, $t2, offset Fetch instruction and increment PC Read registers (e.g., $t1 and $t2) from the register file from Register File ALU subtracts $t1 - $t2. Adder sums PC + 4 plus sign-extended lower 16 bits of offset shifted left two bits => branch target address ALU’s Zero output directs PC+4 or BTA to be written as new PC

R-format + Load/Store + Branch DP Fetch Decode Execute

ALU Control Codes ALU has two control codes (total = 5 bits): ALUop – Selects specific ALU operation Control Input – Selects ALU functionality

So where do these control bits come from? ALU Control Bits ALU has the following control bits: So where do these control bits come from?

Recall: MIPS Instr. Format

MIPS Instruction Bits - Rules

Datapath with WriteReg Control Extra Mux

Datapath with Control Signals ALU Control

Datapath Control (Finalized)

Datapath Extension: Jump Instr. Instruction: j address Fetch instruction and increment PC Read address from immediate field of instr. Jump target address (JTA) has these bits: Bits 31-28: Upper four bits of PC+4 Bits 27-02: Immediate field of Jump instr. Bits 01-00: Zero (002) Mux controlled by Jump Control Bit selects JTA or branch target address as new PC

Datapath Extension: Jump Instr. Bits 31-28: Upper four bits of (PC + 4) Bits 27-02: Immediate field of jump instruction Bits 01-00: Zero (002) - Word alignment

Datapath Extension: Jump Instr. Jump Control JTA

Problems Can we make a datapath operate in one cycle? All instructions executed in CPI = 1 Increases efficiency of software in MIPS Problems with single-cycle datapath Propagation delay for 1-5 components No phased execution: Must settle in 1 clock cycle Maximum delay = Load instruction (5 components) Increases clock cycle time Decreased Performance tcpu = IC * CPI * tcyc

Conclusions Can we make a datapath operate in one cycle? Yes – “Some design required” Do we want a single-cycle datapath? - No! Increases cycle time ( tcyc => tcpu) Build up the datapath w/ different instructions ALU operations, Load, Store, Branch Can add new instructions (Jump) New instructions = more HW HIGHER COST