sim: Give the NullSimObject singleton a _name.
authorGabe Black <gabeblack@google.com>
Mon, 25 Sep 2017 23:14:38 +0000 (16:14 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 26 Sep 2017 21:17:51 +0000 (21:17 +0000)
The name is 'Null', and is what __str__ returns.

Change-Id: I113f52496f5e9133b8d03206289b719fda003582
Reviewed-on: https://gem5-review.googlesource.com/4845
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/python/m5/params.py

index f9412d70ea01ea8af44c7a7b028964e3a68acb5a..0f7d6e091f730f21c4d04fe3fc22448c82fce474 100644 (file)
@@ -1694,6 +1694,7 @@ class MemoryBandwidth(float,ParamValue):
 # only one copy of a particular node
 class NullSimObject(object):
     __metaclass__ = Singleton
+    _name = 'Null'
 
     def __call__(cls):
         return cls
@@ -1721,7 +1722,7 @@ class NullSimObject(object):
         yield None
 
     def __str__(self):
-        return 'Null'
+        return self._name
 
     def config_value(self):
         return None