summaryrefslogtreecommitdiff
path: root/src/python/m5/proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/m5/proxy.py')
-rw-r--r--src/python/m5/proxy.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/python/m5/proxy.py b/src/python/m5/proxy.py
index 36995397b..7ebc0ae19 100644
--- a/src/python/m5/proxy.py
+++ b/src/python/m5/proxy.py
@@ -39,6 +39,15 @@ class BaseProxy(object):
self._search_up = search_up
self._multiplier = None
+ def __str__(self):
+ if self._search_self and not self._search_up:
+ s = 'Self'
+ elif not self._search_self and self._search_up:
+ s = 'Parent'
+ else:
+ s = 'ConfusedProxy'
+ return s + '.' + self.path()
+
def __setattr__(self, attr, value):
if not attr.startswith('_'):
raise AttributeError, \
@@ -102,6 +111,9 @@ class BaseProxy(object):
return obj
getindex = staticmethod(getindex)
+ # This method should be called once the proxy is assigned to a
+ # particular parameter or port to set the expected type of the
+ # resolved proxy
def set_param_desc(self, pdesc):
self._pdesc = pdesc