On Wed, 4 Jan 2012, Mahmood Naderan wrote:
Why?
Back to my example, I stated:
init
(b1,0) (b2,0) (b3,0) (b4,0) and totalRefs=0
b1 is accessed
(b1,1) (b2,0) (b3,0) (b4,0)
b3 is accessed
(b3,1) (b1,1) (b2,0) (b4,0)
b1 is accessed
(b1,2) (b3,1) (b2,0) (b4,0)
b4 is accessed
(b4,1) (b1,2) (b3,1) (b2,0)
b2 is accessed
(b2,1) (b4,1) (b1,2) (b3,1)
If the above procedure is exactly what is done in gem5, then:
1) gem5 return totalRefs=1 because
totalRefs += blk->refCount
totalRefs = 0 + 1 (from b3) = 1
2) based on the description, "total number of references to valid
blocks", I think is 5
That's because you are looking at the value of totalRefs while the
simulation is running. At the end of the simulation, references for blocks
that are in the cache are added to totalRefs.
--
Nilay
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users