Homework06-sol - 3/2/03 9:36 PM Homework #06 (Solution) 1....

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

View Full Document Right Arrow Icon
3/2/03 9:36 PM ECSE-2660 Computer Architecture, Networks, & Operating Systems, Spring 2003 Page 1 of 3 Homework #06 (Solution) 1. (15 points) Consider the following code on the pipelined data path of Figure 6.46 on p. 492: subi $6, $7, 50 sub $7, $4, $6 sw $4, 220($6) add $6, $4, $3 sub $3, $2, $1 In what cycle(s) is the register $6 read or written? $6 is read in CC3 and CC4. It is written in CC5 and CC8. Grading: 3pts for trying, +4pts for each correct CC. 2. (20 points) In the above task, what register addresses does the forwarding unit compare in the fifth cycle of execution? What action does it take? EX/MEM.RegisterRd = $7, MEM/WB.RegisterRd = $6 These above register addresses are compared to ID/EX.RegisterRs = $6 and ID/EX.RegisterRt = $4. There is a match between MEM/WB.RegisterRd and ID/EX.RegisterRs, so the forwarding unit sets ForwardA to 01. That means the content of $6 is forwarded to the first ALU input of the “sw” instruction (see Figure 6.39). Grading: 1pt for trying, +7pts for determining correct action, +3 pts for each correctly
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/25/2010 for the course ECSE ecse-2340 taught by Professor Wozny during the Spring '09 term at Rensselaer Polytechnic Institute.

Page1 / 3

Homework06-sol - 3/2/03 9:36 PM Homework #06 (Solution) 1....

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

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