diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2012-01-16 04:27:10 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2012-01-16 04:27:10 -0800 |
commit | da2a4acc26ba264c3c4a12495776fd6a1c4fb133 (patch) | |
tree | f142100388b9d1403492c97b0d323728ce18ef8a /src/python/m5/simulate.py | |
parent | 241cc0c8402f1b9f2ec20d1cc152d96930959b2a (diff) | |
parent | a7394ad6807bd5e85f680184bf308673ca00534a (diff) | |
download | gem5-da2a4acc26ba264c3c4a12495776fd6a1c4fb133.tar.xz |
Merge yet again with the main repository.
Diffstat (limited to 'src/python/m5/simulate.py')
-rw-r--r-- | src/python/m5/simulate.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/python/m5/simulate.py b/src/python/m5/simulate.py index b4ccf82c1..38129592c 100644 --- a/src/python/m5/simulate.py +++ b/src/python/m5/simulate.py @@ -40,6 +40,7 @@ import SimObject import ticks import objects from util import fatal +from util import attrdict # define a MaxTick parameter MaxTick = 2**63 - 1 @@ -71,6 +72,17 @@ def instantiate(ckpt_dir=None): obj.print_ini(ini_file) ini_file.close() + if options.json_config: + try: + import json + json_file = file(os.path.join(options.outdir, options.json_config), 'w') + d = root.get_config_as_dict() + json.dump(d, json_file, indent=4) + json_file.close() + except ImportError: + pass + + # Initialize the global statistics stats.initSimStats() |