Simulation.py (9518:8faae62af8c3) | Simulation.py (9520:ea7c03ae2d5e) |
---|---|
1# Copyright (c) 2012 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 --- 29 unchanged lines hidden (view full) --- 38# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39# 40# Authors: Lisa Hsu 41 42import sys 43from os import getcwd 44from os.path import join as joinpath 45 | 1# Copyright (c) 2012 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 --- 29 unchanged lines hidden (view full) --- 38# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39# 40# Authors: Lisa Hsu 41 42import sys 43from os import getcwd 44from os.path import join as joinpath 45 |
46import CpuConfig 47 |
|
46import m5 47from m5.defines import buildEnv 48from m5.objects import * 49from m5.util import * | 48import m5 49from m5.defines import buildEnv 50from m5.objects import * 51from m5.util import * |
50from O3_ARM_v7a import * | |
51 52addToPath('../common') 53 54def getCPUClass(cpu_type): | 52 53addToPath('../common') 54 55def getCPUClass(cpu_type): |
55 """Returns the required cpu class and the mode of operation. 56 """ | 56 """Returns the required cpu class and the mode of operation.""" 57 cls = CpuConfig.get(cpu_type) 58 return cls, cls.memory_mode() |
57 | 59 |
58 if cpu_type == "timing": 59 return TimingSimpleCPU, 'timing' 60 elif cpu_type == "detailed": 61 return DerivO3CPU, 'timing' 62 elif cpu_type == "arm_detailed": 63 return O3_ARM_v7a_3, 'timing' 64 elif cpu_type == "inorder": 65 return InOrderCPU, 'timing' 66 else: 67 return AtomicSimpleCPU, 'atomic' 68 | |
69def setCPUClass(options): 70 """Returns two cpu classes and the initial mode of operation. 71 72 Restoring from a checkpoint or fast forwarding through a benchmark 73 can be done using one type of cpu, and then the actual 74 simulation can be carried out using another type. This function 75 returns these two types of cpus and the initial mode of operation 76 depending on the options provided. --- 432 unchanged lines hidden --- | 60def setCPUClass(options): 61 """Returns two cpu classes and the initial mode of operation. 62 63 Restoring from a checkpoint or fast forwarding through a benchmark 64 can be done using one type of cpu, and then the actual 65 simulation can be carried out using another type. This function 66 returns these two types of cpus and the initial mode of operation 67 depending on the options provided. --- 432 unchanged lines hidden --- |