Homework 3 s06

Homework 3 s06 - LSU EE 4720 Homework 3 Solution Due 20...

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

View Full Document Right Arrow Icon
LSUEE4720 Homework3 Solution Due:20March2006 Review Fall 2004 Final Exam Problem 2, which was discussed in class on Monday, 13 March 2006. Problem1: Using the solution to Fall 2004 Final Exam problem 2 parts a, b, and d (but not c) as a starting point, make changes to implement a new two-source register MM instruction add.mmr which operates as shown in the example below. Hint: The solution requires a register file modification. add.mmr (r1), (r2), r3 # Mem[r1] = Mem[r2] + r3 Solution shown below. The add.mmr instructions use three register source operands and so a third read port must be added to the register file, that is shown below in blue . The “new” register value, rdv , is used as the store address for the sum. The diagram below also shows, in green , the bypass connections used in the solution to Problem 3 (but not the branch condition bypasses used in Problem 4). format immed IR Addr 25:21 20:16 IF ID EX WB MEM rsv rtv IMM NPC ALU Addr Data Data Addr D In +1 PC Mem Port Addr D out rxv dst dst Decode dest. reg 30 2 "0" + 15:0 25:0 29:26 29:0 Addr Mem Port D out Addr D in Mem Port D out ALU MD dst dst rsv rtv IMM MS mem dst mem src (rsv) mem dst mem src Addr Data rdv 15:11 rdv Problem2: Your boss, a stuck-in-the-twentieth-century RISC true believer who only grudgingly agreed to include add.mm , add.mr , add.rm , and add.mmr in MMMIPS, flies into an incoherent rage when you suggest also adding add.mmm to MMMIPS. What pushed your boss over the edge? (That is, why is add.mmm much harder to add to the implementation in the Fall 2004 exam than add.mmr .) Instruction add.mmm operates as shown below: add.mmm (r1), (r2), (r3) # Mem[r1] = Mem[r2] + Mem[r3] Unlike the other memory-memory instructions, add.mmm must read two source operands from memory. To do that without stalling the pipeline would require a second memory port in the MS stage, which is expensive. The alternative is having add.mmm spend two cycles in MS, but that would mean stalling the pipeline which is not something you want to do for reasons other than dependencies.
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern