Homework 2 Solution

Homework 2 Solution - LSU EE 4720 Homework 2 Solution Due:...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
LSU EE 4720 Homework 2 Solution Due: 1 October 2007 For lecture material relevant to this assignment see http://www.ece.lsu.edu/ee4720/2007f/lsli06.pdf . For some background and a list of similar problems see the statically scheduled study guide, http://www.ece.lsu.edu/ee4720/guides/ssched.pdf . Please make an e±ort to solve this prob- lem based on an understanding of the material, use the solution to similar problems (if any) only for hints. Feel free to ask questions using the forums, E-mail, or in person. Exam problems will be based on the assumption that students completed (really completed) homework assignments, so don’t short-change yourself! Problem 1: Consider the following MIPS code and implementation: # Cycle 0 1 2 lw r2, 0(r10) IF ID EX LOOP: lw r1, 0(r2) IF ID add r3, r1, r4 sw r3, 4(r2) bne r3, r5 LOOP addi r2, r2, 8 # Cycle 0 1 2 A: 2 B: 2 C: format immed IR Addr 25:21 20:16 IF ID EX WB ME rsv rtv IMM NPC ALU Addr Data Data Addr D±In +1 PC Mem Port Addr Data Out Addr Data In Mem Port Data Out rtv ALU MD dst dst dst Decode dest.±reg NPC = 30 2 2’b0 + 15:0 25:0 29:26 29:0 0 1 15:0 A xa1 xa2 xdi B C ( a ) Complete the pipeline execution diagram of the execution of the code above on the implementa- tion illustrated for at least the Frst two iterations. (See the next part for instructions on the “A:”, etc.)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Solution appears after part b, below. Note that the branch stalls due to a dependency on the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/01/2009 for the course EE 4720 taught by Professor Staff during the Spring '08 term at LSU.

Page1 / 3

Homework 2 Solution - LSU EE 4720 Homework 2 Solution Due:...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online