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:
committed by
GitHub
parent
9064249fab
commit
ce6fd7f084
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user