简体   繁体   English

如何计算两个处理器的平均 CPI?

[英]How to figure out the average CPI of two processor?

Consider two processors – Processor A and Processor B. Processor A is a single-cycle MIPS processor with a clock period of 2000 ps and Processor B is a pipelined MIPS processor with a clock period of 500 ps.考虑两个处理器——处理器 A 和处理器 B。处理器 A 是时钟周期为 2000 ps 的单周期 MIPS 处理器,处理器 B 是时钟周期为 500 ps 的流水线 MIPS 处理器。 Processor B has a 5-stage pipeline.处理器 B 有一个 5 级流水线。

For a workload that causes pipeline stalls in 20% of execution slots, what are the average CPI and IPC values for the two processors?对于导致流水线在 20% 的执行槽中停顿的工作负载,两个处理器的平均 CPI 和 IPC 值是多少?

I am trying to find the CPI of both of these processors.我试图找到这两个处理器的 CPI。 I know you can divide the number of cycles by the number of instructions to get the CPI but I don't know the number of instructions so I cannot use that here.我知道你可以将周期数除以指令数来获得 CPI,但我不知道指令数,所以我不能在这里使用它。 I know that if you have the distribution of the cycles and the percentage they complete in you can use that to calculate the CPI but I have absolutely no idea how to find the CPI here.我知道如果你有周期的分布和它们完成的百分比,你可以用它来计算 CPI,但我完全不知道如何在这里找到 CPI。

CPI is an average rate so you could just make up any number of instructions you want (like 100), do the math to find cycles using the other info you're given, then divide. CPI 是一个平均比率,因此您可以组成任意数量的指令(例如 100),使用您提供的其他信息进行数学计算以找到周期,然后进行除法。

It should then become obvious how you could have done the algebra without using any specific numbers.很明显,如何在不使用任何特定数字的情况下完成代数。 The number of instructions cancels out.指令数抵消。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM