Merge zizzer:/z/m5/Bitkeeper/m5

into zizzer.eecs.umich.edu:/.automount/zazzer/z/rdreslin/m5bk/timing_L1

--HG--
extra : convert_revision : 193cb1585489c51f274f978f0adde7c8fbec050f
This commit is contained in:
Ron Dreslinski 2005-01-21 11:43:27 -05:00
commit f3aac53458
3 changed files with 23 additions and 6 deletions

View file

@ -206,7 +206,7 @@ namespace AlphaPseudo
void checkParams(); void checkParams();
}; };
Context context("PseudoInsts"); Context context("pseudo_inst");
Param<bool> __quiesce(&context, "quiesce", Param<bool> __quiesce(&context, "quiesce",
"enable quiesce instructions", "enable quiesce instructions",

View file

@ -134,7 +134,7 @@ InsertEvent::insert(const string &stat)
first = false; first = false;
size += sprintf(query + size, "(%u,%u,%llu)", size += sprintf(query + size, "(%u,%u,%llu)",
event, run, curTick); event, run, (unsigned long long)curTick);
} }
void void

View file

@ -209,6 +209,13 @@ def isSimObjSequence(value):
return True return True
def isParamContext(value):
try:
return issubclass(value, ParamContext)
except:
return False
# The metaclass for ConfigNode (and thus for everything that derives # The metaclass for ConfigNode (and thus for everything that derives
# from ConfigNode, including SimObject). This class controls how new # from ConfigNode, including SimObject). This class controls how new
# classes that derive from ConfigNode are instantiated, and provides # classes that derive from ConfigNode are instantiated, and provides
@ -435,7 +442,7 @@ class MetaConfigNode(type):
# Print instance info to .ini file. # Print instance info to .ini file.
def instantiate(cls, name, parent = None): def instantiate(cls, name, parent = None):
instance = Node(name, cls, cls.type, parent) instance = Node(name, cls, cls.type, parent, isParamContext(cls))
if hasattr(cls, 'check'): if hasattr(cls, 'check'):
cls.check() cls.check()
@ -456,7 +463,11 @@ class MetaConfigNode(type):
if cls._getdisable(pname): if cls._getdisable(pname):
continue continue
value = cls._getvalue(pname) try:
value = cls._getvalue(pname)
except:
print 'Error getting %s' % pname
raise
if isConfigNode(value): if isConfigNode(value):
value = instance.child_objects[value] value = instance.child_objects[value]
@ -533,6 +544,9 @@ class ConfigNode(object):
# v = param.convert(value) # v = param.convert(value)
# object.__setattr__(self, attr, v) # object.__setattr__(self, attr, v)
class ParamContext(ConfigNode):
pass
# SimObject is a minimal extension of ConfigNode, implementing a # SimObject is a minimal extension of ConfigNode, implementing a
# hierarchy node that corresponds to an M5 SimObject. It prints out a # hierarchy node that corresponds to an M5 SimObject. It prints out a
# "type=" line to indicate its SimObject class, prints out the # "type=" line to indicate its SimObject class, prints out the
@ -569,7 +583,7 @@ class NodeParam(object):
class Node(object): class Node(object):
all = {} all = {}
def __init__(self, name, realtype, type, parent): def __init__(self, name, realtype, type, parent, paramcontext):
self.name = name self.name = name
self.realtype = realtype self.realtype = realtype
self.type = type self.type = type
@ -580,6 +594,7 @@ class Node(object):
self.top_child_names = {} self.top_child_names = {}
self.params = [] self.params = []
self.param_names = {} self.param_names = {}
self.paramcontext = paramcontext
path = [ self.name ] path = [ self.name ]
node = self.parent node = self.parent
@ -678,7 +693,8 @@ class Node(object):
# instantiate children in same order they were added for # instantiate children in same order they were added for
# backward compatibility (else we can end up with cpu1 # backward compatibility (else we can end up with cpu1
# before cpu0). # before cpu0).
print 'children =', ' '.join([ c.name for c in self.children]) children = [ c.name for c in self.children if not c.paramcontext]
print 'children =', ' '.join(children)
for param in self.params: for param in self.params:
try: try:
@ -1202,6 +1218,7 @@ true = True
# Some memory range specifications use this as a default upper bound. # Some memory range specifications use this as a default upper bound.
MAX_ADDR = Addr._max MAX_ADDR = Addr._max
MaxTick = Tick._max
# For power-of-two sizing, e.g. 64*K gives an integer value 65536. # For power-of-two sizing, e.g. 64*K gives an integer value 65536.
K = 1024 K = 1024