Enable proxies (Self/Parent) for specifying ports.

Significant revamp of Port code.
Some cleanup of SimObject code too, particularly to
make the SimObject and MetaSimObject implementations of
__setattr__ more consistent.
Unproxy code split out of print_ini().

src/python/m5/multidict.py:
    Make get() return None by default, to match semantics
    of built-in dictionary objects.

--HG--
extra : convert_revision : db73b6cdd004a82a08b2402afd1e16544cb902a4
This commit is contained in:
Steve Reinhardt
2006-09-05 22:04:34 -07:00
parent 6c7a490c2b
commit 545cbec5f7
8 changed files with 248 additions and 132 deletions

View File

@@ -44,6 +44,7 @@ def panic(string):
print >>sys.stderr, 'panic:', string
sys.exit(1)
# force scalars to one-element lists for uniformity
def makeList(objOrList):
if isinstance(objOrList, list):
return objOrList
@@ -75,6 +76,7 @@ env.update(os.environ)
# once the config is built.
def instantiate(root):
params.ticks_per_sec = float(root.clock.frequency)
root.unproxy_all()
# ugly temporary hack to get output to config.ini
sys.stdout = file(os.path.join(options.outdir, 'config.ini'), 'w')
root.print_ini()