Skip to content

How to find the definition of some member variables of class System()? #576

Closed Answered by BobbyRBruce
cnjsdfcy asked this question in Q&A
Discussion options

You must be logged in to vote

cpu isn't a SimObject parameter of a System like mem_ranges or cache_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 instance cpu 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 a System SimObject. The System SimObject contains parameters like mem_ranges but can also contain other SimObects. These are added to the system with in the config script with statements like system…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@cnjsdfcy
Comment options

@BobbyRBruce
Comment options

@cnjsdfcy
Comment options

@BobbyRBruce
Comment options

@cnjsdfcy
Comment options

Answer selected by BobbyRBruce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #575 on November 20, 2023 16:11.