From fae5f5e00b3a24e0b9dab5499408b6abbc7bcccd Mon Sep 17 00:00:00 2001 From: Ivana Mitrovic Date: Fri, 1 Mar 2024 16:41:18 -0800 Subject: [PATCH] sim-se: Catch None value if binary is not compatible with gem5 (#903) Adding an error message in case the binary is not compatible with gem5. This PR is addressing the comments in issue #807. Change-Id: I66466ed6f657276c13d237fde3b1ec12c20cfe91 --- src/sim/Workload.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sim/Workload.py b/src/sim/Workload.py index 50625e8085..3e0c9a6e85 100644 --- a/src/sim/Workload.py +++ b/src/sim/Workload.py @@ -147,6 +147,12 @@ class SEWorkload(Workload, metaclass=SEWorkloadMeta): from _m5 import object_file obj = object_file.create(path) + + if obj is None: + raise ValueError( + f"{path}: the file is not an object file compatible with gem5." + ) + options = list( filter( lambda wld: wld._is_compatible_with(obj),