gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Invoked SLICC functions outside SLICC?

WF
Waqar, Faaiq G
Tue, Feb 27, 2024 2:46 PM

Hi Folks,

I am attempting to get a better handle on the statistics collection within the cache protocols, and one thing I noticed while browsing around the MOESI AMD protocol was that some functions, such as functionalRead/Write, checkResourceAvailable and recordRequestType are defined, but never specifically invoked within the .sm protocol itself. I note that there do seem to be default versions of these functions elsewhere within the Ruby/SLICC filesystem, and that these definitions may be overriding the original definitions. However, I am having trouble reconciling where these functions are being called then. As an example, after running a traffic generator on a setup using the MOESI_AMD_Base protocol, I can clearly see cacheMemory statistics that come from the recordRequestType function, but I am having trouble understanding how and where this happens (since it is not happening directly in the .sm file, and a browse through the codebase has left me stuck). Any help is appreciated, Thank you

Hi Folks, I am attempting to get a better handle on the statistics collection within the cache protocols, and one thing I noticed while browsing around the MOESI AMD protocol was that some functions, such as functionalRead/Write, checkResourceAvailable and recordRequestType are defined, but never specifically invoked within the .sm protocol itself. I note that there do seem to be default versions of these functions elsewhere within the Ruby/SLICC filesystem, and that these definitions may be overriding the original definitions. However, I am having trouble reconciling where these functions are being called then. As an example, after running a traffic generator on a setup using the MOESI_AMD_Base protocol, I can clearly see cacheMemory statistics that come from the recordRequestType function, but I am having trouble understanding how and where this happens (since it is not happening directly in the .sm file, and a browse through the codebase has left me stuck). Any help is appreciated, Thank you
Z
zhangcongwu@ict.ac.cn
Wed, Feb 28, 2024 12:35 AM

Hi,

You can find related information in mem/slicc/symbols/StateMachine.py. This is the slicc compiler, used for generate C++ files from .sm files.
Like recordRequestType function, you can find it in line 1749 (may in another line, search recordRequestType). The comment says Record access types for this transition.
Seems like this function will be invoked every transition.

Best,
Congwu

From: Waqar, Faaiq G via gem5-users
Date: 2024-02-27 22:46
To: Waqar, Faaiq G via gem5-users
CC: Waqar, Faaiq G
Subject: [gem5-users] Invoked SLICC functions outside SLICC?
Hi Folks,

I am attempting to get a better handle on the statistics collection within the cache protocols, and one thing I noticed while browsing around the MOESI AMD protocol was that some functions, such as functionalRead/Write, checkResourceAvailable and recordRequestType are defined, but never specifically invoked within the .sm protocol itself. I note that there do seem to be default versions of these functions elsewhere within the Ruby/SLICC filesystem, and that these definitions may be overriding the original definitions. However, I am having trouble reconciling where these functions are being called then. As an example, after running a traffic generator on a setup using the MOESI_AMD_Base protocol, I can clearly see cacheMemory statistics that come from the recordRequestType function, but I am having trouble understanding how and where this happens (since it is not happening directly in the .sm file, and a browse through the codebase has left me stuck). Any help is appreciated, Thank you

Hi, You can find related information in mem/slicc/symbols/StateMachine.py. This is the slicc `compiler`, used for generate C++ files from .sm files. Like recordRequestType function, you can find it in line 1749 (may in another line, search `recordRequestType`). The comment says `Record access types for this transition`. Seems like this function will be invoked every transition. Best, Congwu From: Waqar, Faaiq G via gem5-users Date: 2024-02-27 22:46 To: Waqar, Faaiq G via gem5-users CC: Waqar, Faaiq G Subject: [gem5-users] Invoked SLICC functions outside SLICC? Hi Folks, I am attempting to get a better handle on the statistics collection within the cache protocols, and one thing I noticed while browsing around the MOESI AMD protocol was that some functions, such as functionalRead/Write, checkResourceAvailable and recordRequestType are defined, but never specifically invoked within the .sm protocol itself. I note that there do seem to be default versions of these functions elsewhere within the Ruby/SLICC filesystem, and that these definitions may be overriding the original definitions. However, I am having trouble reconciling where these functions are being called then. As an example, after running a traffic generator on a setup using the MOESI_AMD_Base protocol, I can clearly see cacheMemory statistics that come from the recordRequestType function, but I am having trouble understanding how and where this happens (since it is not happening directly in the .sm file, and a browse through the codebase has left me stuck). Any help is appreciated, Thank you