Comp Arch Nptel Questions
Comp Arch Nptel Questions
Enlist each of the DATA Dependencies present in this code along with its type.
Specify which of the DATA hazards present in the above code sequence can be resolved
by forwarding. Justify your answer.
Q10. What is the execution time (in terms of clock cycles) of the following instruction
sequence on a pipeline processor having five stages, namely Instruction Fetch, Instruction
Decode, Register Read, Execute and Write Back. Assume that no bypassing is done.
ADD r3, r4, r5
SUB r7, r3, r9
MUL r8, r9, r10
ASM r4, r8, r12
Q11. Consider the following code sequence. Identify different types of hazards present
and find out its execution time on a 7-stage pipeline with 2-cycle latency for non-branch
instructions and 5-cycle latency for branch instructions. Assume that branch is not taken.
BNE r4, #0, r5
DIV r2, r1, r7
ADD r8, r9, r10
SUB r5, r2, r9
MUL r10, r5, r8
Q11. For the above machine, compare the number of comparators and tag bits for 8-way
set-associative cache memory with that of the direct-mapped cache memory.
Q12. A direct-mapped 32-bit cache memory is assumed to have the following fields:
Tag Index Offset
31-12 11-05 4-0