import FSConfig
from Caches import *
from base_config import *
+from O3_ARM_v7a import *
+from Benchmarks import SysConfig
+
+class ArmSESystemUniprocessor(BaseSESystemUniprocessor):
+ """Syscall-emulation builder for ARM uniprocessor systems.
+
+ A small tweak of the syscall-emulation builder to use more
+ representative cache configurations.
+ """
+
+ def __init__(self, **kwargs):
+ BaseSESystem.__init__(self, **kwargs)
+
+ def create_caches_private(self, cpu):
+ # The atomic SE configurations do not use caches
+ if self.mem_mode == "timing":
+ # Use the more representative cache configuration
+ cpu.addTwoLevelCacheHierarchy(O3_ARM_v7a_ICache(),
+ O3_ARM_v7a_DCache(),
+ O3_ARM_v7aL2())
class LinuxArmSystemBuilder(object):
"""Mix-in that implements create_system.
ARM-specific create_system method to a class deriving from one of
the generic base systems.
"""
- def __init__(self, machine_type):
+ def __init__(self, machine_type, **kwargs):
"""
Arguments:
machine_type -- String describing the platform to simulate
+ num_cpus -- integer number of CPUs in the system
"""
self.machine_type = machine_type
+ self.num_cpus = kwargs.get('num_cpus', 1)
+ self.mem_size = kwargs.get('mem_size', '256MB')
def create_system(self):
+ sc = SysConfig(None, self.mem_size, None)
system = FSConfig.makeArmSystem(self.mem_mode,
- self.machine_type,
- SimpleDDR3,
- None, False)
+ self.machine_type, self.num_cpus,
+ sc, False)
# We typically want the simulator to panic if the kernel
# panics or oopses. This prevents the simulator from running
BaseFSSystem):
"""Basic ARM full system builder."""
- def __init__(self, machine_type='RealView_PBX', **kwargs):
+ def __init__(self, machine_type='VExpress_EMM', **kwargs):
"""Initialize an ARM system that supports full system simulation.
Note: Keyword arguments that are not listed below will be
machine_type -- String describing the platform to simulate
"""
BaseSystem.__init__(self, **kwargs)
- LinuxArmSystemBuilder.__init__(self, machine_type)
+ LinuxArmSystemBuilder.__init__(self, machine_type, **kwargs)
+
+ def create_caches_private(self, cpu):
+ # Use the more representative cache configuration
+ cpu.addTwoLevelCacheHierarchy(O3_ARM_v7a_ICache(),
+ O3_ARM_v7a_DCache(),
+ O3_ARM_v7aL2())
class LinuxArmFSSystemUniprocessor(LinuxArmSystemBuilder,
BaseFSSystemUniprocessor):
test cases.
"""
- def __init__(self, machine_type='RealView_PBX', **kwargs):
+ def __init__(self, machine_type='VExpress_EMM', **kwargs):
BaseFSSystemUniprocessor.__init__(self, **kwargs)
- LinuxArmSystemBuilder.__init__(self, machine_type)
-
+ LinuxArmSystemBuilder.__init__(self, machine_type, **kwargs)
class LinuxArmFSSwitcheroo(LinuxArmSystemBuilder, BaseFSSwitcheroo):
"""Uniprocessor ARM system prepared for CPU switching"""
- def __init__(self, machine_type='RealView_PBX', **kwargs):
+ def __init__(self, machine_type='VExpress_EMM', **kwargs):
BaseFSSwitcheroo.__init__(self, **kwargs)
- LinuxArmSystemBuilder.__init__(self, machine_type)
+ LinuxArmSystemBuilder.__init__(self, machine_type, **kwargs)