summaryrefslogtreecommitdiff
path: root/src/python/m5/simulate.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/m5/simulate.py')
-rw-r--r--src/python/m5/simulate.py12
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()