simulate.py (9254:f1b35c618252) | simulate.py (9262:547845010c08) |
---|---|
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 --- 38 unchanged lines hidden (view full) --- 47# import the SWIG-wrapped main C++ functions 48import internal 49import core 50import stats 51import SimObject 52import ticks 53import objects 54from m5.util.dot_writer import do_dot | 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 --- 38 unchanged lines hidden (view full) --- 47# import the SWIG-wrapped main C++ functions 48import internal 49import core 50import stats 51import SimObject 52import ticks 53import objects 54from m5.util.dot_writer import do_dot |
55from m5.internal.stats import updateEvents as updateStatEvents |
|
55 56from util import fatal 57from util import attrdict 58 59# define a MaxTick parameter 60MaxTick = 2**63 - 1 61 62# The final hook to generate .ini files. Called from the user script --- 55 unchanged lines hidden (view full) --- 118 if ckpt_dir: 119 ckpt = internal.core.getCheckpoint(ckpt_dir) 120 internal.core.unserializeGlobals(ckpt); 121 for obj in root.descendants(): obj.loadState(ckpt) 122 need_resume.append(root) 123 else: 124 for obj in root.descendants(): obj.initState() 125 | 56 57from util import fatal 58from util import attrdict 59 60# define a MaxTick parameter 61MaxTick = 2**63 - 1 62 63# The final hook to generate .ini files. Called from the user script --- 55 unchanged lines hidden (view full) --- 119 if ckpt_dir: 120 ckpt = internal.core.getCheckpoint(ckpt_dir) 121 internal.core.unserializeGlobals(ckpt); 122 for obj in root.descendants(): obj.loadState(ckpt) 123 need_resume.append(root) 124 else: 125 for obj in root.descendants(): obj.initState() 126 |
127 # Check to see if any of the stat events are in the past after resuming from 128 # a checkpoint, If so, this call will shift them to be at a valid time. 129 updateStatEvents() 130 |
|
126 # Reset to put the stats in a consistent state. 127 stats.reset() 128 129need_resume = [] 130need_startup = True 131def simulate(*args, **kwargs): 132 global need_resume, need_startup 133 --- 96 unchanged lines hidden --- | 131 # Reset to put the stats in a consistent state. 132 stats.reset() 133 134need_resume = [] 135need_startup = True 136def simulate(*args, **kwargs): 137 global need_resume, need_startup 138 --- 96 unchanged lines hidden --- |