Lab3-ID_Stage

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

Info iconThis 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? Answer:
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.

Page1 / 3

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

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