> 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



On 1/4/12, Nilay Vaish <[email protected]> wrote:
> On Wed, 4 Jan 2012, Mahmood Naderan wrote:
>
>> still looking for suggestion.
>> If totalRefs count the total accesses to blocks, then this update
>> method (updating at evition) is wrong
>>
>> LRU::BlkType*
>> LRU::findVictim(Addr addr, PacketList &writebacks)
>> {
>>    BlkType *blk = sets[set].blks[assoc-1];
>>    if (blk->isValid()) {
>>        replacements[0]++;
>>        totalRefs += blk->refCount;
>>   ...
>> }
>>
>>
>
> Why?
>
> --
> Nilay
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>


-- 
--
// Naderan *Mahmood;
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to