summaryrefslogtreecommitdiff
path: root/src/python/m5/proxy.py
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2019-03-07 17:12:23 +0100
committerDaniel Carvalho <odanrc@yahoo.com.br>2019-03-14 12:11:29 +0000
commit7f9cbfae9a091363ec46102cc3e693ac94b51493 (patch)
tree8b5637abbea3f430de96a9c2d90a4a1de665a536 /src/python/m5/proxy.py
parent66c80fcb44dfbfb9dc70b972e33104f053bd3015 (diff)
downloadgem5-7f9cbfae9a091363ec46102cc3e693ac94b51493.tar.xz
python: Fix unknown params and proxy multiplication
One of the recent changes made params not visible anymore: NameError: global name 'params' is not defined This is fixed by adding the proper import statement. However, the second error makes the multiplication values be assigned to other proxies (that are not even used on the multiplication). A workaround is added to prevent this from happening by extending "*=". Change-Id: I3ad276a456efff62058672d16caac2b3ad1b326b Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17048 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/python/m5/proxy.py')
-rw-r--r--src/python/m5/proxy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/python/m5/proxy.py b/src/python/m5/proxy.py
index d28954555..86321964a 100644
--- a/src/python/m5/proxy.py
+++ b/src/python/m5/proxy.py
@@ -87,6 +87,7 @@ class BaseProxy(object):
__rmul__ = __mul__
def _mulcheck(self, result, base):
+ from . import params
for multiplier in self._multipliers:
if isproxy(multiplier):
multiplier = multiplier.unproxy(base)
@@ -96,7 +97,7 @@ class BaseProxy(object):
raise TypeError(
"Proxy multiplier must be a numerical param")
multiplier = multiplier.getValue()
- result *= multiplier
+ result = result * multiplier
return result
def unproxy(self, base):