diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2006-10-17 11:08:49 -0700 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2006-10-17 11:08:49 -0700 |
commit | 96737c8a9bcfc6c9c145d57439aaed2ce1de5fc5 (patch) | |
tree | fa2bf0ae14ec332a3c9a2b8f88128a6a641c9162 /configs/example | |
parent | 9202422d6ebb7a17936bee1b9aaa427541156d13 (diff) | |
download | gem5-96737c8a9bcfc6c9c145d57439aaed2ce1de5fc5.tar.xz |
Rename 'Machine' to 'SysConfig'.
Clean up a little.
--HG--
extra : convert_revision : db5f36776209c76a593205c46b08aa147358f33a
Diffstat (limited to 'configs/example')
-rw-r--r-- | configs/example/fs.py | 61 |
1 files changed, 29 insertions, 32 deletions
diff --git a/configs/example/fs.py b/configs/example/fs.py index 460fb68fb..200b0b522 100644 --- a/configs/example/fs.py +++ b/configs/example/fs.py @@ -64,53 +64,50 @@ if args: print "Error: script doesn't take any positional arguments" sys.exit(1) +# client system CPU is always simple... note this is an assignment of +# a class, not an instance. +ClientCPUClass = AtomicSimpleCPU +client_mem_mode = 'atomic' + if options.detailed: - cpu = DerivO3CPU() - cpu2 = DerivO3CPU() - mem_mode = 'timing' + ServerCPUClass = DerivO3CPU + server_mem_mode = 'timing' elif options.timing: - cpu = TimingSimpleCPU() - cpu2 = TimingSimpleCPU() - mem_mode = 'timing' + ServerCPUClass = TimingSimpleCPU + server_mem_mode = 'timing' else: - cpu = AtomicSimpleCPU() - cpu2 = AtomicSimpleCPU() - mem_mode = 'atomic' + ServerCPUClass = AtomicSimpleCPU + server_mem_mode = 'atomic' -cpu.clock = '2GHz' -cpu2.clock = '2GHz' -cpu.cpu_id = 0 -cpu2.cpu_id = 0 +ServerCPUClass.clock = '2GHz' +ClientCPUClass.clock = '2GHz' if options.benchmark: - if options.benchmark not in Benchmarks: + try: + bm = Benchmarks[options.benchmark] + except KeyError: print "Error benchmark %s has not been defined." % options.benchmark print "Valid benchmarks are: %s" % DefinedBenchmarks sys.exit(1) - - bm = Benchmarks[options.benchmark] else: if options.dual: - bm = [Machine(), Machine()] + bm = [SysConfig(), SysConfig()] else: - bm = [Machine()] + bm = [SysConfig()] + +server_sys = makeLinuxAlphaSystem(server_mem_mode, bm[0]) +server_sys.cpu = ServerCPUClass(cpu_id=0) +server_sys.cpu.connectMemPorts(server_sys.membus) +server_sys.cpu.mem = server_sys.physmem if len(bm) == 2: - s1 = makeLinuxAlphaSystem(mem_mode, bm[0]) - s1.cpu = cpu - cpu.connectMemPorts(s1.membus) - cpu.mem = s1.physmem - s2 = makeLinuxAlphaSystem(mem_mode, bm[1]) - s2.cpu = cpu2 - cpu2.connectMemPorts(s2.membus) - cpu2.mem = s2.physmem - root = makeDualRoot(s1, s2, options.etherdump) + client_sys = makeLinuxAlphaSystem(client_mem_mode, bm[1]) + client_sys.cpu = ClientCPUClass(cpu_id=0) + client_sys.cpu.connectMemPorts(client_sys.membus) + client_sys.cpu.mem = client_sys.physmem + root = makeDualRoot(server_sys, client_sys, options.etherdump) elif len(bm) == 1: - root = Root(clock = '1THz', - system = makeLinuxAlphaSystem(mem_mode, bm[0])) - root.system.cpu = cpu - cpu.connectMemPorts(root.system.membus) - cpu.mem = root.system.physmem + root = Root(clock = '1THz', system = server_sys) else: print "Error I don't know how to create more than 2 systems." sys.exit(1) |