# Authors: Lisa Hsu
from os import getcwd
+from os.path import join as joinpath
import m5
from m5.objects import *
m5.AddToPath('../common')
m5.panic('Checkpoint %d not found' % cpt_num)
m5.restoreCheckpoint(root,
- "/".join([cptdir, "cpt.%s" % cpts[cpt_num - 1]]))
+ joinpath(cptdir, "cpt.%s" % cpts[cpt_num - 1]))
if options.standard_switch or cpu_class:
exit_event = m5.simulate(10000)
exit_event = m5.simulate(when - m5.curTick())
if exit_event.getCause() == "simulate() limit reached":
- m5.checkpoint(root, "/".join([cptdir,"cpt.%d"]))
+ m5.checkpoint(root, joinpath(cptdir, "cpt.%d"))
num_checkpoints += 1
sim_ticks = when
while exit_event.getCause() == "checkpoint":
exit_event = m5.simulate(sim_ticks - m5.curTick())
if exit_event.getCause() == "simulate() limit reached":
- m5.checkpoint(root, "/".join([cptdir,"cpt.%d"]))
+ m5.checkpoint(root, joinpath(cptdir, "cpt.%d"))
num_checkpoints += 1
else: #no checkpoints being taken via this script
exit_event = m5.simulate(maxtick)
while exit_event.getCause() == "checkpoint":
- m5.checkpoint(root, "/".join([cptdir,"cpt.%d"]))
+ m5.checkpoint(root, joinpath(cptdir, "cpt.%d"))
num_checkpoints += 1
if num_checkpoints == max_checkpoints:
exit_cause = "maximum %d checkpoints dropped" % max_checkpoints