How to find the definition of some member variables of class System()? #576
-
Hi, As the title said, I searched around the code repo but can't find the definition of many variables of class System(). Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
To explain things in a little more details: In gem5 everything starts from a As each SimObject can contain N SimObject, a gem5 simulation can be seen as a tree of SimObjects. system = System()
system.cache_line_size = 32
system.my_cpu = X86TimingSimpleCPU()
system.my_other_cpu = X86KVMCPU()
system.my_other_cpu.my_object = MySimObject() In the above design we have a |
Beta Was this translation helpful? Give feedback.
cpu
isn't a SimObject parameter of aSystem
likemem_ranges
orcache_line_size
(you can find the declaration of those src/sim/System.py).cpu
, which you've likely seen in gem5 scripts, is just a variable which we use to store a Simobject in the simulation design. You can call it anything you want. In this instancecpu
is just the name of the variable which holds the CPU SimObject.To explain things in a little more details: In gem5 everything starts from a
Root
object, which typically contains aSystem
SimObject. TheSystem
SimObject contains parameters likemem_ranges
but can also contain other SimObects. These are added to the system with in the config script with statements likesystem…