1
假设的指令的时间,如果M5是五级流水线执行。尝试计算执行五级流水线处理器
我知道五级流水线有以下步骤:
IF -- instruction fetch (and PC update)
ID -- instruction decode (and get operands from registers)
EX -- ALU operation (can be effective address calculation)
MA -- memory access
WB -- write back (results written to register(s))
如果假设有100个MIPS具有以下 指令混合指令:
Loads 23%, Stores 12%, Conditional Branches 12%, Jumps
8% and R-type instructions 45%.
The CPU clock frequency is 1.2 GHz
我试图计算时间来执行100条指令。我明白了如何使用这个公式来计算一个非管道时
ExTime = Instruction count * CPI * Clock period in seconds
我的频率转换成使用1/f = 8.33 * 10^-10 seconds
期间,但我不能确定的方式来计算的执行时间这条管道,而且我需要了解管道实施的周期?
请帮我,因为我不能在网上找到一个体面的例子。 感谢
编辑
我想我已经找到了答案!
我发现了一些信息
INSTRUCTION LATENCY = 5 time units THEREFORE
INSTRUCTION THROUGHPUT = 5 * (1/5) = 1 instruction per time unit
So in this case it would be:
ExTime in seconds = Number of instructions * clock cycle period in seconds
我不明白为什么我应该得到一个-1?谨慎解释? –
您还需要考虑到管道刷新树枝上和跳跃。 – markgz
那么你会如何去计算它呢? –