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 --- 35 unchanged lines hidden (view full) --- 44parser.add_option("-t", "--timing", action="store_true") 45parser.add_option("-m", "--maxtick", type="int") 46parser.add_option("--maxtime", type="float") 47parser.add_option("--dual", action="store_true", 48 help="Simulate two systems attached with an ethernet link") 49parser.add_option("-b", "--benchmark", action="store", type="string", 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: --- 54 unchanged lines hidden (view full) --- 120 print "simulating for: ", simtime 121 maxtick = simtime 122else: 123 maxtick = -1 124 125exit_event = m5.simulate(maxtick) 126 127while exit_event.getCause() == "checkpoint": |
128 if options.checkpoint_dir: 129 m5.checkpoint(root, "/".join([options.checkpoint_dir, "cpt.%d"])) 130 else: 131 m5.checkpoint(root, "cpt.%d") 132 |
133 if maxtick == -1: 134 exit_event = m5.simulate(maxtick) 135 else: 136 exit_event = m5.simulate(maxtick - m5.curTick()) 137 138print 'Exiting @ cycle', m5.curTick(), 'because', exit_event.getCause() |