From 1b841a871ecd717dd8705d12ff7311c6fc97fc63 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Mon, 14 Mar 2005 07:46:26 -0500 Subject: - 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 --- build/SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build/SConstruct') diff --git a/build/SConstruct b/build/SConstruct index 3d7db1db2..0f688ac3b 100644 --- a/build/SConstruct +++ b/build/SConstruct @@ -289,7 +289,7 @@ for build_dir in build_dirs: ################################################### # # Let SCons do its thing. At this point SCons will use the defined -# build enviornments to build the requested targets. +# build environments to build the requested targets. # ################################################### -- cgit v1.2.3 From bc2923f78d739ad5ff42dee402c5ba27c02004f1 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Mon, 14 Mar 2005 14:43:10 -0500 Subject: Move adding SRCDIR/python to sys.path from multiple SConscript files to SConstruct. build/SConstruct: Add SRCDIR/python to sys.path here. python/SConscript: Move adding SRCDIR/python to sys.path to SConstruct. --HG-- extra : convert_revision : f598d670650f5b4fd501caaf073fe38b44d21855 --- build/SConstruct | 3 +++ 1 file changed, 3 insertions(+) (limited to 'build/SConstruct') diff --git a/build/SConstruct b/build/SConstruct index 0f688ac3b..e33373243 100644 --- a/build/SConstruct +++ b/build/SConstruct @@ -62,6 +62,9 @@ if not os.path.isdir('ext'): % EXT_SRCDIR sys.exit(1) +# tell python where to find m5 python code +sys.path.append(os.path.join(SRCDIR, 'python')) + ################################################### # -- cgit v1.2.3