diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-03-06 20:58:44 +0000 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-03-06 20:58:44 +0000 |
commit | 44f91bb4443ed55a8e75096f1a821fd7605b7771 (patch) | |
tree | 39ffcc423e52760b67a9b7984fe2d652f56e8c92 /src/python/m5/__init__.py | |
parent | 05c86ec0d7662ccefc5690a4445fcf2976d16622 (diff) | |
parent | 329db76e47c825d4ecbe0f5251dbcfaf2ec09516 (diff) | |
download | gem5-44f91bb4443ed55a8e75096f1a821fd7605b7771.tar.xz |
Merge zizzer.eecs.umich.edu:/bk/newmem
into ahchoo.blinky.homelinux.org:/home/gblack/m5/newmem-x86
--HG--
extra : convert_revision : 0822fbcc377781b53d2de9ba40ab9d985ccbc039
Diffstat (limited to 'src/python/m5/__init__.py')
-rw-r--r-- | src/python/m5/__init__.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/python/m5/__init__.py b/src/python/m5/__init__.py index 30ebcfe7d..6eac7b6d7 100644 --- a/src/python/m5/__init__.py +++ b/src/python/m5/__init__.py @@ -36,7 +36,7 @@ import internal # import a few SWIG-wrapped items (those that are likely to be used # directly by user scripts) completely into this module for # convenience -from internal.event import SimLoopExitEvent +import event # import the m5 compile options import defines @@ -80,7 +80,9 @@ env.update(os.environ) # The final hook to generate .ini files. Called from the user script # once the config is built. def instantiate(root): - params.ticks_per_sec = float(root.clock.frequency) + # we need to fix the global frequency + ticks.fixGlobalFrequency() + root.unproxy_all() # ugly temporary hack to get output to config.ini sys.stdout = file(os.path.join(options.outdir, 'config.ini'), 'w') @@ -94,6 +96,7 @@ def instantiate(root): # Initialize the global statistics internal.stats.initSimStats() + # Create the C++ sim objects and connect ports root.createCCObject() root.connectPorts() @@ -136,7 +139,7 @@ def simulate(*args, **kwargs): # Export curTick to user script. def curTick(): - return internal.event.cvar.curTick + return internal.core.cvar.curTick # Python exit handlers happen in reverse order. We want to dump stats last. atexit.register(internal.stats.dump) |