I need a formula or to at least be pointed in the right direction it involves cache and cpi time. I have a base machine that has a 2.4ghz clock rate it has L1 and L2 cache. L1 is 256k direct mapped write through . 90% read without a hit rate without penalty, miss penalty costs 4 cycles all writes take 1 cycle. L2 cache is 2mb, 4 way set associative write back. 99.5% hit rate 60 cycle miss penalty. 30% of all instructions are reads and 10% are writes all other instructions take one cycle.. I need to figure how to get the cpi. I know i have to find the base cpi but from there I'm not really sure where to go. Any tips on not just what the answer is but how is more important would be greatly appreciated.
Asked
Active
Viewed 347 times
0
-
See - http://stackoverflow.com/questions/19918273/calculating-the-effect-of-the-cache-on-the-overall-cpi-of-the-processor/19918450#19918450 – Leeor Nov 19 '13 at 07:13
-
I seen that question but I was wondering if the size of the L1 256k direct mapped matters or where do I apply that to the formula. I imagine it does because the next question is asking what if i increase the size and increase the hit rate but reducing the write time to two cycles. Or am I making this harder than it needs to be? – MoMo8 Nov 19 '13 at 21:12
-
The cache size would usually increase the hit rate (not necessarily, depends on the program) , but if you have that parameter already then you don't need this. It's not clear from the question if you do have it though. – Leeor Nov 19 '13 at 21:31
-
@Leeor well the first part of the question or at least the part that I asked is exactly how it is given. I have the L1 and L2 cache and a given clock and I need to figure the cpi for the machine. The only other thing to add would be that I was just told that we are supposed to assume that the cpi is 1 for everything other than memory reads – MoMo8 Nov 19 '13 at 21:38
-
See related discussion: [http://stackoverflow.com/questions/20483999/calculating-actual-effective-cpi-for-3-level-cache/20617511](http://stackoverflow.com/questions/20483999/calculating-actual-effective-cpi-for-3-level-cache/20617511) – chus Dec 16 '13 at 18:33