On Tue, 13 Nov 2012, Albert wrote:
Aren't they created from a Python script as a SimObject and accesible by the
CPU used through a Param of it?
I mean, if I mentioned Python scripts, to begin with, was because I though
the System objects were created there. But also, as I said, I'm still trying
to figure out how it works.
El 13/11/12 13:28, Nilay Vaish escribió:
On Tue, 13 Nov 2012, Albert wrote:
Ok, that seems to make sense, being also a simpler approach, but where
exactly it should be done? Objects are instantiated from python scripts,
so I imagine you are thinking about a parameter for one of those scripts?
Also, TLBs are instantiated from the CPU (itb and dtb), but I want to
collect the TLBs of each cpu on the System. CPUs are instantiated in
m5/simulate.py along other objects descending from Root, but I'm not sure
how to retrieve the TLBs from there. I'm not really used to the Python/C++
mixture in the config, and grep search where the objects are instantiated
is a bit hard. So it is not really clear to me how to proceed.
And if I finally manage to create that list, if it is a parameter on a
script as mentioned, how can I make it accesible from the tlb.cc class?
Forget about python part of gem5 for the time being. Think purely from C++
point of view. You have a class named TLB. Whenever an object of this class
is created you need to add it to a list. So, you need to create a list
before any of the TLB objects have been created and you need to figure out
when a TLB object is created. If you just think C++, you should be able to
make out how to do both of these.
Ultimately a TLB object is an object in C++ sense. Why don't you try what
I am hinting at? I still suggest that you forget about the Python for the
time being and try to solve the problem with in the realm of C++.
--
Nilay
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users