Re: [Gems-users] Access CacheMemory object inside the .sm file


Date: Mon, 7 Nov 2005 11:28:03 -0600 (CST)
From: Mike Marty <mikem@xxxxxxxxxxx>
Subject: Re: [Gems-users] Access CacheMemory object inside the .sm file
Are you trying to access an object method or class method?

For an object method, it would be accessed by doing

  cacheMemory.myFunction()

If you want to access a static class method, you will need to create a
wrapper function because I don't think SLICC can understand something in
the form CacheMemory<CacheEntry>::myFunction()

--Mike


> I already have added the functions to the
> external_type(CacheMemory), however I still have the same
> error during make and not able to access it inside the
> following code snippet of the .sm file
>
> // Address Network
>   in_port(addressNetwork_in, AddressMsg, addressToCache) {
>     if (addressNetwork_in.isReady()) {
>       peek(addressNetwork_in, AddressMsg) {
>
> Thanks,
> AD
>
> ---- Original message ----
> >Date: Mon, 7 Nov 2005 08:35:50 -0600 (CST)
> >From: Mike Marty <mikem@xxxxxxxxxxx>
> >Subject: Re: [Gems-users] Access CacheMemory object inside
> the .sm file
> >To: adash@xxxxxxx, Gems Users <gems-users@xxxxxxxxxxx>
> >
> >In the same .sm file, you will see the definition of CacheMemory:
> >
> >
> >  external_type(CacheMemory) {
> >    bool cacheAvail(Address);
> >    Address cacheProbe(Address);
> >    void allocate(Address);
> >    void deallocate(Address);
> >    Entry lookup(Address);
> >    void changePermission(Address, AccessPermission);
> >    bool isTagPresent(Address);
> >  }
> >
> >Add your functions there.  The reason why this is defined in
> every SLICC
> >file is because CacheMemory is templated based on the
> protocol-specific
> >definition of CacheEntry.
> >
> >--Mike
> >
> >
> >> Hi,
> >>
> >> I have modified the ruby/system/CacheMemory.h file and wanted
> >> to access an object of the CacheMemory(to do a function
> >> call) inside the code for "address network" of the
> >> MOSI_SMP_bcast_1level-cache.sm file (protocol
> >> file) but it gives me the following error while doing
> >> a "make"
> >>
> >> Error: Invalid method call: Type 'CacheMemory' does not have
> >> a method '<function name>_Address_CoherenceRequestType'
> >>
> >> How do I go about accessing these functions defined inside
> >> the CacheMemory.h?
> >> I have no problems in accessing these functions inside the
> >> code for "mandatory queue" in the .sm file.
> >>
> >> Thanks for all your help,
> >> AD
> >> _______________________________________________
> >> Gems-users mailing list
> >> Gems-users@xxxxxxxxxxx
> >> https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> >>
>
[← Prev in Thread] Current Thread [Next in Thread→]