SE/FS: Make SE vs. FS mode a runtime parameter.

This commit is contained in:
Gabe Black 2012-01-28 07:24:34 -08:00
parent eab5c60286
commit ec20ee2f7c
47 changed files with 55 additions and 49 deletions

View file

@ -552,8 +552,8 @@ def makeLinuxX86System(mem_mode, numCPUs = 1, mdesc = None, Ruby = False):
return self
def makeDualRoot(testSystem, driveSystem, dumpfile):
self = Root()
def makeDualRoot(full_system, testSystem, driveSystem, dumpfile):
self = Root(full_system = full_system)
self.testsys = testSystem
self.drivesys = driveSystem
self.etherlink = EtherLink()

View file

@ -198,9 +198,9 @@ if len(bm) == 2:
drive_sys.kernel = binary(options.kernel)
drive_sys.init_param = options.init_param
root = makeDualRoot(test_sys, drive_sys, options.etherdump)
root = makeDualRoot(True, test_sys, drive_sys, options.etherdump)
elif len(bm) == 1:
root = Root(system=test_sys)
root = Root(full_system=True, system=test_sys)
else:
print "Error I don't know how to create more than 2 systems."
sys.exit(1)

View file

@ -172,7 +172,7 @@ make_level(treespec, prototypes, system.physmem, "port")
# run simulation
# -----------------------
root = Root( system = system )
root = Root( full_system = False, system = system )
if options.atomic:
root.system.mem_mode = 'atomic'
else:

View file

@ -111,7 +111,7 @@ for ruby_port in system.ruby._cpu_ruby_ports:
# run simulation
# -----------------------
root = Root( system = system )
root = Root( full_system = False, system = system )
root.system.mem_mode = 'timing'
# Not much point in this being higher than the L1 latency

View file

@ -141,6 +141,6 @@ for (i, cpu) in enumerate(system.cpu):
cpu.interrupts.pio = system.piobus.port
cpu.interrupts.int_port = system.piobus.port
root = Root(system = system)
root = Root(full_system = True, system = system)
Simulation.run(options, root, system, FutureClass)

View file

@ -162,7 +162,7 @@ for (i, dma) in enumerate(dmas):
# run simulation
# -----------------------
root = Root( system = system )
root = Root( full_system = False, system = system )
root.system.mem_mode = 'timing'
# Not much point in this being higher than the L1 latency

View file

@ -121,7 +121,7 @@ for ruby_port in system.ruby._cpu_ruby_ports:
# run simulation
# -----------------------
root = Root( system = system )
root = Root( full_system = False, system = system )
root.system.mem_mode = 'timing'
# Not much point in this being higher than the L1 latency

View file

@ -131,7 +131,7 @@ for ruby_port in system.ruby._cpu_ruby_ports:
# run simulation
# -----------------------
root = Root( system = system )
root = Root( full_system = False, system = system )
root.system.mem_mode = 'timing'
# Not much point in this being higher than the L1 latency

View file

@ -200,6 +200,6 @@ for i in xrange(np):
if options.fastmem:
system.cpu[0].physmem_port = system.physmem.port
root = Root(system = system)
root = Root(full_system = False, system = system)
Simulation.run(options, root, system, FutureClass)

View file

@ -239,7 +239,7 @@ for cluster in clusters:
# Define the root
# ----------------------
root = Root(system = system)
root = Root(full_system = False, system = system)
# --------------------
# Pick the correct Splash2 Benchmarks

View file

@ -225,7 +225,7 @@ for cpu in cpus:
# Define the root
# ----------------------
root = Root(system = system)
root = Root(full_system = False, system = system)
# --------------------
# Pick the correct Splash2 Benchmarks

View file

@ -28,6 +28,7 @@
# Authors: Nathan Binkert
from m5.SimObject import SimObject
from m5.defines import buildEnv
from m5.params import *
from m5.util import fatal
@ -58,6 +59,8 @@ class Root(SimObject):
type = 'Root'
full_system = Param.Bool("if this is a full system simulation")
# Time syncing prevents the simulation from running faster than real time.
time_sync_enable = Param.Bool(False, "whether time syncing is enabled")
time_sync_period = Param.Clock("100ms", "how often to sync with real time")

