diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2005-03-14 07:46:26 -0500 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2005-03-14 07:46:26 -0500 |
commit | 1b841a871ecd717dd8705d12ff7311c6fc97fc63 (patch) | |
tree | 48db77cabaae797478b9ee84c03ebe64fbe34f94 /python/m5/config.py | |
parent | 82964b2705b892f5d36522f7b7c5472975a5d873 (diff) | |
download | gem5-1b841a871ecd717dd8705d12ff7311c6fc97fc63.tar.xz |
- Add capability to auto-generate Param structs from
.mpy SimObject descriptions. Structs are defined
in simobj/param/ObjectName.hh.
- Move compile-time python params (from CPPDEFINES) to
separate dict from run-time params (from os.environ).
The former are needed to generate proper param structs.
This also helps prevent users from messing things up
by setting the wrong environment vars (which could have
overridden compile-time settings in the old system).
- Other misc cleanup of m5 python package.
SConscript:
Include simobj/SConscript
build/SConstruct:
Fix type in comment
python/SConscript:
Move CPPDEFINES dict-generating code to m5scons.flatten_defines
python/m5/__init__.py:
- Generate a build_env SmartDict here to hold compile-time
params (passed in via __main__.m5_build_env).
- Move panic and env here from config.py.
python/m5/config.py:
Move panic, env to top level (m5/__init__.py)
python/m5/objects/BaseCPU.mpy:
Use build_env instead of env for compile-time params
python/m5/smartdict.py:
Add some comments.
sim/sim_object.hh:
Include auto-generated Param struct. Not used yet,
just here as proof of concept.
test/genini.py:
Put -E arguments in build_env as well as os.environ
--HG--
extra : convert_revision : cf6f4a2565b230c495b33b18612d6030988adac5
Diffstat (limited to 'python/m5/config.py')
-rw-r--r-- | python/m5/config.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/python/m5/config.py b/python/m5/config.py index 7dfc4fb04..a9d7a2f41 100644 --- a/python/m5/config.py +++ b/python/m5/config.py @@ -27,7 +27,6 @@ from __future__ import generators import os, re, sys, types, inspect -from smartdict import SmartDict from convert import * noDot = False @@ -36,13 +35,6 @@ try: except: noDot = True -env = SmartDict() -env.update(os.environ) - -def panic(string): - print >>sys.stderr, 'panic:', string - sys.exit(1) - def issequence(value): return isinstance(value, tuple) or isinstance(value, list) @@ -1347,7 +1339,7 @@ class SimObject(ConfigNode, ParamType): # __all__ defines the list of symbols that get exported when # 'from config import *' is invoked. Try to keep this reasonably # short to avoid polluting other namespaces. -__all__ = ['env', 'issequence', 'panic', +__all__ = ['issequence', 'ConfigNode', 'SimObject', 'ParamContext', 'Param', 'VectorParam', 'Super', 'Enum', 'Int', 'Unsigned', 'Int8', 'UInt8', 'Int16', 'UInt16', |