{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Homework06-sol

# Homework06-sol - 9:36 PM Homework#06(Solution 1(15 points...

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

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 identified register.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}