考虑一个 6 级指令流水线,其中所有阶段都完美平衡。假设流水线没有循环时间开销。当应用程序在此 6 级流水线上执行时,如果 25% 的指令导致 2 个流水线停顿周期,则相对于非流水线执行实现的加速为
(一) 4
(乙) 8
(三) 6
(四) 7答案:(一)
解释:
It was a numerical digit type question so answer must be 4.
As for 6 stages, non-pipelining takes 6 cycles.
There were 2 stall cycles for pipelining for 25% of the instructions
So pipe line time = (1+(25/100)*2) = 1.5
Speed up = Non pipeline time/Pipeline time = 6/1.5 = 4
这个问题的测验