Deleted Added
sdiff udiff text old ( 3514:b166ee5dce91 ) new ( 3668:bacb0a392e78 )
full compact
1# Copyright (c) 2006 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 33 unchanged lines hidden (view full) ---

42
43# Get paths we might need. It's expected this file is in m5/configs/example.
44config_path = os.path.dirname(os.path.abspath(__file__))
45config_root = os.path.dirname(config_path)
46
47parser = optparse.OptionParser()
48
49# Benchmark options
50parser.add_option("--dual", action="store_true",
51 help="Simulate two systems attached with an ethernet link")
52parser.add_option("-b", "--benchmark", action="store", type="string",
53 dest="benchmark",
54 help="Specify the benchmark to run. Available benchmarks: %s"\
55 % DefinedBenchmarks)
56
57# Metafile options

--- 30 unchanged lines hidden (view full) ---

88else:
89 if options.dual:
90 bm = [SysConfig(), SysConfig()]
91 else:
92 bm = [SysConfig()]
93
94test_sys = makeLinuxAlphaSystem(test_mem_mode, bm[0])
95np = options.num_cpus
96test_sys.cpu = [TestCPUClass(cpu_id=i) for i in xrange(np)]
97for i in xrange(np):
98 if options.caches:
99 test_sys.cpu[i].addPrivateSplitL1Caches(L1Cache(size = '32kB'),
100 L1Cache(size = '64kB'))
101 test_sys.cpu[i].connectMemPorts(test_sys.membus)
102
103if len(bm) == 2:
104 drive_sys = makeLinuxAlphaSystem(drive_mem_mode, bm[1])
105 drive_sys.cpu = DriveCPUClass(cpu_id=0)
106 drive_sys.cpu.connectMemPorts(drive_sys.membus)
107 root = makeDualRoot(test_sys, drive_sys, options.etherdump)
108elif len(bm) == 1:
109 root = Root(clock = '1THz', system = test_sys)
110else:
111 print "Error I don't know how to create more than 2 systems."
112 sys.exit(1)
113
114Simulation.run(options, root, test_sys, FutureClass)