Технион - израильский технологический институт  
234267 - Digital Computer Architecture (MAMAS) 
  Весна 2011 EnglishRussianHebrewArabic  
Вопросы и Ответы
HW3

HW1

Files do not compile!
Make sure you have the latest version (there were some mistakes in the include of lc3.h).
In addition, for some reason, some systems require includes of string.h and algorithm.
How do I get the instruction from the fetch phase?
Note that this fetch gets a reference for an argument, so you need to set the argument with the instruction you get.
Note that PC is part of the LC3 class, so you can get it from there.
What to submit in the wet submission?
Zip all the files you changed. You are expected to change only lc3.h and lc3.cpp.

HW2

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.

HW4