|
Q3: Is there one iteration over the array, for each value of stride, or repeated iterations? |
Many repeated iterations, in a single loop; each time, the index is incremented by the stride value, modulo the array size.
|
Q3: What are we supposed to discover in the last section? we don't seem to figure out anymore than we did in the previous guiding questions. |
The features not covered by the guiding questions weren't taught in the class. Treat this as an optional section, allowing for bonus points to whoever notes those extra features.
|
Q4: How do the flags should be updated after load? |
The question was not clearly defined, and therefore you can just don't update the flags after load. This scenario will not be checked.
|
Q4: Can we change the signature of the functions Exec, Decode, etc. to set different parameters for each? |
Yes, as long as you keep each phase of the pipeline in a different method, and keep the main loop in the Run function.
|
Q4: Is it obligatory to "detect" hazard inside the Fetch() & Decode() functions themselves? |
You can detect hazards wherever you like. However, note that doing complicated implementation will make your emulator error-prone.
|
Q4: Detecting a control hazard in IF has no benefits over detecting it in ID.
Yet, it does complicate the code, so, can we detect in ID? |
You can detect it in the ID, as long as you don't add unnecessary stalls.
|
|