Options.py revision 3395
19537Satgutier@umich.edu# Copyright (c) 2006 The Regents of The University of Michigan 29537Satgutier@umich.edu# All rights reserved. 39537Satgutier@umich.edu# 49537Satgutier@umich.edu# Redistribution and use in source and binary forms, with or without 59537Satgutier@umich.edu# modification, are permitted provided that the following conditions are 69537Satgutier@umich.edu# met: redistributions of source code must retain the above copyright 79537Satgutier@umich.edu# notice, this list of conditions and the following disclaimer; 89537Satgutier@umich.edu# redistributions in binary form must reproduce the above copyright 99537Satgutier@umich.edu# notice, this list of conditions and the following disclaimer in the 109537Satgutier@umich.edu# documentation and/or other materials provided with the distribution; 119537Satgutier@umich.edu# neither the name of the copyright holders nor the names of its 129537Satgutier@umich.edu# contributors may be used to endorse or promote products derived from 139537Satgutier@umich.edu# this software without specific prior written permission. 149537Satgutier@umich.edu# 159537Satgutier@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 169537Satgutier@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 179537Satgutier@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 189537Satgutier@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 199537Satgutier@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 209537Satgutier@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 219537Satgutier@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 229537Satgutier@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 239537Satgutier@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 249537Satgutier@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 259537Satgutier@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 269537Satgutier@umich.edu# 279537Satgutier@umich.edu# Authors: Lisa Hsu 289537Satgutier@umich.edu 299537Satgutier@umich.edu# system options 309537Satgutier@umich.eduparser.add_option("-d", "--detailed", action="store_true") 319537Satgutier@umich.eduparser.add_option("-t", "--timing", action="store_true") 329537Satgutier@umich.eduparser.add_option("-n", "--num_cpus", type="int", default=1) 339537Satgutier@umich.eduparser.add_option("--caches", action="store_true") 349537Satgutier@umich.edu 359537Satgutier@umich.edu# Run duration options 369537Satgutier@umich.eduparser.add_option("-m", "--maxtick", type="int") 379537Satgutier@umich.eduparser.add_option("--maxtime", type="float") 389537Satgutier@umich.edu 399537Satgutier@umich.edu# Checkpointing options 409537Satgutier@umich.edu###Note that performing checkpointing via python script files will override 419537Satgutier@umich.edu###checkpoint instructions built into binaries. 429537Satgutier@umich.eduparser.add_option("--take_checkpoints", action="store", type="string", 439537Satgutier@umich.edu help="<M,N> will take checkpoint at cycle M and every N cycles \ 449537Satgutier@umich.edu thereafter") 459537Satgutier@umich.eduparser.add_option("--max_checkpoints", action="store", type="int", 469537Satgutier@umich.edu help="the maximum number of checkpoints to drop", 479537Satgutier@umich.edu default=5) 489537Satgutier@umich.eduparser.add_option("--checkpoint_dir", action="store", type="string", 499537Satgutier@umich.edu help="Place all checkpoints in this absolute directory") 509537Satgutier@umich.eduparser.add_option("-r", "--checkpoint_restore", action="store", type="int", 519537Satgutier@umich.edu help="restore from checkpoint <N>") 529537Satgutier@umich.edu 539537Satgutier@umich.edu# CPU Switching - default switch model goes from a checkpoint 549537Satgutier@umich.edu# to a timing simple CPU with caches to warm up, then to detailed CPU for 559537Satgutier@umich.edu# data measurement 569537Satgutier@umich.eduparser.add_option("-s", "--standard_switch", action="store_true", 579537Satgutier@umich.edu help="switch from one cpu mode to another") 589537Satgutier@umich.edu