CSE 611 Midterm Exam
Questions and Answers
Denning [Date] [Course title]
, Five stages of an Instruction - Correct Answers: • Ifetch: Instruction Fetch - Fetch the instruction from
the Instruction Memory
• Reg/Dec: Registers Fetch and Instruction Decode
• Exec: Calculate the memory address
• Mem: Read the data from the Data Memory
• Wr: Write the data back to the register file
Pipeline Hazards - Correct Answers: -structural hazards: attempt to use the same resource two different
ways at the same time
-control hazards: attempt to make a decision before condition is evaluated
-data hazards: attempt to use item before it is ready
Two Methods for Stage Quantization: - Correct Answers: - Merging of multiple subcomputations into
one.
- Subdividing a subcomputation into multiple subcomputations.
Data Dependence - Correct Answers: - True dependence (RAW) Instruction must wait for all required
input operands
- Anti-Dependence (WAR) Later write must not clobber a still-pending earlier read
- Output dependence (WAW) Earlier write must not clobber an already-finished later write
Control Dependence - Correct Answers: (aka Procedural Dependence)
- Conditional branches cause uncertainty to instruction sequencing
- Instructions following a conditional branch depends on the resolution of the branch instruction
RAW - Correct Answers: - Add R1, R2, R3 #R1 = R2+R3
- Sub R4, R5, R1 #R4 = R5-R1
WAR - Correct Answers: - Sub R4, R5, R1 #R4 = R5-R1
Questions and Answers
Denning [Date] [Course title]
, Five stages of an Instruction - Correct Answers: • Ifetch: Instruction Fetch - Fetch the instruction from
the Instruction Memory
• Reg/Dec: Registers Fetch and Instruction Decode
• Exec: Calculate the memory address
• Mem: Read the data from the Data Memory
• Wr: Write the data back to the register file
Pipeline Hazards - Correct Answers: -structural hazards: attempt to use the same resource two different
ways at the same time
-control hazards: attempt to make a decision before condition is evaluated
-data hazards: attempt to use item before it is ready
Two Methods for Stage Quantization: - Correct Answers: - Merging of multiple subcomputations into
one.
- Subdividing a subcomputation into multiple subcomputations.
Data Dependence - Correct Answers: - True dependence (RAW) Instruction must wait for all required
input operands
- Anti-Dependence (WAR) Later write must not clobber a still-pending earlier read
- Output dependence (WAW) Earlier write must not clobber an already-finished later write
Control Dependence - Correct Answers: (aka Procedural Dependence)
- Conditional branches cause uncertainty to instruction sequencing
- Instructions following a conditional branch depends on the resolution of the branch instruction
RAW - Correct Answers: - Add R1, R2, R3 #R1 = R2+R3
- Sub R4, R5, R1 #R4 = R5-R1
WAR - Correct Answers: - Sub R4, R5, R1 #R4 = R5-R1