summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2007-11-08 10:46:41 -0500
committerAli Saidi <saidi@eecs.umich.edu>2007-11-08 10:46:41 -0500
commitf4222610ea1106b60deb2fa659e580168a8ce511 (patch)
tree10cb300453dce11e7f151b6b9e3a5ab0150f31fc /src/python
parent11b931df6aad5a3063812647a577957ad9443b7b (diff)
downloadgem5-f4222610ea1106b60deb2fa659e580168a8ce511.tar.xz
Python: Allow a range to be a python tuple/list.
--HG-- extra : convert_revision : 81cf805055e2f4d62e56a02ac82a0b230251f40b
Diffstat (limited to 'src/python')
-rw-r--r--src/python/m5/params.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/python/m5/params.py b/src/python/m5/params.py
index 27bb24bd7..241d4ceaf 100644
--- a/src/python/m5/params.py
+++ b/src/python/m5/params.py
@@ -457,6 +457,9 @@ class Range(ParamValue):
elif isinstance(args[0], Range):
self.first = self.type(args[0].first)
self.second = self.type(args[0].second)
+ elif isinstance(args[0], (list, tuple)):
+ self.first = self.type(args[0][0])
+ self.second = self.type(args[0][1])
else:
self.first = self.type(0)
self.second = self.type(args[0]) - 1