View file

@ -31,8 +31,6 @@
#ifndef __SIM_FULL_SYSTEM_HH__
#define __SIM_FULL_SYSTEM_HH__
#include "config/full_system.hh"
static const bool FullSystem = FULL_SYSTEM;
extern bool FullSystem;
#endif // __SIM_FULL_SYSTEM_HH__

View file

@ -33,6 +33,7 @@
#include "base/misc.hh"
#include "debug/TimeSync.hh"
#include "sim/full_system.hh"
#include "sim/root.hh"
Root *Root::_root = NULL;
@ -123,6 +124,8 @@ Root::loadState(Checkpoint *cp)
timeSyncEnable(params()->time_sync_enable);
}
bool FullSystem;
Root *
RootParams::create()
{
@ -132,5 +135,7 @@ RootParams::create()
created = true;
FullSystem = full_system;
return new Root(this);
}

View file

@ -54,4 +54,4 @@ system.system_port = system.membus.port
system.physmem.port = system.membus.port
cpu.connectAllPorts(system.membus)
root = Root(system = system)
root = Root(full_system = False, system = system)

View file

@ -117,7 +117,7 @@ system.system_port = system.ruby._sys_port_proxy.port
# run simulation
# -----------------------
root = Root(system = system)
root = Root(full_system = False, system = system)
root.system.mem_mode = 'timing'
# Not much point in this being higher than the L1 latency

View file

@ -86,7 +86,7 @@ system.physmem.port = system.membus.port
# run simulation
# -----------------------
root = Root( system = system )
root = Root( full_system = False, system = system )
root.system.mem_mode = 'timing'
#root.trace.flags="Cache CachePort MemoryAccess"
#root.trace.cycle=1

View file

@ -51,5 +51,5 @@ system.physmem.port = system.membus.port
# run simulation
# -----------------------
root = Root(system = system)
root = Root(full_system = False, system = system)
root.system.mem_mode = 'timing'

View file

@ -86,7 +86,7 @@ system.system_port = system.membus.port
# run simulation
# -----------------------
root = Root( system = system )
root = Root( full_system = False, system = system )
root.system.mem_mode = 'timing'
#root.trace.flags="Bus Cache"
#root.trace.flags = "BusAddrRanges"

View file

