Options.py revision 4455
14455Ssaidi@eecs.umich.edu# Copyright (c) 2006-2007 The Regents of The University of Michigan 23395Shsul@eecs.umich.edu# All rights reserved. 33395Shsul@eecs.umich.edu# 43395Shsul@eecs.umich.edu# Redistribution and use in source and binary forms, with or without 53395Shsul@eecs.umich.edu# modification, are permitted provided that the following conditions are 63395Shsul@eecs.umich.edu# met: redistributions of source code must retain the above copyright 73395Shsul@eecs.umich.edu# notice, this list of conditions and the following disclaimer; 83395Shsul@eecs.umich.edu# redistributions in binary form must reproduce the above copyright 93395Shsul@eecs.umich.edu# notice, this list of conditions and the following disclaimer in the 103395Shsul@eecs.umich.edu# documentation and/or other materials provided with the distribution; 113395Shsul@eecs.umich.edu# neither the name of the copyright holders nor the names of its 123395Shsul@eecs.umich.edu# contributors may be used to endorse or promote products derived from 133395Shsul@eecs.umich.edu# this software without specific prior written permission. 143395Shsul@eecs.umich.edu# 153395Shsul@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 163395Shsul@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 173395Shsul@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 183395Shsul@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 193395Shsul@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 203395Shsul@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 213395Shsul@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 223395Shsul@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 233395Shsul@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 243395Shsul@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 253395Shsul@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 263395Shsul@eecs.umich.edu# 273395Shsul@eecs.umich.edu# Authors: Lisa Hsu 283395Shsul@eecs.umich.edu 293395Shsul@eecs.umich.edu# system options 303395Shsul@eecs.umich.eduparser.add_option("-d", "--detailed", action="store_true") 313395Shsul@eecs.umich.eduparser.add_option("-t", "--timing", action="store_true") 323395Shsul@eecs.umich.eduparser.add_option("-n", "--num_cpus", type="int", default=1) 333395Shsul@eecs.umich.eduparser.add_option("--caches", action="store_true") 344455Ssaidi@eecs.umich.eduparser.add_option("--l2cache", action="store_true") 353395Shsul@eecs.umich.edu 363395Shsul@eecs.umich.edu# Run duration options 373395Shsul@eecs.umich.eduparser.add_option("-m", "--maxtick", type="int") 383395Shsul@eecs.umich.eduparser.add_option("--maxtime", type="float") 393395Shsul@eecs.umich.edu 403395Shsul@eecs.umich.edu# Checkpointing options 413395Shsul@eecs.umich.edu###Note that performing checkpointing via python script files will override 423395Shsul@eecs.umich.edu###checkpoint instructions built into binaries. 433395Shsul@eecs.umich.eduparser.add_option("--take_checkpoints", action="store", type="string", 443395Shsul@eecs.umich.edu help="<M,N> will take checkpoint at cycle M and every N cycles \ 453395Shsul@eecs.umich.edu thereafter") 463395Shsul@eecs.umich.eduparser.add_option("--max_checkpoints", action="store", type="int", 473395Shsul@eecs.umich.edu help="the maximum number of checkpoints to drop", 483395Shsul@eecs.umich.edu default=5) 493395Shsul@eecs.umich.eduparser.add_option("--checkpoint_dir", action="store", type="string", 503395Shsul@eecs.umich.edu help="Place all checkpoints in this absolute directory") 513395Shsul@eecs.umich.eduparser.add_option("-r", "--checkpoint_restore", action="store", type="int", 523395Shsul@eecs.umich.edu help="restore from checkpoint <N>") 533395Shsul@eecs.umich.edu 543395Shsul@eecs.umich.edu# CPU Switching - default switch model goes from a checkpoint 553395Shsul@eecs.umich.edu# to a timing simple CPU with caches to warm up, then to detailed CPU for 563395Shsul@eecs.umich.edu# data measurement 573445Shsul@eecs.umich.eduparser.add_option("-s", "--standard_switch", action="store_true", 583445Shsul@eecs.umich.edu help="switch from timing CPU to Detailed CPU") 593445Shsul@eecs.umich.eduparser.add_option("-w", "--warmup", action="store", type="int", 603445Shsul@eecs.umich.edu help="if -s, then this is the warmup period. else, this is ignored", 613445Shsul@eecs.umich.edu default=5000000000) 62