Lab3-ID_Stage - Lab 3 How to implement the ID stage...

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

View Full Document Right Arrow Icon
Lab 3 – How to implement the ID stage? Question: I would like to bring to your attention (if you are not already aware of it) a problem that can arise with branching in the Decode stage, regarding forwarding: If a branch instruction's input depends on the output of the previous statement, the result needed to branch will not be produced yet. Fortunately this does not arise in Lab3a.s or Lab3c.s, but here is an example from Lab3b.s: end_length_loop: subi $10, $10, 2 test_loop: bge $9, $10, is_palin the BGE instruction will be in stage ID while the SUBI instruction is in stage EX. Using a push model, we will first do ID for BGE and handle its branching... if(registers[9] >= registers[10]) //branch however, the data that SUBI will produce to be written to register $10 has not even been calculated by the ALU yet. Should we be concerned with this for our simulators, or can we ignore this as Lab3a.s and Lab3c.s do not suffer from this issue?
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