diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/python/m5/main.py | 9 | ||||
-rw-r--r-- | src/python/m5/simulate.py | 7 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/python/m5/main.py b/src/python/m5/main.py index d34cca357..4853c8908 100644 --- a/src/python/m5/main.py +++ b/src/python/m5/main.py @@ -78,7 +78,7 @@ add_option('-N', "--release-notes", action="store_true", default=False, help="Show the release notes") # Options for configuring the base simulator -add_option('-d', "--outdir", metavar="DIR", default=".", +add_option('-d', "--outdir", metavar="DIR", default="m5out", help="Set the output directory to DIR [Default: %default]") add_option('-r', "--redirect-stdout", action="store_true", default=False, help="Redirect stdout (& stderr, without -e) to file") @@ -101,9 +101,14 @@ add_option('-v', "--verbose", action="count", default=0, # Statistics options set_group("Statistics Options") -add_option("--stats-file", metavar="FILE", default="m5stats.txt", +add_option("--stats-file", metavar="FILE", default="stats.txt", help="Sets the output file for statistics [Default: %default]") +# Configuration Options +set_group("Configuration Options") +add_option("--dump-config", metavar="FILE", default="config.ini", + help="Dump configuration output file [Default: %default]") + # Debugging options set_group("Debugging Options") add_option("--debug-break", metavar="TIME[,TIME]", action='append', split=',', diff --git a/src/python/m5/simulate.py b/src/python/m5/simulate.py index e4dbd5784..617ac3be2 100644 --- a/src/python/m5/simulate.py +++ b/src/python/m5/simulate.py @@ -46,9 +46,10 @@ def instantiate(root): root.unproxy_all() - ini_file = file(os.path.join(options.outdir, 'config.ini'), 'w') - root.print_ini(ini_file) - ini_file.close() # close config.ini + if options.dump_config: + ini_file = file(os.path.join(options.outdir, options.dump_config), 'w') + root.print_ini(ini_file) + ini_file.close() # Initialize the global statistics internal.stats.initSimStats() |