Clean up config scripts to not have to worry about attaching a cache only to the TimingCPU. Now the Atomic CPU works with caches.
configs/common/Simulation.py: Atomic CPU now works properly with caches, so we don't have to do extra parsing to hook up caches only to the timing CPU. However the O3CPU must always use caches, so a check for that must still exist. Also change the switch_cpus to be placed at the system level, now that Steve changed how the IntrController gets its CPU. configs/example/fs.py: configs/example/se.py: Atomic CPU now handles caches. --HG-- extra : convert_revision : 534ded558ef96cafd76b4b5c5317bd8f4d05076e
This commit is contained in:
parent
21f43bfc4b
commit
0ba2cc6571
3 changed files with 6 additions and 14 deletions
|
@ -84,10 +84,6 @@ def run(options, root, testsys, cpu_class):
|
||||||
if not m5.build_env['FULL_SYSTEM']:
|
if not m5.build_env['FULL_SYSTEM']:
|
||||||
switch_cpus[i].workload = testsys.cpu[i].workload
|
switch_cpus[i].workload = testsys.cpu[i].workload
|
||||||
switch_cpus[i].clock = testsys.cpu[0].clock
|
switch_cpus[i].clock = testsys.cpu[0].clock
|
||||||
if options.caches:
|
|
||||||
switch_cpus[i].addPrivateSplitL1Caches(L1Cache(size = '32kB'),
|
|
||||||
L1Cache(size = '64kB'))
|
|
||||||
switch_cpus[i].connectMemPorts(testsys.membus)
|
|
||||||
|
|
||||||
root.switch_cpus = switch_cpus
|
root.switch_cpus = switch_cpus
|
||||||
switch_cpu_list = [(testsys.cpu[i], switch_cpus[i]) for i in xrange(np)]
|
switch_cpu_list = [(testsys.cpu[i], switch_cpus[i]) for i in xrange(np)]
|
||||||
|
@ -107,19 +103,15 @@ def run(options, root, testsys, cpu_class):
|
||||||
switch_cpus[i].clock = testsys.cpu[0].clock
|
switch_cpus[i].clock = testsys.cpu[0].clock
|
||||||
switch_cpus_1[i].clock = testsys.cpu[0].clock
|
switch_cpus_1[i].clock = testsys.cpu[0].clock
|
||||||
|
|
||||||
if options.caches:
|
if not options.caches:
|
||||||
switch_cpus[i].addPrivateSplitL1Caches(L1Cache(size = '32kB'),
|
|
||||||
L1Cache(size = '64kB'))
|
|
||||||
switch_cpus[i].connectMemPorts(testsys.membus)
|
|
||||||
else:
|
|
||||||
# O3 CPU must have a cache to work.
|
# O3 CPU must have a cache to work.
|
||||||
switch_cpus_1[i].addPrivateSplitL1Caches(L1Cache(size = '32kB'),
|
switch_cpus_1[i].addPrivateSplitL1Caches(L1Cache(size = '32kB'),
|
||||||
L1Cache(size = '64kB'))
|
L1Cache(size = '64kB'))
|
||||||
switch_cpus_1[i].connectMemPorts(testsys.membus)
|
switch_cpus_1[i].connectMemPorts(testsys.membus)
|
||||||
|
|
||||||
|
|
||||||
root.switch_cpus = switch_cpus
|
testsys.switch_cpus = switch_cpus
|
||||||
root.switch_cpus_1 = switch_cpus_1
|
testsys.switch_cpus_1 = switch_cpus_1
|
||||||
switch_cpu_list = [(testsys.cpu[i], switch_cpus[i]) for i in xrange(np)]
|
switch_cpu_list = [(testsys.cpu[i], switch_cpus[i]) for i in xrange(np)]
|
||||||
switch_cpu_list1 = [(switch_cpus[i], switch_cpus_1[i]) for i in xrange(np)]
|
switch_cpu_list1 = [(switch_cpus[i], switch_cpus_1[i]) for i in xrange(np)]
|
||||||
|
|
||||||
|
@ -222,5 +214,5 @@ def run(options, root, testsys, cpu_class):
|
||||||
|
|
||||||
if exit_cause == '':
|
if exit_cause == '':
|
||||||
exit_cause = exit_event.getCause()
|
exit_cause = exit_event.getCause()
|
||||||
print 'Exiting @ cycle', m5.curTick(), 'because ', exit_cause
|
print 'Exiting @ cycle %i because %s' % (m5.curTick(), exit_cause)
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ test_sys = makeLinuxAlphaSystem(test_mem_mode, bm[0])
|
||||||
np = options.num_cpus
|
np = options.num_cpus
|
||||||
test_sys.cpu = [TestCPUClass(cpu_id=i) for i in xrange(np)]
|
test_sys.cpu = [TestCPUClass(cpu_id=i) for i in xrange(np)]
|
||||||
for i in xrange(np):
|
for i in xrange(np):
|
||||||
if options.caches and not options.standard_switch and not FutureClass:
|
if options.caches:
|
||||||
test_sys.cpu[i].addPrivateSplitL1Caches(L1Cache(size = '32kB'),
|
test_sys.cpu[i].addPrivateSplitL1Caches(L1Cache(size = '32kB'),
|
||||||
L1Cache(size = '64kB'))
|
L1Cache(size = '64kB'))
|
||||||
test_sys.cpu[i].connectMemPorts(test_sys.membus)
|
test_sys.cpu[i].connectMemPorts(test_sys.membus)
|
||||||
|
|
|
@ -101,7 +101,7 @@ system = System(cpu = [CPUClass(cpu_id=i) for i in xrange(np)],
|
||||||
system.physmem.port = system.membus.port
|
system.physmem.port = system.membus.port
|
||||||
|
|
||||||
for i in xrange(np):
|
for i in xrange(np):
|
||||||
if options.caches and not options.standard_switch and not FutureClass:
|
if options.caches:
|
||||||
system.cpu[i].addPrivateSplitL1Caches(L1Cache(size = '32kB'),
|
system.cpu[i].addPrivateSplitL1Caches(L1Cache(size = '32kB'),
|
||||||
L1Cache(size = '64kB'))
|
L1Cache(size = '64kB'))
|
||||||
system.cpu[i].connectMemPorts(system.membus)
|
system.cpu[i].connectMemPorts(system.membus)
|
||||||
|
|
Loading…
Reference in a new issue