configs: Fix SMT cpu type checking (#684)

The args.cpu_type is not a type but a string so the isinstance checking
will always fail and an assertion will always be thrown

Change-Id: I6a88d1a514bb323c517949632f4e76be40e87e8c

Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
This commit is contained in:
Giacomo Travaglini
2023-12-18 06:08:49 +00:00
committed by GitHub
parent 9064249fab
commit ce6fd7f084
2 changed files with 3 additions and 1 deletions

View File

@@ -228,3 +228,4 @@ def _subclass_tester(name):
is_kvm_cpu = _subclass_tester("BaseKvmCPU")
is_noncaching_cpu = _subclass_tester("NonCachingSimpleCPU")
is_o3_cpu = _subclass_tester("BaseO3CPU")

View File

@@ -118,7 +118,8 @@ def get_processes(args):
idx += 1
if args.smt:
assert isinstance(args.cpu_type, DerivO3CPU)
cpu_type = ObjectList.cpu_list.get(args.cpu_type)
assert ObjectList.is_o3_cpu(cpu_type), "SMT requires an O3CPU"
return multiprocesses, idx
else:
return multiprocesses, 1