summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-03-11 18:30:44 -0500
committerNathan Binkert <binkertn@umich.edu>2005-03-11 18:30:44 -0500
commitfa1650a08e56b176c2b31cd5c3b8939820e93884 (patch)
tree5ecfc40a183440507b14ea7ab6bdbdbd8a29c666
parentcf05fa476df711f64d0481117cf075ce68676d57 (diff)
downloadgem5-fa1650a08e56b176c2b31cd5c3b8939820e93884.tar.xz
Make ConfigNodes as intermediate containers work again.
python/m5/config.py: move the type stuff into the Node constructor and only try to grab self.type if the realtype is a SimObject --HG-- extra : convert_revision : 00f6ece47e3812f67f9e1f062fe9c060bd6dd1cf
-rw-r--r--python/m5/config.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/python/m5/config.py b/python/m5/config.py
index b39a8b9a6..33e329f3f 100644
--- a/python/m5/config.py
+++ b/python/m5/config.py
@@ -449,7 +449,7 @@ class MetaConfigNode(type):
# Print instance info to .ini file.
def instantiate(cls, name, parent = None):
- instance = Node(name, cls, cls.type, parent, isParamContext(cls))
+ instance = Node(name, cls, parent, isParamContext(cls))
if hasattr(cls, 'check'):
cls.check()
@@ -584,10 +584,13 @@ class NodeParam(object):
class Node(object):
all = {}
- def __init__(self, name, realtype, type, parent, paramcontext):
+ def __init__(self, name, realtype, parent, paramcontext):
self.name = name
self.realtype = realtype
- self.type = type
+ if isSimObject(realtype):
+ self.type = realtype.type
+ else:
+ self.type = None
self.parent = parent
self.children = []
self.child_names = {}