summaryrefslogtreecommitdiff
path: root/src/python/m5/params.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/m5/params.py')
-rw-r--r--src/python/m5/params.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/python/m5/params.py b/src/python/m5/params.py
index ee3678dc9..05fe9b774 100644
--- a/src/python/m5/params.py
+++ b/src/python/m5/params.py
@@ -228,6 +228,12 @@ class SimObjectVector(VectorParamValue):
for obj in v.descendants():
yield obj
+ def get_config_as_dict(self):
+ a = []
+ for v in self:
+ a.append(v.get_config_as_dict())
+ return a
+
class VectorParamDesc(ParamDesc):
# Convert assigned value to appropriate type. If the RHS is not a
# list or tuple, it generates a single-element list.
@@ -256,6 +262,9 @@ class VectorParamDesc(ParamDesc):
self.ptype.cxx_predecls(code)
code('%}')
code()
+ # Make sure the SWIGPY_SLICE_ARG is defined through this inclusion
+ code('%include "std_container.i"')
+ code()
self.ptype.swig_predecls(code)
code()
code('%include "std_vector.i"')
@@ -961,6 +970,9 @@ class Time(ParamValue):
def ini_str(self):
return str(self)
+ def get_config_as_dict(self):
+ return str(self)
+
# Enumerated types are a little more complex. The user specifies the
# type as Enum(foo) where foo is either a list or dictionary of
# alternatives (typically strings, but not necessarily so). (In the