From: Daniel R. Carvalho Date: Thu, 3 Oct 2019 20:39:41 +0000 (+0200) Subject: configs: Isolate ISA related object lists X-Git-Tag: v19.0.0.0~471 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d241429e6077965417a5794eb301936926ba03fc;p=gem5.git configs: Isolate ISA related object lists Some objects are not compiled when using NULL ISA, and therefore their object lists cannot exist. Change-Id: I93ec576229916c892de50bb6c73cd602e18a3654 Signed-off-by: Daniel R. Carvalho Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21439 Reviewed-by: Jason Lowe-Power Reviewed-by: Giacomo Travaglini Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/configs/common/ObjectList.py b/configs/common/ObjectList.py index c197439c5..8b3233fb5 100644 --- a/configs/common/ObjectList.py +++ b/configs/common/ObjectList.py @@ -153,11 +153,11 @@ class CPUList(ObjectList): self._is_obj_class): self._sub_classes[name] = cls -bp_list = ObjectList(m5.objects.BranchPredictor) -cpu_list = CPUList(m5.objects.BaseCPU) -hwp_list = ObjectList(m5.objects.BasePrefetcher) -indirect_bp_list = ObjectList(m5.objects.IndirectPredictor) -mem_list = ObjectList(m5.objects.AbstractMemory) +bp_list = ObjectList(getattr(m5.objects, 'BranchPredictor', None)) +cpu_list = CPUList(getattr(m5.objects, 'BaseCPU', None)) +hwp_list = ObjectList(getattr(m5.objects, 'BasePrefetcher', None)) +indirect_bp_list = ObjectList(getattr(m5.objects, 'IndirectPredictor', None)) +mem_list = ObjectList(getattr(m5.objects, 'AbstractMemory', None)) # Platform aliases. The platforms listed here might not be compiled, # we make sure they exist before we add them to the platform list. @@ -165,7 +165,8 @@ _platform_aliases_all = [ ("RealView_PBX", "RealViewPBX"), ("VExpress_GEM5", "VExpress_GEM5_V1"), ] -platform_list = ObjectList(m5.objects.Platform, _platform_aliases_all) +platform_list = ObjectList(getattr(m5.objects, 'Platform', None), \ + _platform_aliases_all) def _subclass_tester(name): sub_class = getattr(m5.objects, name, None)