From 0c6543d781ae08e27ca9745bacc8ad5d55e0a0fb Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Thu, 4 Apr 2024 08:12:30 +0100 Subject: [PATCH] python: Add is_subset to the AddrRange param class (#993) This will just call the _m5.range.isSubset method Change-Id: If747819a008a8ed20796b4efd42a42e5c3a8d7d9 Signed-off-by: Giacomo Travaglini --- src/python/m5/params.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/python/m5/params.py b/src/python/m5/params.py index 32723a7860..f3a68ccc18 100644 --- a/src/python/m5/params.py +++ b/src/python/m5/params.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2014, 2017-2019, 2021 Arm Limited +# Copyright (c) 2012-2014, 2017-2019, 2021, 2024 Arm Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -1036,6 +1036,9 @@ class AddrRange(ParamValue): return list([AddrRange(r.start(), r.end()) for r in pybind_include]) + def is_subset(self, addr_range): + return self.getValue().isSubset(addr_range.getValue()) + # Boolean parameter type. Python doesn't let you subclass bool, since # it doesn't want to let you create multiple instances of True and