Quiz 3 answer - Problem 2 A program containing the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
EE504C Quiz 3 Spring 2008 Problem 1: In the five-stage MIPS pipeline, branch and jump are completed in the MEM and decode stage,  respectively.  A program is consisted of 20% branch instructions and 10% jump instructions.  If  there is no help from the compiler on the branch/jump instructions and there are no other stall  penalties, calculate the CPI after accounting for branch and jump stalls. ANS: CPI = ideal CPI + avg stall = 1.0 + 0.2*4 + 0.1*1 = 1.9
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Problem 2: A program containing the following two instructions are run through the MIPS 5-stage pipeline. … Lw r4, 0(r1) Sw r2, 0(r4) … Draw a pipeline timing diagram to explain how to forward data from lw to sw. ANS: A mandatory stall cycle must be inserted between load and store before r4 data from load can be forwarded from MEM/WB pipeline register to the input of ALU of the store instruction....
View Full Document

This note was uploaded on 01/19/2011 for the course EE EE504 taught by Professor Drlao during the Fall '10 term at College of the North Atlantic.

Ask a homework question - tutors are online