gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Ruby SLICC network vs RubyCache latency mechanics

WF
Waqar, Faaiq G
Thu, Feb 15, 2024 5:39 PM

Hi Folks,

I am currently working on modeling a system in which the L3 Cache is dynamically set. As a simple example of this, say there were two sets of addresses. If I get a LD/ST request to the first set, it takes twice as long as it would for retrieval in the second set. In any case, I have been able to model this phenomenon in gem5's SLICC structure under the guise of a new protocol and was able to see it working as intended using the protocol debugger. However, when I set up a python configuration file to get things going, I know that the RubyCache python object that my generated controller connects to also has a latency parameter. My question is, to accurately model this phenomenon, is the modification of the SLICC sufficient to model the new delays, or do modifications have to be made to RubyCache as well? I took a look at the RubyCache python object, and was left more puzzled when I didn't see any special methods directly in this class (I understand it pulls some of these from SimObject), which made me think this may a better place to ask in the meantime.

Thanks

Hi Folks, I am currently working on modeling a system in which the L3 Cache is dynamically set. As a simple example of this, say there were two sets of addresses. If I get a LD/ST request to the first set, it takes twice as long as it would for retrieval in the second set. In any case, I have been able to model this phenomenon in gem5's SLICC structure under the guise of a new protocol and was able to see it working as intended using the protocol debugger. However, when I set up a python configuration file to get things going, I know that the RubyCache python object that my generated controller connects to also has a latency parameter. My question is, to accurately model this phenomenon, is the modification of the SLICC sufficient to model the new delays, or do modifications have to be made to RubyCache as well? I took a look at the RubyCache python object, and was left more puzzled when I didn't see any special methods directly in this class (I understand it pulls some of these from SimObject), which made me think this may a better place to ask in the meantime. Thanks
GB
gabriel.busnot@arteris.com
Thu, Feb 15, 2024 6:02 PM

Hi,

The tag and data access latency you are seeing in `src/mem/ruby/structures/RubyCache.py` are actually not implemented by the RubyCache itself. Instead, SLICC machines query these parameters using the getTagLatency and getDataLatency member functions of the CacheMemory SimObject (these functions can be called from SLICC). If your machine decides to ignore these parameters, which is perfectly fine if you want your machine’s timings to be independent from the cache memory behavior, then these parameters won’t have any effect.

As for how does python SimObject’s work under the hood, this is a complex topic. Usually, you only need to understand that python SimObjects define a bunch of typed parameters (the `param = Param.<Type>(…)` attrinutes) that you can set using the `obj.param = value` and that will automagically be passed as constructor parameters to the corresponding C++ SimObject. The actual behavior is implemented on the C++ side.

Regards,

Gabriel

Hi, The tag and data access latency you are seeing in \`src/mem/ruby/structures/RubyCache.py\` are actually not implemented by the RubyCache itself. Instead, SLICC machines query these parameters using the getTagLatency and getDataLatency member functions of the CacheMemory SimObject (these functions can be called from SLICC). If your machine decides to ignore these parameters, which is perfectly fine if you want your machine’s timings to be independent from the cache memory behavior, then these parameters won’t have any effect. As for how does python SimObject’s work under the hood, this is a complex topic. Usually, you only need to understand that python SimObjects define a bunch of typed parameters (the \`param = Param.<Type>(…)\` attrinutes) that you can set using the \`obj.param = value\` and that will automagically be passed as constructor parameters to the corresponding C++ SimObject. The actual behavior is implemented on the C++ side. Regards, Gabriel