Options.py revision 6769
12689Sktlim@umich.edu# Copyright (c) 2006-2008 The Regents of The University of Michigan 22689Sktlim@umich.edu# All rights reserved. 32689Sktlim@umich.edu# 42689Sktlim@umich.edu# Redistribution and use in source and binary forms, with or without 52689Sktlim@umich.edu# modification, are permitted provided that the following conditions are 62689Sktlim@umich.edu# met: redistributions of source code must retain the above copyright 72689Sktlim@umich.edu# notice, this list of conditions and the following disclaimer; 82689Sktlim@umich.edu# redistributions in binary form must reproduce the above copyright 92689Sktlim@umich.edu# notice, this list of conditions and the following disclaimer in the 102689Sktlim@umich.edu# documentation and/or other materials provided with the distribution; 112689Sktlim@umich.edu# neither the name of the copyright holders nor the names of its 122689Sktlim@umich.edu# contributors may be used to endorse or promote products derived from 132689Sktlim@umich.edu# this software without specific prior written permission. 142689Sktlim@umich.edu# 152689Sktlim@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 162689Sktlim@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 172689Sktlim@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 182689Sktlim@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 192689Sktlim@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 202689Sktlim@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 212689Sktlim@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 222689Sktlim@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 232689Sktlim@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 242689Sktlim@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 252689Sktlim@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 262689Sktlim@umich.edu# 272689Sktlim@umich.edu# Authors: Lisa Hsu 282689Sktlim@umich.edu 292689Sktlim@umich.edu# system options 302689Sktlim@umich.eduparser.add_option("-d", "--detailed", action="store_true") 312683Sktlim@umich.eduparser.add_option("-t", "--timing", action="store_true") 323402Sktlim@umich.eduparser.add_option("--inorder", action="store_true") 332683Sktlim@umich.eduparser.add_option("-n", "--num-cpus", type="int", default=1) 342683Sktlim@umich.eduparser.add_option("--caches", action="store_true") 353402Sktlim@umich.eduparser.add_option("--l2cache", action="store_true") 363402Sktlim@umich.eduparser.add_option("--fastmem", action="store_true") 372862Sktlim@umich.edu 382862Sktlim@umich.edu# Run duration options 392862Sktlim@umich.eduparser.add_option("-m", "--maxtick", type="int") 403565Sgblack@eecs.umich.eduparser.add_option("--maxtime", type="float") 412862Sktlim@umich.eduparser.add_option("--maxinsts", type="int") 423675Sktlim@umich.eduparser.add_option("--prog_intvl", type="int") 432862Sktlim@umich.edu 442683Sktlim@umich.edu 452683Sktlim@umich.edu# Checkpointing options 463402Sktlim@umich.edu###Note that performing checkpointing via python script files will override 473402Sktlim@umich.edu###checkpoint instructions built into binaries. 482683Sktlim@umich.eduparser.add_option("--take-checkpoints", action="store", type="string", 495482Snate@binkert.org help="<M,N> will take checkpoint at cycle M and every N cycles thereafter") 503280Sgblack@eecs.umich.eduparser.add_option("--max-checkpoints", action="store", type="int", 512683Sktlim@umich.edu help="the maximum number of checkpoints to drop", default=5) 523402Sktlim@umich.eduparser.add_option("--checkpoint-dir", action="store", type="string", 533402Sktlim@umich.edu help="Place all checkpoints in this absolute directory") 543402Sktlim@umich.eduparser.add_option("-r", "--checkpoint-restore", action="store", type="int", 553402Sktlim@umich.edu help="restore from checkpoint <N>") 563280Sgblack@eecs.umich.edu 572683Sktlim@umich.edu# CPU Switching - default switch model goes from a checkpoint 582683Sktlim@umich.edu# to a timing simple CPU with caches to warm up, then to detailed CPU for 592699Sktlim@umich.edu# data measurement 602699Sktlim@umich.eduparser.add_option("-s", "--standard-switch", action="store_true", 612683Sktlim@umich.edu help="switch from timing CPU to Detailed CPU") 622683Sktlim@umich.eduparser.add_option("-w", "--warmup", action="store", type="int", 633486Sktlim@umich.edu help="if -s, then this is the warmup period. else, this is ignored", 643486Sktlim@umich.edu default=5000000000) 653486Sktlim@umich.eduparser.add_option("--profile", help="CPU profile interval") 663486Sktlim@umich.edu 673486Sktlim@umich.edu# Fastforwarding and simpoint related materials 683486Sktlim@umich.eduparser.add_option("-W", "--warmup-insts", action="store", type="int", 693486Sktlim@umich.edu default=None, 703486Sktlim@umich.edu help="Warmup period in total instructions (requires --standard-switch)") 713486Sktlim@umich.eduparser.add_option("-I", "--max-inst", action="store", type="int", default=None, 723486Sktlim@umich.edu help="Total number of instructions to simulate (default: run forever)") 732862Sktlim@umich.eduparser.add_option("--bench", action="store", type="string", default=None, 742862Sktlim@umich.edu help="base names for --take-checkpoint and --checkpoint-restore") 752862Sktlim@umich.eduparser.add_option("-F", "--fast-forward", action="store", type="string", 762862Sktlim@umich.edu default=None, 772862Sktlim@umich.edu help="Number of instructions to fast forward before switching") 782862Sktlim@umich.eduparser.add_option("-S", "--simpoint", action="store_true", default=False, 792862Sktlim@umich.edu help="""Use workload simpoints as an instruction offset for 803442Sgblack@eecs.umich.edu--checkpoint-restore or --take-checkpoint.""") 813442Sgblack@eecs.umich.eduparser.add_option("--at-instruction", action="store_true", default=False, 822862Sktlim@umich.edu help="""Treate value of --checkpoint-restore or --take-checkpoint as a 832862Sktlim@umich.edunumber of instructions.""") 842862Sktlim@umich.edu