Simulation.py (5073:1916291dcfda) | Simulation.py (5185:d970c1ec39c9) |
---|---|
1# Copyright (c) 2006-2007 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 178 unchanged lines hidden (view full) --- 187 188 if exit_event.getCause() == "simulate() limit reached": 189 m5.checkpoint(root, joinpath(cptdir, "cpt.%d")) 190 num_checkpoints += 1 191 192 sim_ticks = when 193 exit_cause = "maximum %d checkpoints dropped" % max_checkpoints 194 while num_checkpoints < max_checkpoints and \ | 1# Copyright (c) 2006-2007 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 178 unchanged lines hidden (view full) --- 187 188 if exit_event.getCause() == "simulate() limit reached": 189 m5.checkpoint(root, joinpath(cptdir, "cpt.%d")) 190 num_checkpoints += 1 191 192 sim_ticks = when 193 exit_cause = "maximum %d checkpoints dropped" % max_checkpoints 194 while num_checkpoints < max_checkpoints and \ |
195 exit_event.getCause() != "user interrupt received": | 195 exit_event.getCause() == "simulate() limit reached": |
196 if (sim_ticks + period) > maxtick: 197 exit_event = m5.simulate(maxtick - sim_ticks) 198 exit_cause = exit_event.getCause() 199 break 200 else: 201 exit_event = m5.simulate(period) 202 sim_ticks += period 203 while exit_event.getCause() == "checkpoint": 204 exit_event = m5.simulate(sim_ticks - m5.curTick()) 205 if exit_event.getCause() == "simulate() limit reached": 206 m5.checkpoint(root, joinpath(cptdir, "cpt.%d")) 207 num_checkpoints += 1 208 | 196 if (sim_ticks + period) > maxtick: 197 exit_event = m5.simulate(maxtick - sim_ticks) 198 exit_cause = exit_event.getCause() 199 break 200 else: 201 exit_event = m5.simulate(period) 202 sim_ticks += period 203 while exit_event.getCause() == "checkpoint": 204 exit_event = m5.simulate(sim_ticks - m5.curTick()) 205 if exit_event.getCause() == "simulate() limit reached": 206 m5.checkpoint(root, joinpath(cptdir, "cpt.%d")) 207 num_checkpoints += 1 208 |
209 if exit_event.getCause() == "user interrupt received": | 209 if exit_event.getCause() != "simulate() limit reached": |
210 exit_cause = exit_event.getCause(); 211 212 213 else: #no checkpoints being taken via this script 214 exit_event = m5.simulate(maxtick) 215 216 while exit_event.getCause() == "checkpoint": 217 m5.checkpoint(root, joinpath(cptdir, "cpt.%d")) --- 12 unchanged lines hidden --- | 210 exit_cause = exit_event.getCause(); 211 212 213 else: #no checkpoints being taken via this script 214 exit_event = m5.simulate(maxtick) 215 216 while exit_event.getCause() == "checkpoint": 217 m5.checkpoint(root, joinpath(cptdir, "cpt.%d")) --- 12 unchanged lines hidden --- |