diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-10-09 22:59:56 -0400 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-10-09 22:59:56 -0400 |
commit | bdde892d668e17fb5a67de0e560a85b9092adf9e (patch) | |
tree | 3876a98dcd7f80aca7bf7e2153dbaa32c83a15b5 /configs/example | |
parent | a9ae6c8656dc233996c81cdeb6f5c8539442af95 (diff) | |
parent | 5448517da4cd13e3c8438850f04367d9614d686b (diff) | |
download | gem5-bdde892d668e17fb5a67de0e560a85b9092adf9e.tar.xz |
Merge ktlim@zizzer:/bk/newmem
into zamp.eecs.umich.edu:/z/ktlim2/clean/o3-merge/newmem
src/cpu/memtest/memtest.cc:
src/cpu/memtest/memtest.hh:
src/cpu/simple/timing.hh:
tests/configs/o3-timing-mp.py:
Hand merge.
--HG--
extra : convert_revision : a58cc439eb5e8f900d175ed8b5a85b6c8723e558
Diffstat (limited to 'configs/example')
-rw-r--r-- | configs/example/fs.py | 29 | ||||
-rw-r--r-- | configs/example/se.py | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/configs/example/fs.py b/configs/example/fs.py index 3d3313fbf..460fb68fb 100644 --- a/configs/example/fs.py +++ b/configs/example/fs.py @@ -55,6 +55,8 @@ parser.add_option("--etherdump", action="store", type="string", dest="etherdump" "ethernet traffic") parser.add_option("--checkpoint_dir", action="store", type="string", help="Place all checkpoints in this absolute directory") +parser.add_option("-c", "--checkpoint", action="store", type="int", + help="restore from checkpoint <N>") (options, args) = parser.parse_args() @@ -77,6 +79,8 @@ else: cpu.clock = '2GHz' cpu2.clock = '2GHz' +cpu.cpu_id = 0 +cpu2.cpu_id = 0 if options.benchmark: if options.benchmark not in Benchmarks: @@ -113,6 +117,31 @@ else: m5.instantiate(root) +if options.checkpoint: + from os.path import isdir + from os import listdir, getcwd + import re + if options.checkpoint_dir: + cptdir = options.checkpoint_dir + else: + cptdir = getcwd() + + if not isdir(cptdir): + m5.panic("checkpoint dir %s does not exist!" % cptdir) + + dirs = listdir(cptdir) + expr = re.compile('cpt.([0-9]*)') + cpts = [] + for dir in dirs: + match = expr.match(dir) + if match: + cpts.append(match.group(1)) + + if options.checkpoint > len(cpts): + m5.panic('Checkpoint %d not found' % options.checkpoint) + + m5.restoreCheckpoint(root, "/".join([cptdir, "cpt.%s" % cpts[options.checkpoint - 1]])) + if options.maxtick: maxtick = options.maxtick elif options.maxtime: diff --git a/configs/example/se.py b/configs/example/se.py index 7b8a52288..6a941b9da 100644 --- a/configs/example/se.py +++ b/configs/example/se.py @@ -90,6 +90,7 @@ else: cpu = AtomicSimpleCPU() cpu.workload = process +cpu.cpu_id = 0 system = System(cpu = cpu, physmem = PhysicalMemory(), |