summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-03-09 14:42:30 -0500
committerNathan Binkert <binkertn@umich.edu>2005-03-09 14:42:30 -0500
commit7d91bda6bfba1bd0cf49ff7ff20373b5d44df87a (patch)
treeef8d47d1ac5522b7edf6dd12d623b22001fb6844 /sim
parent4a3ad218e1a41a9fa655471b999e2540e4e78448 (diff)
downloadgem5-7d91bda6bfba1bd0cf49ff7ff20373b5d44df87a.tar.xz
Add support for using the variables that m5 was compiled with for
determining which parameters belong to a class. This allows us to remove the disable flag since it is not the correct model for variable checking anyway. objects/BaseCPU.mpy: Use the FULL_SYSTEM environment variable to enable or disable parameters. sim/pyconfig/m5config.py: remove the disable flag since it is not the correct model for variable checking. --HG-- extra : convert_revision : a8ccb78ba16d23006225df282a09187d32557608
Diffstat (limited to 'sim')
-rw-r--r--sim/pyconfig/m5config.py35
1 files changed, 6 insertions, 29 deletions
diff --git a/sim/pyconfig/m5config.py b/sim/pyconfig/m5config.py
index b5617c8ae..e6201b3ad 100644
--- a/sim/pyconfig/m5config.py
+++ b/sim/pyconfig/m5config.py
@@ -246,7 +246,6 @@ class MetaConfigNode(type):
cls._params = {}
cls._values = {}
cls._enums = {}
- cls._disable = {}
cls._bases = [c for c in cls.__mro__ if isConfigNode(c)]
cls._anon_subclass_counter = 0
@@ -382,15 +381,6 @@ class MetaConfigNode(type):
def _setvalue(cls, name, value):
cls._values[name] = value
- def _getdisable(cls, name):
- for c in cls._bases:
- if c._disable.has_key(name):
- return c._disable[name]
- return False
-
- def _setdisable(cls, name, value):
- cls._disable[name] = value
-
def __getattr__(cls, attr):
if cls._isvalue(attr):
return Value(cls, attr)
@@ -465,9 +455,6 @@ class MetaConfigNode(type):
cls.check()
for key,value in cls._getvalues().iteritems():
- if cls._getdisable(key):
- continue
-
if isConfigNode(value):
cls.add_child(instance, key, value)
if issequence(value):
@@ -477,15 +464,11 @@ class MetaConfigNode(type):
for pname,param in cls._getparams().iteritems():
try:
- if cls._getdisable(pname):
- continue
-
- try:
- value = cls._getvalue(pname)
- except:
- print 'Error getting %s' % pname
- raise
+ value = cls._getvalue(pname)
+ except:
+ panic('Error getting %s' % pname)
+ try:
if isConfigNode(value):
value = instance.child_objects[value]
elif issequence(value):
@@ -814,16 +797,10 @@ class Value(object):
return self.obj._getvalue(self.attr)
def __setattr__(self, attr, value):
- if attr == 'disable':
- self.obj._setdisable(self.attr, value)
- else:
- setattr(self._getattr(), attr, value)
+ setattr(self._getattr(), attr, value)
def __getattr__(self, attr):
- if attr == 'disable':
- return self.obj._getdisable(self.attr)
- else:
- return getattr(self._getattr(), attr)
+ return getattr(self._getattr(), attr)
def __getitem__(self, index):
return self._getattr().__getitem__(index)