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
>
|