fs.py (3133:ad45cbafebdd) | fs.py (3143:76c70c8bc5c8) |
---|---|
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"\ | 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) | 52 % DefinedBenchmarks) |
53parser.add_option("--etherdump", action="store", type="string", dest="etherdump", | 53parser.add_option("--etherdump", action="store", type="string", dest="etherdump", |
54 help="Specify the filename to dump a pcap capture of the ethernet" 55 "traffic") | 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") |
56 57(options, args) = parser.parse_args() 58 59if args: 60 print "Error: script doesn't take any positional arguments" 61 sys.exit(1) 62 63if options.detailed: --- 54 unchanged lines hidden (view full) --- 118 print "simulating for: ", simtime 119 maxtick = simtime 120else: 121 maxtick = -1 122 123exit_event = m5.simulate(maxtick) 124 125while exit_event.getCause() == "checkpoint": | 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": |
126 m5.checkpoint(root, "cpt.%d") | 128 if options.checkpoint_dir: 129 m5.checkpoint(root, "/".join([options.checkpoint_dir, "cpt.%d"])) 130 else: 131 m5.checkpoint(root, "cpt.%d") 132 |
127 if maxtick == -1: 128 exit_event = m5.simulate(maxtick) 129 else: 130 exit_event = m5.simulate(maxtick - m5.curTick()) 131 132print 'Exiting @ cycle', m5.curTick(), 'because', exit_event.getCause() | 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() |