Thats true. Instead of adding new SLICC syntax, it might be easier to
create a new type of CacheMemory: VectorCacheMemory
--Mike
> Thanks, Mike. I will also have to modify all the accesses to the structure
> in the MOESI_CMP_NUCA-L2cache.sm, right?
>
> On 11/29/06, Mike Marty <mikem@xxxxxxxxxxx> wrote:
> >
> > I would probably just add another "hack" variable to SLICC. Thus you
> > could do something like:
> >
> > CacheMemory NUCAcacheMemory, template_hack="<L2Cache_Entry>",
> >
> > constructor_hack='L2_CACHE_NUM_SETS_BITS,L2_CACHE_ASSOC,MachineType_L2Cache,int_to_string(i)',
> > abstract_chip_ptr="true", my_new_hack="yes";
> >
> > Then in $GEMS/slicc/symbols/SymbolTable.C where the Chip.C code is
> > generated, just check for the existence of your new variable pair by
> > doing:
> >
> > if (var->existPair("my_new_hack")) {
> >
> > // MY SPECIAL CODE
> > }
> >
> > --Mike
> >
> >
> > >
> > > I am trying to modify the following lines:
> > >
> > > In protocols/MOESI_CMP_NUCA-L2cache.sm
> > >
> > >
> > > CacheMemory NUCAcacheMemory, template_hack="<L2Cache_Entry>",
> > >
> > constructor_hack='L2_CACHE_NUM_SETS_BITS,L2_CACHE_ASSOC,MachineType_L2Cache,int_to_string(i)',
> > > abstract_chip_ptr="true";
> > >
> > > So that in generated/MOESI_CMP_NUCA/Chip.C, instead of:
> >
> > > m_L2Cache_NUCAcacheMemory_vec.setSize(RubyConfig::numberOfL2CachePerChip(m_id));
> > > for (int i = 0; i < RubyConfig::numberOfL2CachePerChip(m_id); i++) {
> > > * m_L2Cache_NUCAcacheMemory_vec[i] = new
> > CacheMemory<L2Cache_Entry>(this,
> > >
> > *L2_CACHE_NUM_SETS_BITS,L2_CACHE_ASSOC,MachineType_L2Cache,int_to_string(i));
> > > assert(m_L2Cache_NUCAcacheMemory_vec[i] != NULL);
> > >
> > > The third line would match the declaration
> > > of m_L2Cache_NUCAcacheMemory_vec. I have modified the declaration
> > > from Vector < CacheMemory<L2Cache_Entry>* >
> > m_L2Cache_NUCAcacheMemory_vec;
> > > to *Vector < Vector < CacheMemory<L2Cache_Entry> >* >
> > > m_L2Cache_NUCAcacheMemory_vec;
> > > *
> > > But I haven't been able to modify the MOESI_CMP_NUCA-L2cache.sm to get
> > the
> > > correct structure in Chip.C. Any kind of help is appreciated.
> > >
> > > Thanks a lot,
> > > Mishali
> > > Undergraduate Student, UCLA
> > >
> > _______________________________________________
> > Gems-users mailing list
> > Gems-users@xxxxxxxxxxx
> > 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/" to your search.
> >
> >
>
|