import m5
from m5.objects import *
from Caches import *
+from O3_ARM_v7a import *
def config_cache(options, system):
if options.l2cache:
- system.l2 = L2Cache(size = options.l2_size, assoc = options.l2_assoc,
- block_size=options.cacheline_size)
+ if options.cpu_type == "arm_detailed":
+ system.l2 = O3_ARM_v7aL2(size = options.l2_size, assoc = options.l2_assoc,
+ block_size=options.cacheline_size)
+ else:
+ system.l2 = L2Cache(size = options.l2_size, assoc = options.l2_assoc,
+ block_size=options.cacheline_size)
+
system.tol2bus = Bus()
system.l2.cpu_side = system.tol2bus.port
system.l2.mem_side = system.membus.port
for i in xrange(options.num_cpus):
if options.caches:
- icache = L1Cache(size = options.l1i_size, assoc = options.l1i_assoc,
- block_size=options.cacheline_size)
- dcache = L1Cache(size = options.l1d_size, assoc = options.l1d_assoc,
- block_size=options.cacheline_size)
+ if options.cpu_type == "arm_detailed":
+ icache = O3_ARM_v7a_ICache(size = options.l1i_size,
+ assoc = options.l1i_assoc,
+ block_size=options.cacheline_size)
+ dcache = O3_ARM_v7a_DCache(size = options.l1d_size,
+ assoc = options.l1d_assoc,
+ block_size=options.cacheline_size)
+ else:
+ icache = L1Cache(size = options.l1i_size,
+ assoc = options.l1i_assoc,
+ block_size=options.cacheline_size)
+ dcache = L1Cache(size = options.l1d_size,
+ assoc = options.l1d_assoc,
+ block_size=options.cacheline_size)
+
if buildEnv['TARGET_ISA'] == 'x86':
system.cpu[i].addPrivateSplitL1Caches(icache, dcache,
PageTableWalkerCache(),
# system options
parser.add_option("--cpu-type", type="choice", default="atomic",
- choices = ["atomic", "timing", "detailed", "inorder"],
+ choices = ["atomic", "timing", "detailed", "inorder",
+ "arm_detailed"],
help = "type of cpu to run with")
parser.add_option("-n", "--num-cpus", type="int", default=1)
parser.add_option("--caches", action="store_true")
from m5.defines import buildEnv
from m5.objects import *
from m5.util import *
+from O3_ARM_v7a import *
addToPath('../common')
atomic = False
if options.cpu_type == "timing":
class TmpClass(TimingSimpleCPU): pass
- elif options.cpu_type == "detailed":
+ elif options.cpu_type == "detailed" or options.cpu_type == "arm_detailed":
if not options.caches and not options.ruby:
print "O3 CPU must be used with caches"
sys.exit(1)
- class TmpClass(DerivO3CPU): pass
+ if options.cpu_type == "arm_detailed":
+ class TmpClass(O3_ARM_v7a_3): pass
+ else:
+ class TmpClass(DerivO3CPU): pass
elif options.cpu_type == "inorder":
if not options.caches:
print "InOrder CPU must be used with caches"