Deleted Added
sdiff udiff text old ( 3183:bd8f3870620f ) new ( 3223:a2b6fa575c05 )
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

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

50 dest="benchmark",
51 help="Specify the benchmark to run. Available benchmarks: %s"\
52 % DefinedBenchmarks)
53parser.add_option("--etherdump", action="store", type="string", dest="etherdump",
54 help="Specify the filename to dump a pcap capture of the" \
55 "ethernet traffic")
56parser.add_option("--checkpoint_dir", action="store", type="string",
57 help="Place all checkpoints in this absolute directory")
58
59(options, args) = parser.parse_args()
60
61if args:
62 print "Error: script doesn't take any positional arguments"
63 sys.exit(1)
64
65if options.detailed:
66 cpu = DerivO3CPU()
67 cpu2 = DerivO3CPU()
68 mem_mode = 'timing'
69elif options.timing:
70 cpu = TimingSimpleCPU()
71 cpu2 = TimingSimpleCPU()
72 mem_mode = 'timing'
73else:
74 cpu = AtomicSimpleCPU()
75 cpu2 = AtomicSimpleCPU()
76 mem_mode = 'atomic'
77
78cpu.clock = '2GHz'
79cpu2.clock = '2GHz'
80
81if options.benchmark:
82 if options.benchmark not in Benchmarks:
83 print "Error benchmark %s has not been defined." % options.benchmark
84 print "Valid benchmarks are: %s" % DefinedBenchmarks
85 sys.exit(1)
86
87 bm = Benchmarks[options.benchmark]

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

108 cpu.connectMemPorts(root.system.membus)
109 cpu.mem = root.system.physmem
110else:
111 print "Error I don't know how to create more than 2 systems."
112 sys.exit(1)
113
114m5.instantiate(root)
115
116if options.maxtick:
117 maxtick = options.maxtick
118elif options.maxtime:
119 simtime = int(options.maxtime * root.clock.value)
120 print "simulating for: ", simtime
121 maxtick = simtime
122else:
123 maxtick = -1

--- 15 unchanged lines hidden ---