1 Quiz 3, Answers 1,3 The CPI is: 0.22*7 + 0.55*4 + 0.12*3 + 0.11*12 = 1.54 + 2.2 + 0.36 + 1.32 = 5.42 In the 2nd case the CPI is 1.0. Every instruction.

Slides:



Advertisements
Similar presentations
Adding the Jump Instruction
Advertisements

Pipeline Example: cycle 1 lw R10,9(R1) sub R11,R2, R3 and R12,R4, R5 or R13,R6, R7.
MIPS processor continued. Review Different parts in the processor should be connected appropriately to be able to carry out the functions. Connections.
Computer Architecture - Quiz 3, answers Answer 1  IF: Read instruction from memory (1.2ns or 2*0.7ns), compute PC+4 (0.6ns). The super-pipeline has 2.
The Processor: Datapath & Control
1  1998 Morgan Kaufmann Publishers Chapter Five The Processor: Datapath and Control.
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.
CMPUT Computer Organization and Architecture II1 CMPUT229 - Fall 2003 TopicE: Building a Data Path and a Control Path for a Microprocessor José Nelson.
CSCE 212 Quiz 9 – 3/30/11 1.What is the clock cycle time based on for single-cycle and for pipelining? 2.What two actions can be done to resolve data hazards?
331 Lec 14.1Fall 2002 Review: Abstract Implementation View  Split memory (Harvard) model - single cycle operation  Simplified to contain only the instructions:
Computer ArchitectureFall 2007 © October 3rd, 2007 Majd F. Sakr CS-447– Computer Architecture.
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.
Chapter Five The Processor: Datapath and Control.
CS 161, Spring 2006 Test 2 Answers. Q1(a) +10 = in 2’s complement. And in sign-extended -12 = in 2’s comp And.
Copyright 1998 Morgan Kaufmann Publishers, Inc. All rights reserved. Digital Architectures1 Machine instructions execution steps (1) FETCH = Read the instruction.
The Datapath Andreas Klappenecker CPSC321 Computer Architecture.
1 The Processor: Datapath and Control We will design a microprocessor that includes a subset of the MIPS instruction set: –Memory access: load/store word.
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.
Supplementary notes for pipelining LW ____,____ SUB ____,____,____ BEQ ____,____,____ ; assume that, condition for branch is not satisfied OR ____,____,____.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
ECE 445 – Computer Organization
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
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.
D ATA P ATH OF A PROCESSOR (MIPS) Module 1.1 : Elements of computer system UNIT 1.
CPU Overview Computer Organization II 1 February 2009 © McQuain & Ribbens Introduction CPU performance factors – Instruction count n Determined.
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
PC Instruction Memory Address Instr. [31-0] 4 Fig 4.6 p 309 Instruction Fetch.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 2.
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.
MIPS Processor.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3 In-Class Exercises.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Design a MIPS Processor (II)
Single-cycle CPU Control
Access the Instruction from Memory
Single Cycle CPU - Control
Single Cycle CPU.
CS 230: Computer Organization and Assembly Language
Single-Cycle Datapath and Control
Computer Architecture
Performance of Single-cycle Design
Multi-Cycle CPU.
Single Cycle Processor
Multi-Cycle CPU.
MIPS Processor.
CS/COE0447 Computer Organization & Assembly Language
CSCI206 - Computer Organization & Programming
CS/COE0447 Computer Organization & Assembly Language
CSCI206 - Computer Organization & Programming
Single-Cycle CPU DataPath.
CS/COE0447 Computer Organization & Assembly Language
CSCI206 - Computer Organization & Programming
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
MIPS Processor.
The Processor Lecture 3.3: Single-cycle Implementation
The Processor Lecture 3.2: Building a Datapath with Control
Datapath: Instruction Store/Fetch & PC Increment
MIPS Microarchitecture Multicycle Processor
CS/COE0447 Computer Organization & Assembly Language
The Processor.
CS/COE0447 Computer Organization & Assembly Language
The Processor: Datapath & Control.
MIPS Processor.
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

1 Quiz 3, Answers 1,3 The CPI is: 0.22* * * *12 = = 5.42 In the 2nd case the CPI is 1.0. Every instruction is executed in 1 cycle. Answer 3: A. ET = 1,200,000*3.68*2.0ns = 8.832ms B. ET = 1,100,000*4.12*1.8ns = 8.158ms C. ET = 1,000,000*1.00*8.8ns = 8.800ms Computer B executes program X the fastest.

2 Answer 2A The RegWrite control line controls if an instruction will write into the Register File (RF). –1: write to RF. –0: Don't write to RF. The instructions add and lw write a value into the RF, thus RegWrite will be set to 1. The instructions beq and sw just read data from the RF, thus RegWrite will be set to 0.

3 Answer 2B The MemRead control line controls if an instruction will read from data memory. –1: Read from data memory. –0: Don't read from data memory. The instruction lw reads a value from data memory, thus MemRead will be set to 1. The instructions beq, sw and sub don't read from data memory, thus MemRead will be set to 0.

4 Answer 4A Sign-extending a number means converting it from a n bit number to a m bit number (m>n) without it losing its sign. The added m-n bits are set to be the value of bit n- 1. Thus the sign-bit is extended and a negative number doesn't turn positive when it is extended. The instruction beq sign-extends the 16-bit address in order to add it to the PC. The instruction sw sign-extends the 16-bit offset in order to add it to the base register.

5 Answer 4B Shifting left a number by 2 means multiplying it by 4. The instruction beq shifts left by 2 the word value in order to convert it to a byte value. The instruction j shifts left by 2 the word value in order to convert it to a byte value. The instruction lw doesn't shift left by 2 the offset, it is already a byte offset.