Simulation.py (9606:0a4b702628bd) | Simulation.py (9634:37a6fb91f96d) |
---|---|
1# Copyright (c) 2012 ARM Limited 2# All rights reserved 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 169 unchanged lines hidden (view full) --- 178 print "Checkpoint written." 179 180 else: 181 when, period = options.take_checkpoints.split(",", 1) 182 when = int(when) 183 period = int(period) 184 num_checkpoints = 0 185 | 1# Copyright (c) 2012 ARM Limited 2# All rights reserved 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 169 unchanged lines hidden (view full) --- 178 print "Checkpoint written." 179 180 else: 181 when, period = options.take_checkpoints.split(",", 1) 182 when = int(when) 183 period = int(period) 184 num_checkpoints = 0 185 |
186 exit_event = m5.simulate(when) | 186 exit_event = m5.simulate(when - m5.curTick()) |
187 exit_cause = exit_event.getCause() 188 while exit_cause == "checkpoint": 189 exit_event = m5.simulate(when - m5.curTick()) 190 exit_cause = exit_event.getCause() 191 192 if exit_cause == "simulate() limit reached": 193 m5.checkpoint(joinpath(cptdir, "cpt.%d")) 194 num_checkpoints += 1 --- 15 unchanged lines hidden (view full) --- 210 exit_event = m5.simulate(sim_ticks - m5.curTick()) 211 if exit_event.getCause() == "simulate() limit reached": 212 m5.checkpoint(joinpath(cptdir, "cpt.%d")) 213 num_checkpoints += 1 214 215 return exit_event 216 217def benchCheckpoints(options, maxtick, cptdir): | 187 exit_cause = exit_event.getCause() 188 while exit_cause == "checkpoint": 189 exit_event = m5.simulate(when - m5.curTick()) 190 exit_cause = exit_event.getCause() 191 192 if exit_cause == "simulate() limit reached": 193 m5.checkpoint(joinpath(cptdir, "cpt.%d")) 194 num_checkpoints += 1 --- 15 unchanged lines hidden (view full) --- 210 exit_event = m5.simulate(sim_ticks - m5.curTick()) 211 if exit_event.getCause() == "simulate() limit reached": 212 m5.checkpoint(joinpath(cptdir, "cpt.%d")) 213 num_checkpoints += 1 214 215 return exit_event 216 217def benchCheckpoints(options, maxtick, cptdir): |
218 exit_event = m5.simulate(maxtick) | 218 exit_event = m5.simulate(maxtick - m5.curTick()) |
219 exit_cause = exit_event.getCause() 220 221 num_checkpoints = 0 222 max_checkpoints = options.max_checkpoints 223 224 while exit_cause == "checkpoint": 225 m5.checkpoint(joinpath(cptdir, "cpt.%d")) 226 num_checkpoints += 1 --- 260 unchanged lines hidden --- | 219 exit_cause = exit_event.getCause() 220 221 num_checkpoints = 0 222 max_checkpoints = options.max_checkpoints 223 224 while exit_cause == "checkpoint": 225 m5.checkpoint(joinpath(cptdir, "cpt.%d")) 226 num_checkpoints += 1 --- 260 unchanged lines hidden --- |