Options.py revision 6769:630a3d0b7eb7
19793Sakash.bagdia@arm.com# Copyright (c) 2006-2008 The Regents of The University of Michigan
27586SAli.Saidi@arm.com# All rights reserved.
37586SAli.Saidi@arm.com#
47586SAli.Saidi@arm.com# Redistribution and use in source and binary forms, with or without
57586SAli.Saidi@arm.com# modification, are permitted provided that the following conditions are
67586SAli.Saidi@arm.com# met: redistributions of source code must retain the above copyright
77586SAli.Saidi@arm.com# notice, this list of conditions and the following disclaimer;
87586SAli.Saidi@arm.com# redistributions in binary form must reproduce the above copyright
97586SAli.Saidi@arm.com# notice, this list of conditions and the following disclaimer in the
107586SAli.Saidi@arm.com# documentation and/or other materials provided with the distribution;
117586SAli.Saidi@arm.com# neither the name of the copyright holders nor the names of its
127586SAli.Saidi@arm.com# contributors may be used to endorse or promote products derived from
133970Sgblack@eecs.umich.edu# this software without specific prior written permission.
143005Sstever@eecs.umich.edu#
153005Sstever@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
163005Sstever@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
173005Sstever@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
183005Sstever@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
193005Sstever@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
203005Sstever@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
213005Sstever@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
223005Sstever@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
233005Sstever@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
243005Sstever@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
253005Sstever@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
263005Sstever@eecs.umich.edu#
273005Sstever@eecs.umich.edu# Authors: Lisa Hsu
283005Sstever@eecs.umich.edu
293005Sstever@eecs.umich.edu# system options
303005Sstever@eecs.umich.eduparser.add_option("-d", "--detailed", action="store_true")
313005Sstever@eecs.umich.eduparser.add_option("-t", "--timing", action="store_true")
323005Sstever@eecs.umich.eduparser.add_option("--inorder", action="store_true")
333005Sstever@eecs.umich.eduparser.add_option("-n", "--num-cpus", type="int", default=1)
343005Sstever@eecs.umich.eduparser.add_option("--caches", action="store_true")
353005Sstever@eecs.umich.eduparser.add_option("--l2cache", action="store_true")
363005Sstever@eecs.umich.eduparser.add_option("--fastmem", action="store_true")
373005Sstever@eecs.umich.edu
383005Sstever@eecs.umich.edu# Run duration options
393005Sstever@eecs.umich.eduparser.add_option("-m", "--maxtick", type="int")
403005Sstever@eecs.umich.eduparser.add_option("--maxtime", type="float")
416654Snate@binkert.orgparser.add_option("--maxinsts", type="int")
426654Snate@binkert.orgparser.add_option("--prog_intvl", type="int")
432889SN/A
442710SN/A
456654Snate@binkert.org# Checkpointing options
466654Snate@binkert.org###Note that performing checkpointing via python script files will override
476654Snate@binkert.org###checkpoint instructions built into binaries.
485457Ssaidi@eecs.umich.eduparser.add_option("--take-checkpoints", action="store", type="string",
496654Snate@binkert.org    help="<M,N> will take checkpoint at cycle M and every N cycles thereafter")
506654Snate@binkert.orgparser.add_option("--max-checkpoints", action="store", type="int",
512934SN/A    help="the maximum number of checkpoints to drop", default=5)
522549SN/Aparser.add_option("--checkpoint-dir", action="store", type="string",
532995SN/A    help="Place all checkpoints in this absolute directory")
543395Shsul@eecs.umich.eduparser.add_option("-r", "--checkpoint-restore", action="store", type="int",
556981SLisa.Hsu@amd.com    help="restore from checkpoint <N>")
563448Shsul@eecs.umich.edu
578920Snilay@cs.wisc.edu# CPU Switching - default switch model goes from a checkpoint
583444Sktlim@umich.edu# to a timing simple CPU with caches to warm up, then to detailed CPU for
592889SN/A# data measurement
608920Snilay@cs.wisc.eduparser.add_option("-s", "--standard-switch", action="store_true",
618920Snilay@cs.wisc.edu    help="switch from timing CPU to Detailed CPU")
623322Shsul@eecs.umich.eduparser.add_option("-w", "--warmup", action="store", type="int",
632710SN/A    help="if -s, then this is the warmup period.  else, this is ignored",
642710SN/A    default=5000000000)
652710SN/Aparser.add_option("--profile", help="CPU profile interval")
662710SN/A
672710SN/A# Fastforwarding and simpoint related materials
682710SN/Aparser.add_option("-W", "--warmup-insts", action="store", type="int",
693322Shsul@eecs.umich.edu    default=None,
703304Sstever@eecs.umich.edu    help="Warmup period in total instructions (requires --standard-switch)")
713322Shsul@eecs.umich.eduparser.add_option("-I", "--max-inst", action="store", type="int", default=None,
723322Shsul@eecs.umich.edu    help="Total number of instructions to simulate (default: run forever)")
733304Sstever@eecs.umich.eduparser.add_option("--bench", action="store", type="string", default=None,
749653SAndreas.Sandberg@ARM.com    help="base names for --take-checkpoint and --checkpoint-restore")
759653SAndreas.Sandberg@ARM.comparser.add_option("-F", "--fast-forward", action="store", type="string",
769653SAndreas.Sandberg@ARM.com    default=None,
779653SAndreas.Sandberg@ARM.com    help="Number of instructions to fast forward before switching")
789653SAndreas.Sandberg@ARM.comparser.add_option("-S", "--simpoint", action="store_true", default=False,
799653SAndreas.Sandberg@ARM.com    help="""Use workload simpoints as an instruction offset for
809653SAndreas.Sandberg@ARM.com--checkpoint-restore or --take-checkpoint.""")
813481Shsul@eecs.umich.eduparser.add_option("--at-instruction", action="store_true", default=False,
823481Shsul@eecs.umich.edu    help="""Treate value of --checkpoint-restore or --take-checkpoint as a
832566SN/Anumber of instructions.""")
849665Sandreas.hansson@arm.com