diff options
Diffstat (limited to 'configs/test/test.py')
-rw-r--r-- | configs/test/test.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/configs/test/test.py b/configs/test/test.py index 251755e71..a570c1a08 100644 --- a/configs/test/test.py +++ b/configs/test/test.py @@ -13,9 +13,11 @@ parser = optparse.OptionParser(option_list=m5.standardOptions) parser.add_option("-c", "--cmd", default="hello") parser.add_option("-t", "--timing", action="store_true") -parser.add_option("-f", "--full", action="store_true") +parser.add_option("-d", "--detailed", action="store_true") +parser.add_option("-m", "--maxtick", type="int") (options, args) = parser.parse_args() +m5.setStandardOptions(options) if args: print "Error: script doesn't take any positional arguments" @@ -33,8 +35,8 @@ mem = PhysicalMemory() if options.timing: cpu = TimingSimpleCPU() -elif options.full: - cpu = DetailedCPU() +elif options.detailed: + cpu = DetailedO3CPU() else: cpu = AtomicSimpleCPU() cpu.workload = process @@ -48,7 +50,10 @@ root = Root(system = system) m5.instantiate(root) # simulate until program terminates -exit_event = m5.simulate() +if options.maxtick: + exit_event = m5.simulate(options.maxtick) +else: + exit_event = m5.simulate() print 'Exiting @ cycle', m5.curTick(), 'because', exit_event.getCause() |