Options.py revision 6918
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) 396908SBrad.Beckmann@amd.comparser.add_option("--num-l2caches", type="int", default=1) 406916SBrad.Beckmann@amd.comparser.add_option("--topology", type="string", default="crossbar", 416916SBrad.Beckmann@amd.com help="'crossbar'|'mesh'") 426916SBrad.Beckmann@amd.comparser.add_option("--mesh-rows", type="int", default=1, 436916SBrad.Beckmann@amd.com help="the number of rows in the mesh topology") 446918SBrad.Beckmann@amd.comparser.add_option("--garnet-network", type="string", default=none, 456918SBrad.Beckmann@amd.com help="'fixed'|'flexible'") 466893SBrad.Beckmann@amd.com 473395Shsul@eecs.umich.edu# Run duration options 486892SBrad.Beckmann@amd.comparser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick, 496892SBrad.Beckmann@amd.com metavar="T", 506892SBrad.Beckmann@amd.com help="Stop after T ticks") 513395Shsul@eecs.umich.eduparser.add_option("--maxtime", type="float") 526641Sksewell@umich.eduparser.add_option("--maxinsts", type="int") 536144Sksewell@umich.eduparser.add_option("--prog_intvl", type="int") 546144Sksewell@umich.edu 553395Shsul@eecs.umich.edu 563395Shsul@eecs.umich.edu# Checkpointing options 573395Shsul@eecs.umich.edu###Note that performing checkpointing via python script files will override 583395Shsul@eecs.umich.edu###checkpoint instructions built into binaries. 595361Srstrong@cs.ucsd.eduparser.add_option("--take-checkpoints", action="store", type="string", 605361Srstrong@cs.ucsd.edu help="<M,N> will take checkpoint at cycle M and every N cycles thereafter") 615361Srstrong@cs.ucsd.eduparser.add_option("--max-checkpoints", action="store", type="int", 625361Srstrong@cs.ucsd.edu help="the maximum number of checkpoints to drop", default=5) 635361Srstrong@cs.ucsd.eduparser.add_option("--checkpoint-dir", action="store", type="string", 645361Srstrong@cs.ucsd.edu help="Place all checkpoints in this absolute directory") 655361Srstrong@cs.ucsd.eduparser.add_option("-r", "--checkpoint-restore", action="store", type="int", 665361Srstrong@cs.ucsd.edu help="restore from checkpoint <N>") 676776SBrad.Beckmann@amd.comparser.add_option("--checkpoint-at-end", action="store_true", 686776SBrad.Beckmann@amd.com help="take a checkpoint at end of run") 696776SBrad.Beckmann@amd.com 703395Shsul@eecs.umich.edu 713395Shsul@eecs.umich.edu# CPU Switching - default switch model goes from a checkpoint 723395Shsul@eecs.umich.edu# to a timing simple CPU with caches to warm up, then to detailed CPU for 733395Shsul@eecs.umich.edu# data measurement 745361Srstrong@cs.ucsd.eduparser.add_option("-s", "--standard-switch", action="store_true", 755361Srstrong@cs.ucsd.edu help="switch from timing CPU to Detailed CPU") 763445Shsul@eecs.umich.eduparser.add_option("-w", "--warmup", action="store", type="int", 775361Srstrong@cs.ucsd.edu help="if -s, then this is the warmup period. else, this is ignored", 785361Srstrong@cs.ucsd.edu default=5000000000) 796769SBrad.Beckmann@amd.comparser.add_option("--profile", help="CPU profile interval") 805361Srstrong@cs.ucsd.edu 815361Srstrong@cs.ucsd.edu# Fastforwarding and simpoint related materials 825361Srstrong@cs.ucsd.eduparser.add_option("-W", "--warmup-insts", action="store", type="int", 835361Srstrong@cs.ucsd.edu default=None, 845361Srstrong@cs.ucsd.edu help="Warmup period in total instructions (requires --standard-switch)") 855361Srstrong@cs.ucsd.eduparser.add_option("-I", "--max-inst", action="store", type="int", default=None, 865361Srstrong@cs.ucsd.edu help="Total number of instructions to simulate (default: run forever)") 875361Srstrong@cs.ucsd.eduparser.add_option("--bench", action="store", type="string", default=None, 885361Srstrong@cs.ucsd.edu help="base names for --take-checkpoint and --checkpoint-restore") 895361Srstrong@cs.ucsd.eduparser.add_option("-F", "--fast-forward", action="store", type="string", 905361Srstrong@cs.ucsd.edu default=None, 915361Srstrong@cs.ucsd.edu help="Number of instructions to fast forward before switching") 925361Srstrong@cs.ucsd.eduparser.add_option("-S", "--simpoint", action="store_true", default=False, 935361Srstrong@cs.ucsd.edu help="""Use workload simpoints as an instruction offset for 945361Srstrong@cs.ucsd.edu--checkpoint-restore or --take-checkpoint.""") 955361Srstrong@cs.ucsd.eduparser.add_option("--at-instruction", action="store_true", default=False, 965361Srstrong@cs.ucsd.edu help="""Treate value of --checkpoint-restore or --take-checkpoint as a 975361Srstrong@cs.ucsd.edunumber of instructions.""") 98