Options.py revision 7515:82453f1b46c5
12817Sksewell@umich.edu# Copyright (c) 2006-2008 The Regents of The University of Michigan 22817Sksewell@umich.edu# All rights reserved. 32817Sksewell@umich.edu# 42817Sksewell@umich.edu# Redistribution and use in source and binary forms, with or without 52817Sksewell@umich.edu# modification, are permitted provided that the following conditions are 62817Sksewell@umich.edu# met: redistributions of source code must retain the above copyright 72817Sksewell@umich.edu# notice, this list of conditions and the following disclaimer; 82817Sksewell@umich.edu# redistributions in binary form must reproduce the above copyright 92817Sksewell@umich.edu# notice, this list of conditions and the following disclaimer in the 102817Sksewell@umich.edu# documentation and/or other materials provided with the distribution; 112817Sksewell@umich.edu# neither the name of the copyright holders nor the names of its 122817Sksewell@umich.edu# contributors may be used to endorse or promote products derived from 132817Sksewell@umich.edu# this software without specific prior written permission. 142817Sksewell@umich.edu# 152817Sksewell@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 162817Sksewell@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 172817Sksewell@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 182817Sksewell@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 192817Sksewell@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 202817Sksewell@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 212817Sksewell@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 222817Sksewell@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 232817Sksewell@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 242817Sksewell@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 252817Sksewell@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 262817Sksewell@umich.edu# 272817Sksewell@umich.edu# Authors: Lisa Hsu 282817Sksewell@umich.edu 294202Sbinkertn@umich.edu# system options 302817Sksewell@umich.eduparser.add_option("-d", "--detailed", action="store_true") 312817Sksewell@umich.eduparser.add_option("-t", "--timing", action="store_true") 322817Sksewell@umich.eduparser.add_option("--inorder", action="store_true") 334202Sbinkertn@umich.eduparser.add_option("-n", "--num-cpus", type="int", default=1) 342817Sksewell@umich.eduparser.add_option("--caches", action="store_true") 355192Ssaidi@eecs.umich.eduparser.add_option("--l2cache", action="store_true") 365192Ssaidi@eecs.umich.eduparser.add_option("--fastmem", action="store_true") 375192Ssaidi@eecs.umich.eduparser.add_option("--clock", action="store", type="string", default='1GHz') 385192Ssaidi@eecs.umich.eduparser.add_option("--num-dirs", type="int", default=1) 395192Ssaidi@eecs.umich.eduparser.add_option("--num-l2caches", type="int", default=1) 404202Sbinkertn@umich.eduparser.add_option("--topology", type="string", default="Crossbar", 414486Sbinkertn@umich.edu help="check src/mem/ruby/network/topologies for complete set") 424486Sbinkertn@umich.eduparser.add_option("--mesh-rows", type="int", default=1, 434486Sbinkertn@umich.edu help="the number of rows in the mesh topology") 444486Sbinkertn@umich.eduparser.add_option("--garnet-network", type="string", default=None, 454202Sbinkertn@umich.edu help="'fixed'|'flexible'") 464202Sbinkertn@umich.eduparser.add_option("--numa-high-bit", type="int", default=None, 474202Sbinkertn@umich.edu help="high order address bit to use for numa mapping") 484202Sbinkertn@umich.edu 495597Sgblack@eecs.umich.edu# ruby sparse memory options 504202Sbinkertn@umich.eduparser.add_option("--use-map", action="store_true", default=False) 515597Sgblack@eecs.umich.eduparser.add_option("--map-levels", type="int", default=4) 524202Sbinkertn@umich.edu 534202Sbinkertn@umich.edu# Run duration options 544202Sbinkertn@umich.eduparser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick, 554202Sbinkertn@umich.edu metavar="T", 564202Sbinkertn@umich.edu help="Stop after T ticks") 574202Sbinkertn@umich.eduparser.add_option("--maxtime", type="float") 584202Sbinkertn@umich.eduparser.add_option("--maxinsts", type="int") 594202Sbinkertn@umich.eduparser.add_option("--prog_intvl", type="int") 604202Sbinkertn@umich.edu 614202Sbinkertn@umich.edu 624202Sbinkertn@umich.edu# Checkpointing options 634202Sbinkertn@umich.edu###Note that performing checkpointing via python script files will override 644202Sbinkertn@umich.edu###checkpoint instructions built into binaries. 655597Sgblack@eecs.umich.eduparser.add_option("--take-checkpoints", action="store", type="string", 662817Sksewell@umich.edu help="<M,N> will take checkpoint at cycle M and every N cycles thereafter") 675192Ssaidi@eecs.umich.eduparser.add_option("--max-checkpoints", action="store", type="int", 685192Ssaidi@eecs.umich.edu help="the maximum number of checkpoints to drop", default=5) 695192Ssaidi@eecs.umich.eduparser.add_option("--checkpoint-dir", action="store", type="string", 705192Ssaidi@eecs.umich.edu help="Place all checkpoints in this absolute directory") 715192Ssaidi@eecs.umich.eduparser.add_option("-r", "--checkpoint-restore", action="store", type="int", 725192Ssaidi@eecs.umich.edu help="restore from checkpoint <N>") 735192Ssaidi@eecs.umich.eduparser.add_option("--checkpoint-at-end", action="store_true", 745192Ssaidi@eecs.umich.edu help="take a checkpoint at end of run") 755192Ssaidi@eecs.umich.edu 765192Ssaidi@eecs.umich.edu 775192Ssaidi@eecs.umich.edu# CPU Switching - default switch model goes from a checkpoint 785192Ssaidi@eecs.umich.edu# to a timing simple CPU with caches to warm up, then to detailed CPU for 795192Ssaidi@eecs.umich.edu# data measurement 805192Ssaidi@eecs.umich.eduparser.add_option("-s", "--standard-switch", action="store_true", 814202Sbinkertn@umich.edu help="switch from timing CPU to Detailed CPU") 824497Sbinkertn@umich.eduparser.add_option("-w", "--warmup", action="store", type="int", 834202Sbinkertn@umich.edu help="if -s, then this is the warmup period. else, this is ignored", 84 default=5000000000) 85parser.add_option("--profile", help="CPU profile interval") 86 87# Fastforwarding and simpoint related materials 88parser.add_option("-W", "--warmup-insts", action="store", type="int", 89 default=None, 90 help="Warmup period in total instructions (requires --standard-switch)") 91parser.add_option("-I", "--max-inst", action="store", type="int", default=None, 92 help="Total number of instructions to simulate (default: run forever)") 93parser.add_option("--bench", action="store", type="string", default=None, 94 help="base names for --take-checkpoint and --checkpoint-restore") 95parser.add_option("-F", "--fast-forward", action="store", type="string", 96 default=None, 97 help="Number of instructions to fast forward before switching") 98parser.add_option("-S", "--simpoint", action="store_true", default=False, 99 help="""Use workload simpoints as an instruction offset for 100--checkpoint-restore or --take-checkpoint.""") 101parser.add_option("--at-instruction", action="store_true", default=False, 102 help="""Treate value of --checkpoint-restore or --take-checkpoint as a 103number of instructions.""") 104