The duration of the pipeline clock cycle is nanosecond. Assume that the latch time for the interstage buffers in the pipeline is negligible.
When program is executed, the number of clock cycles for which the pipeline is stalled due to structural hazards in the EX stage is . (answer in integer)
View worked solution
Answer: 95 : 95
The pipeline clock cycle is . Since the EX stage is not pipelined internally, an instruction with execution time will occupy the EX stage for clock cycles.
In a standard pipeline, each instruction is expected to spend clock cycle in the EX stage. Any additional cycles spent by an instruction in the EX stage prevent subsequent instructions from entering, thereby causing structural hazard stalls. Thus, the number of stall cycles introduced by a single instruction is:
We calculate the total stall cycles for each instruction type as follows:
- LOAD: cycles. Stall cycle.
Total stalls - IMUL: cycles. Stall cycle.
Total stalls - IDIV: cycles. Stall cycles.
Total stalls - FADD: cycles. Stall cycle.
Total stalls - FSUB: cycles. Stall cycle.
Total stalls - FMUL: cycles. Stall cycles.
Total stalls - FDIV: cycles. Stall cycles.
Total stalls - Others: cycle. Stall cycles.
Total stalls
Summing these values gives the total number of stall cycles:
Free practice · Your answers on this page are not saved.
