CpuConfig.py (13012:5fbc6b9c64bc) | CpuConfig.py (13684:076506a21535) |
---|---|
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 --- 56 unchanged lines hidden (view full) --- 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") | 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 --- 56 unchanged lines hidden (view full) --- 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") |
73is_noncaching_cpu = _cpu_subclass_tester("NonCachingSimpleCPU") |
|
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 --- | 74 75def get(name): 76 """Get a CPU class from a user provided class name or alias.""" 77 78 try: 79 cpu_class = _cpu_classes[name] 80 return cpu_class 81 except KeyError: --- 63 unchanged lines hidden --- |