1b841a871e
.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
25 lines
1,022 B
Text
25 lines
1,022 B
Text
simobj BaseCPU(SimObject):
|
|
type = 'BaseCPU'
|
|
abstract = True
|
|
icache = Param.BaseMem(NULL, "L1 instruction cache object")
|
|
dcache = Param.BaseMem(NULL, "L1 data cache object")
|
|
|
|
if build_env['FULL_SYSTEM']:
|
|
dtb = Param.AlphaDTB("Data TLB")
|
|
itb = Param.AlphaITB("Instruction TLB")
|
|
mem = Param.FunctionalMemory("memory")
|
|
system = Param.BaseSystem(Super, "system object")
|
|
else:
|
|
workload = VectorParam.Process("processes to run")
|
|
|
|
max_insts_all_threads = Param.Counter(0,
|
|
"terminate when all threads have reached this inst count")
|
|
max_insts_any_thread = Param.Counter(0,
|
|
"terminate when any thread reaches this inst count")
|
|
max_loads_all_threads = Param.Counter(0,
|
|
"terminate when all threads have reached this load count")
|
|
max_loads_any_thread = Param.Counter(0,
|
|
"terminate when any thread reaches this load count")
|
|
|
|
defer_registration = Param.Bool(False,
|
|
"defer registration with system (for sampling)")
|