CpuConfig.py (12941:24771c7aee2e) | CpuConfig.py (13012:5fbc6b9c64bc) |
---|---|
1# Copyright (c) 2012, 2017-2018 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 55 unchanged lines hidden (view full) --- 64 65 def tester(cls): 66 return cpu_class is not None and cls is not None and \ 67 issubclass(cls, cpu_class) 68 69 return tester 70 71is_kvm_cpu = _cpu_subclass_tester("BaseKvmCPU") | 1# Copyright (c) 2012, 2017-2018 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 55 unchanged lines hidden (view full) --- 64 65 def tester(cls): 66 return cpu_class is not None and cls is not None and \ 67 issubclass(cls, cpu_class) 68 69 return tester 70 71is_kvm_cpu = _cpu_subclass_tester("BaseKvmCPU") |
72is_atomic_cpu = _cpu_subclass_tester("AtomicSimpleCPU") |
|
72 73def get(name): 74 """Get a CPU class from a user provided class name or alias.""" 75 76 try: 77 cpu_class = _cpu_classes[name] 78 return cpu_class 79 except KeyError: --- 63 unchanged lines hidden --- | 73 74def get(name): 75 """Get a CPU class from a user provided class name or alias.""" 76 77 try: 78 cpu_class = _cpu_classes[name] 79 return cpu_class 80 except KeyError: --- 63 unchanged lines hidden --- |