@ -43,4 +43,4 @@ system = System(cpu = cpu,
system.physmem.port = system.membus.port
cpu.connectAllPorts(system.membus)
root = Root(system = system)
root = Root(full_system = False, system = system)

View file

@ -54,4 +54,4 @@ system.system_port = system.membus.port
system.physmem.port = system.membus.port
cpu.connectAllPorts(system.membus)
root = Root(system = system)
root = Root(full_system = False, system = system)

View file

@ -108,6 +108,6 @@ cpu.addPrivateSplitL1Caches(L1(size = '32kB', assoc = 1),
cpu.connectAllPorts(system.toL2Bus, system.membus)
cpu.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -110,6 +110,6 @@ cpu.addPrivateSplitL1Caches(L1(size = '32kB', assoc = 1),
cpu.connectAllPorts(system.toL2Bus, system.membus)
cpu.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -110,6 +110,6 @@ cpu.addPrivateSplitL1Caches(L1(size = '32kB', assoc = 1),
cpu.connectAllPorts(system.toL2Bus, system.membus)
cpu.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -94,6 +94,6 @@ for c in cpus:
c.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -92,6 +92,6 @@ cpu.addPrivateSplitL1Caches(L1(size = '32kB', assoc = 1),
cpu.connectAllPorts(system.toL2Bus, system.membus)
cpu.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -94,6 +94,6 @@ for c in cpus:
c.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -90,6 +90,6 @@ cpu.addPrivateSplitL1Caches(L1(size = '32kB', assoc = 1),
cpu.connectAllPorts(system.toL2Bus, system.membus)
cpu.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -94,6 +94,6 @@ for c in cpus:
c.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -92,6 +92,6 @@ cpu.addPrivateSplitL1Caches(L1(size = '32kB', assoc = 1),
cpu.connectAllPorts(system.toL2Bus, system.membus)
cpu.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -112,7 +112,7 @@ system.system_port = system.ruby._sys_port_proxy.port
# run simulation
# -----------------------
root = Root( system = system )
root = Root(full_system = False, system = system )
root.system.mem_mode = 'timing'
# Not much point in this being higher than the L1 latency

View file

@ -52,5 +52,5 @@ system.physmem.port = system.membus.port
# run simulation
# -----------------------
root = Root(system = system)
root = Root(full_system = False, system = system)
root.system.mem_mode = 'atomic'

View file

@ -85,5 +85,5 @@ system.system_port = system.membus.port
# run simulation
# -----------------------
root = Root( system = system )
root = Root( full_system = False, system = system )
root.system.mem_mode = 'atomic'

View file

@ -37,4 +37,4 @@ system.physmem.port = system.membus.port
system.cpu.connectAllPorts(system.membus)
system.cpu.clock = '2GHz'
root = Root(system = system)
root = Root(full_system = False, system = system)

View file

@ -95,7 +95,7 @@ system.system_port = system.ruby._sys_port_proxy.port
# run simulation
# -----------------------
root = Root( system = system )
root = Root( full_system=False, system = system )
root.system.mem_mode = 'timing'
# Not much point in this being higher than the L1 latency

View file

@ -85,5 +85,5 @@ system.physmem.port = system.membus.port
# run simulation
# -----------------------
root = Root( system = system )
root = Root( full_system = False, system = system )
root.system.mem_mode = 'timing'

View file

@ -91,7 +91,7 @@ system.system_port = system.ruby._sys_port_proxy.port
# run simulation
# -----------------------
root = Root(system = system)
root = Root(full_system = False, system = system)
root.system.mem_mode = 'timing'
# Not much point in this being higher than the L1 latency

View file

@ -51,4 +51,4 @@ system.physmem.port = system.membus.port
cpu.connectAllPorts(system.membus)
cpu.clock = '2GHz'
root = Root(system = system)
root = Root(full_system=False, system = system)

View file

@ -36,6 +36,6 @@ system = FSConfig.makeSparcSystem('atomic')
system.cpu = cpu
cpu.connectAllPorts(system.membus)
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('2GHz')

View file

@ -96,6 +96,6 @@ cpu.addPrivateSplitL1Caches(L1(size = '32kB', assoc = 1),
cpu.connectAllPorts(system.toL2Bus, system.membus)
cpu.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -95,6 +95,6 @@ for c in cpus:
c.connectAllPorts(system.toL2Bus, system.membus)
c.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -93,6 +93,6 @@ cpu.addPrivateSplitL1Caches(L1(size = '32kB', assoc = 1),
cpu.connectAllPorts(system.toL2Bus, system.membus)
cpu.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -93,5 +93,5 @@ for c in cpus:
c.connectAllPorts(system.toL2Bus, system.membus)
c.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -91,6 +91,6 @@ cpu.addPrivateSplitL1Caches(L1(size = '32kB', assoc = 1),
cpu.connectAllPorts(system.toL2Bus, system.membus)
cpu.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -93,7 +93,7 @@ for c in cpus:
c.connectAllPorts(system.toL2Bus, system.membus)
c.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -93,6 +93,6 @@ cpu.addPrivateSplitL1Caches(L1(size = '32kB', assoc = 1),
cpu.connectAllPorts(system.toL2Bus, system.membus)
cpu.clock = '2GHz'
root = Root(system=system)
root = Root(full_system=True, system=system)
m5.ticks.setGlobalFrequency('1THz')

View file

@ -53,6 +53,6 @@ drive_sys.iobridge = Bridge(delay='50ns', nack_delay='4ns',
drive_sys.iobridge.slave = drive_sys.iobus.port
drive_sys.iobridge.master = drive_sys.membus.port
root = makeDualRoot(test_sys, drive_sys, "ethertrace")
root = makeDualRoot(True, test_sys, drive_sys, "ethertrace")
maxtick = 199999999