Re: [Gems-users] Issues with MSI_...L2-sim


Date: Tue, 13 Apr 2010 09:45:52 -0500
From: Muhammad Shoaib <shoaibbinalt@xxxxxxxx>
Subject: Re: [Gems-users] Issues with MSI_...L2-sim

Thanks for the reply Polina.

Actually I am adding it in the structure (Entry.)

===============================================================================
// CacheEntry
  structure(Entry, desc="...", interface="AbstractCacheEntry") {
    State CacheState,          desc="cache state";
   .
   .
    int countert,      desc="get the counter value"; 
    int dealloc_counter,      desc="get the count for the number of times it gets deallocated";
  }
===============================================================================


And actually there are 2 counters (I just want to make my question simple), the other counter gets incremented on each dealloaction.

============================================================================== 

action(rr_deallocateL2CacheBlock, "\r", desc="Deallocate L2 cache block.  Sets the cache to not present, allowing a replacement in parallel with a fetch.") {
  
  L2cacheMemory.print(L2cacheMemory[address].counter); // to print value in CacheMmeory.h

  L2cacheMemory[address].counter:=0;
  
  L2cacheMemory[address].dealloc_counter:=L2cacheMemory[address].dealloc_counter+1;
  
    L2cacheMemory.deallocate(address);
  }
==============================================================================


And again the value of dealloc counter is always '0' when i print it ....

Shoaib

On 04/13/10, Polina Dudnik  <pdudnik@xxxxxxxxx> wrote:

> Hi Shoaib,
> 
> I am actually confused about where you added the counter. I would add
> it in structure(Entry). I am also not entirely clear on why you want
> to clear the counter. If the block gets deallocated, it may be brought
> back again, so you will start counting from zero again and will not
> get the total number of references.
> 
> Polina
> 
> On Tue, Apr 13, 2010 at 4:08 AM, Muhammad Shoaib <shoaibbinalt@xxxxxxxx> wrote:
> >
> > Hi List,
> >
> >
> > I am trying to keep track of the number of times a address is referenced  in L2 cache.  For this I have added a "counter" entry in the Cache structure (in MSI_MOSI_CMP_dierctory_L2cache.sm) & its value gets incremented on each reference
> >
> > ================================================================
> >
> > L2cacheMemory[addr].counter:=L2cacheMemory[addr].counter+1;  // called in whenever a request comes either from private L1 or from other nodes
> > =================================================================
> >
> > I also want to clear this counter value when a line gets deallocated, for this I reset the counter on the following action
> >
> > ==============================================================================
> >
> > action(rr_deallocateL2CacheBlock, "\r", desc="Deallocate L2 cache block.  Sets the cache to not present, allowing a replacement in parallel with a fetch.") {
> >
> > L2cacheMemory[address].counter:=0;
> >
> >    L2cacheMemory.deallocate(address);
> >  }
> > ==============================================================================
> >
> >
> > But the problem is the counter never gets cleared it is always incrementing, even though the line gets deallocated!!!
> >
> >
> > Any idea why this is happening or I am doing something wrong???
> >
> > Shoaib
> > _______________________________________________
> > Gems-users mailing list
> > Gems-users@xxxxxxxxxxx
> > https://lists.cs.wisc.edu/mailman/listinfo/gems-users (https://lists.cs.wisc.edu/mailman/listinfo/gems-users)
> > Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/ (https://lists.cs.wisc.edu/archive/gems-users/)" to your search.
> >
> >
> _______________________________________________
> Gems-users mailing list
> Gems-users@xxxxxxxxxxx
> https://lists.cs.wisc.edu/mailman/listinfo/gems-users (https://lists.cs.wisc.edu/mailman/listinfo/gems-users)
> Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/ (https://lists.cs.wisc.edu/archive/gems-users/)" to your search.
> 
> 
> 
-- 
Muhammad Shoaib Bin Altaf
ECE Graduate Student
UW Madison,WI

[← Prev in Thread] Current Thread [Next in Thread→]