{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Homework 2 Solution

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

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

LSUEE4720 Homework2 Solution Due:1October2007 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 effort 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! Problem1: 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 first two iterations. (See the next part for instructions on the “A:”, etc.)

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

View Full Document
Solution appears after part b, below. Note that the branch stalls due to a dependency on the
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern