config: Cleanup CPU configuration
Review Request #1606 - Created Jan. 7, 2013 and submitted
| Information | |
|---|---|
| Ali Saidi | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 9455:969ab2ed5cfa --------------------------- config: Cleanup CPU configuration The CPUs supported by the configuration scripts used to be hard-coded. This was not ideal for several reasons. For example, the configuration scripts depend on all CPU models even though only a subset might have been compiled. This changeset adds a new module to the configuration scripts that automatically discovers the available CPU models from the compiled SimObjects. As a nice bonus, the use of introspection allows us to automatically generate a list of available CPU models suitable for printing. This list is augmented with the Python doc string from the underlying class if available.
Issue Summary
3
3
0
0
| Description | From | Last Updated | Status |
|---|---|---|---|
| Why do we need this separately? Why not just add the list of configurations to help text for cpu-type? | Nilay Vaish | Jan. 14, 2013, 9:19 p.m. | Open |
| Can this not be part of CPU meta data? | Nilay Vaish | Jan. 14, 2013, 9:23 p.m. | Open |
| This special-casing is kind of ugly... is the basic problem that m5.objects only has C++-based objects? Is there a way ... | Steve Reinhardt | Jan. 23, 2013, 4:21 a.m. | Open |
Posted (Jan. 14, 2013, 9:19 p.m.)
-
configs/common/Options.py (Diff revision 1) -
Why do we need this separately? Why not just add the list of configurations to help text for cpu-type?
Posted (Jan. 14, 2013, 9:23 p.m.)
-
configs/common/CpuConfig.py (Diff revision 1) -
Can this not be part of CPU meta data?
Posted (Jan. 14, 2013, 11:03 p.m.)
-
configs/common/CpuConfig.py (Diff revision 1) -
Yes and no. It could be, but in that case if you old compiled in the simple CPUs you'd get an error instead of you need to have compiled the InOrderCPU...
-
configs/common/Options.py (Diff revision 1) -
that are available (and compiled in), yes
In general I really love this. The arm_detailed CPU object has always been pretty ugly IMO, so this change just makes the ugliness stand out even more because now there's less surrounding ugliness to obscure it ;). Since you're not introducing any ugliness that wasn't already there, I'm OK with committing this as is and trying to solve the problem described below separately.
-
configs/common/CpuConfig.py (Diff revision 1) -
This special-casing is kind of ugly... is the basic problem that m5.objects only has C++-based objects? Is there a way to get a more comprehensive list of defined subclasses of BaseCPU or SimObject by constructing a list in the metaclass constructor, or something?
Ship It!
