Merge zizzer:/bk/newmem

into  vm1.(none):/home/stever/bk/newmem

--HG--
extra : convert_revision : 6ebb12890c516a11733a04041f29c9964267a5ca
This commit is contained in:
Steve Reinhardt
2006-06-13 23:19:42 -04:00
23 changed files with 308 additions and 137 deletions

View File

@@ -103,6 +103,16 @@ build_env.update(defines.m5_build_env)
env = smartdict.SmartDict()
env.update(os.environ)
# Function to provide to C++ so it can look up instances based on paths
def resolveSimObject(name):
obj = config.instanceDict[name]
if not obj._ccObject:
obj.createCCObject()
if obj._ccObject == -1:
panic("resolveSimObject: recursive lookup error on %s" % name)
return obj._ccObject
# The final hook to generate .ini files. Called from the user script
# once the config is built.
def instantiate(root):
@@ -112,7 +122,10 @@ def instantiate(root):
root.print_ini()
sys.stdout.close() # close config.ini
sys.stdout = sys.__stdout__ # restore to original
main.initialize() # load config.ini into C++ and process it
main.loadIniFile(resolveSimObject) # load config.ini into C++
root.createCCObject()
root.connectPorts()
main.finalInit()
noDot = True # temporary until we fix dot
if not noDot:
dot = pydot.Dot()