Options.py revision 6893
15353Svilas.sridharan@gmail.com# Copyright (c) 2006-2008 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") 325869Sksewell@umich.eduparser.add_option("--inorder", action="store_true") 335361Srstrong@cs.ucsd.eduparser.add_option("-n", "--num-cpus", type="int", default=1) 343395Shsul@eecs.umich.eduparser.add_option("--caches", action="store_true") 354455Ssaidi@eecs.umich.eduparser.add_option("--l2cache", action="store_true") 364968Sacolyte@umich.eduparser.add_option("--fastmem", action="store_true") 376893SBrad.Beckmann@amd.comparser.add_option("--clock", action="store", type="string", default='1GHz') 386893SBrad.Beckmann@amd.comparser.add_option("--num-dirs", type="int", default=1) 396893SBrad.Beckmann@amd.com 403395Shsul@eecs.umich.edu# Run duration options 416892SBrad.Beckmann@amd.comparser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick, 426892SBrad.Beckmann@amd.com metavar="T", 436892SBrad.Beckmann@amd.com help="Stop after T ticks") 443395Shsul@eecs.umich.eduparser.add_option("--maxtime", type="float") 456641Sksewell@umich.eduparser.add_option("--maxinsts", type="int") 466144Sksewell@umich.eduparser.add_option("--prog_intvl", type="int") 476144Sksewell@umich.edu 483395Shsul@eecs.umich.edu 493395Shsul@eecs.umich.edu# Checkpointing options 503395Shsul@eecs.umich.edu###Note that performing checkpointing via python script files will override 513395Shsul@eecs.umich.edu###checkpoint instructions built into binaries. 525361Srstrong@cs.ucsd.eduparser.add_option("--take-checkpoints", action="store", type="string", 535361Srstrong@cs.ucsd.edu help="<M,N> will take checkpoint at cycle M and every N cycles thereafter") 545361Srstrong@cs.ucsd.eduparser.add_option("--max-checkpoints", action="store", type="int", 555361Srstrong@cs.ucsd.edu help="the maximum number of checkpoints to drop", default=5) 565361Srstrong@cs.ucsd.eduparser.add_option("--checkpoint-dir", action="store", type="string", 575361Srstrong@cs.ucsd.edu help="Place all checkpoints in this absolute directory") 585361Srstrong@cs.ucsd.eduparser.add_option("-r", "--checkpoint-restore", action="store", type="int", 595361Srstrong@cs.ucsd.edu help="restore from checkpoint <N>") 606776SBrad.Beckmann@amd.comparser.add_option("--checkpoint-at-end", action="store_true", 616776SBrad.Beckmann@amd.com help="take a checkpoint at end of run") 626776SBrad.Beckmann@amd.com 633395Shsul@eecs.umich.edu 643395Shsul@eecs.umich.edu# CPU Switching - default switch model goes from a checkpoint 653395Shsul@eecs.umich.edu# to a timing simple CPU with caches to warm up, then to detailed CPU for 663395Shsul@eecs.umich.edu# data measurement 675361Srstrong@cs.ucsd.eduparser.add_option("-s", "--standard-switch", action="store_true", 685361Srstrong@cs.ucsd.edu help="switch from timing CPU to Detailed CPU") 693445Shsul@eecs.umich.eduparser.add_option("-w", "--warmup", action="store", type="int", 705361Srstrong@cs.ucsd.edu help="if -s, then this is the warmup period. else, this is ignored", 715361Srstrong@cs.ucsd.edu default=5000000000) 726769SBrad.Beckmann@amd.comparser.add_option("--profile", help="CPU profile interval") 735361Srstrong@cs.ucsd.edu 745361Srstrong@cs.ucsd.edu# Fastforwarding and simpoint related materials 755361Srstrong@cs.ucsd.eduparser.add_option("-W", "--warmup-insts", action="store", type="int", 765361Srstrong@cs.ucsd.edu default=None, 775361Srstrong@cs.ucsd.edu help="Warmup period in total instructions (requires --standard-switch)") 785361Srstrong@cs.ucsd.eduparser.add_option("-I", "--max-inst", action="store", type="int", default=None, 795361Srstrong@cs.ucsd.edu help="Total number of instructions to simulate (default: run forever)") 805361Srstrong@cs.ucsd.eduparser.add_option("--bench", action="store", type="string", default=None, 815361Srstrong@cs.ucsd.edu help="base names for --take-checkpoint and --checkpoint-restore") 825361Srstrong@cs.ucsd.eduparser.add_option("-F", "--fast-forward", action="store", type="string", 835361Srstrong@cs.ucsd.edu default=None, 845361Srstrong@cs.ucsd.edu help="Number of instructions to fast forward before switching") 855361Srstrong@cs.ucsd.eduparser.add_option("-S", "--simpoint", action="store_true", default=False, 865361Srstrong@cs.ucsd.edu help="""Use workload simpoints as an instruction offset for 875361Srstrong@cs.ucsd.edu--checkpoint-restore or --take-checkpoint.""") 885361Srstrong@cs.ucsd.eduparser.add_option("--at-instruction", action="store_true", default=False, 895361Srstrong@cs.ucsd.edu help="""Treate value of --checkpoint-restore or --take-checkpoint as a 905361Srstrong@cs.ucsd.edunumber of instructions.""") 91