From f4222610ea1106b60deb2fa659e580168a8ce511 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Thu, 8 Nov 2007 10:46:41 -0500 Subject: [PATCH] Python: Allow a range to be a python tuple/list. --HG-- extra : convert_revision : 81cf805055e2f4d62e56a02ac82a0b230251f40b --- src/python/m5/params.py | 3 +++ 1 file changed, 3 insertions(+) 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