summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2005-01-18 15:46:00 -0500
committerKevin Lim <ktlim@umich.edu>2005-01-18 15:46:00 -0500
commit554dc7831f414c14ee194169356d15bd9e5945e1 (patch)
tree8516e9fc0bd08d77b9bc45213dfdc561cf64f545 /sim
parentaed3e6780a54f2d4f008a8cf7f66e2bbdc788a0d (diff)
parent25f54857c9356b7f8608be8d45fec17d6c26bce5 (diff)
downloadgem5-554dc7831f414c14ee194169356d15bd9e5945e1.tar.xz
Merge zizzer.eecs.umich.edu:/bk/m5
into zamp.eecs.umich.edu:/z/ktlim2/m5-patched/m5-new --HG-- extra : convert_revision : c51d9a7361d8e3c23e9494640c66df8505322b00
Diffstat (limited to 'sim')
-rw-r--r--sim/pyconfig/m5config.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/sim/pyconfig/m5config.py b/sim/pyconfig/m5config.py
index d7c0c6507..4e2a377b0 100644
--- a/sim/pyconfig/m5config.py
+++ b/sim/pyconfig/m5config.py
@@ -35,6 +35,19 @@ def defined(key):
def define(key, value = True):
env[key] = value
+def panic(*args, **kwargs):
+ sys.exit(*args, **kwargs)
+
+def AddToPath(path):
+ path = os.path.realpath(path)
+ if os.path.isdir(path):
+ sys.path.append(path)
+
+def Import(path):
+ AddToPath(os.path.dirname(path))
+ exec('from m5config import *')
+ mpy_exec(file(path, 'r'))
+
def issequence(value):
return isinstance(value, tuple) or isinstance(value, list)