Hello,
I am working on a project that requires me to embed a C++ object into the cache
entry of the L2 Cache like this:
structure(Entry, desc="...", interface="AbstractCacheEntry") {
State CacheState, desc="cache state";
ChildStates CS, desc="children cache states" <=== This is the C++
object
ParentState PS, desc="parent cache state"
DataBlock DataBlk, desc="data for the block";
}
I declare the object in SLICC as:
structure (ChildStates, external = "yes") {
// Bunch of functions here
}
I then created a C++ file and a header file for the object. The only issue I
have is that the C++ object needs to have some Machine IDs assigned to it when
the network topology is created. I am wondering how this can be done. I am
assuming I first need to create a Python file for the C++ object that is like
this:
from m5.params import *
from m5.SimObject import SimObject
from Controller import RubyController
class ChildStates(SimObject):
type = 'ChildStates'
cxx_class = 'HCC_C_Functions'
cxx_header = "mem/ruby/system/HCC_C_Functions.hh"
childPorts = Param.Int("number of children ports");
// Put my functions here?
I then need to instantiate the object or call a function to the object when I
am creating the network topology (I don't know which). I don't know how to do
this portion as I am unfamiliar with Python and Gem5 overall. Also, how can I
find the MachineID of a specific network node when initializing the network
topology? I can't find any information on this.
- Alex_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users