Example #1
0
def options(prog):
    argv_parser = OptionParser(usage="usage: " + prog + " [options]",
                               version=Pfe_Version.version(),
                               option_class=SliceOption)
    argv_parser.disable_interspersed_args()

    argv_parser.add_option("-i",
                           "--interactive",
                           action="store_true",
                           dest="interactive",
                           default=False,
                           help="switch to interactive (inspect) mode")

    #argv_parser.add_option(
    #"-f","--file",
    #action="append",type="string",dest="file",default=[],
    #metavar="FILE",help="load one or more elf or memory image files")

    argv_parser.add_option("-l",
                           "--lstmode",
                           action="store_true",
                           dest="lstmode",
                           default=False,
                           help="switch to lstmode, default is runmode")

    #argv_parser.add_option(
    #"-n","--steps",
    #action="store",type="int",dest="steps",
    #metavar="STEPS",help="step the simulator STEPS instructions per strand")

    #argv_parser.add_option(
    #"-a","--available",
    #action="store",type="slice",dest="available",default="0",
    #metavar="SLICE",help="CMP: Make the SLICE of strands available for stepping (default=0)")

    #argv_parser.add_option(
    #"-e","--enable",
    #action="store",type="slice",dest="enable",default="0",
    #metavar="SLICE",help="CMP: Set the SLICE of strands to enabled for stepping (default=0)")

    #argv_parser.add_option(
    #"-r","--running",
    #action="store",type="slice",dest="running",default="0",
    #metavar="SLICE",help="CMP: Put the SLICE of strands in running mode for stepping (default=0)")

    #argv_parser.add_option(
    #"-s","--stepping",
    #action="store",type="slice",dest="stepping",default="0",
    #metavar="SLICE",help="Enable the SLICE of strands for stepping (default=0)")

    global opts
    global args

    (opts, args) = argv_parser.parse_args()
Example #2
0
def options(prog):
  argv_parser = OptionParser(usage="usage: "+prog+" [options]",
                             version=Pfe_Version.version(),
			     option_class=SliceOption)
  argv_parser.disable_interspersed_args()

  argv_parser.add_option(
    "-i","--interactive",
    action="store_true",dest="interactive",default=False,
    help="switch to interactive (inspect) mode")
    
  #argv_parser.add_option(
    #"-f","--file",
    #action="append",type="string",dest="file",default=[],
    #metavar="FILE",help="load one or more elf or memory image files")

  argv_parser.add_option(
    "-l","--lstmode",
    action="store_true",dest="lstmode",default=False,
    help="switch to lstmode, default is runmode")
    
  #argv_parser.add_option(
    #"-n","--steps",
    #action="store",type="int",dest="steps",
    #metavar="STEPS",help="step the simulator STEPS instructions per strand")

  #argv_parser.add_option(
    #"-a","--available",
    #action="store",type="slice",dest="available",default="0",
    #metavar="SLICE",help="CMP: Make the SLICE of strands available for stepping (default=0)")

  #argv_parser.add_option(
    #"-e","--enable",
    #action="store",type="slice",dest="enable",default="0",
    #metavar="SLICE",help="CMP: Set the SLICE of strands to enabled for stepping (default=0)")

  #argv_parser.add_option(
    #"-r","--running",
    #action="store",type="slice",dest="running",default="0",
    #metavar="SLICE",help="CMP: Put the SLICE of strands in running mode for stepping (default=0)")

  #argv_parser.add_option(
    #"-s","--stepping",
    #action="store",type="slice",dest="stepping",default="0",
    #metavar="SLICE",help="Enable the SLICE of strands for stepping (default=0)")

  global opts
  global args

  (opts,args) = argv_parser.parse_args()
Example #3
0
def options(prog):
    argv_parser = OptionParser(usage="usage: " + prog + " [options]", version=Pfe_Version.version())
    argv_parser.disable_interspersed_args()

    argv_parser.add_option(
        "-c", "--record", action="store_true", dest="record", default=False, help="Record pli socket i/o for replay"
    )

    argv_parser.add_option(
        "-e", "--ras_enable", action="store_true", dest="ras_enable", default=False, help="RAS enable."
    )

    argv_parser.add_option(
        "-f",
        "--format",
        action="store_true",
        dest="format",
        default=False,
        help="Output in n2 sas.log format if -f is specified.",
    )

    argv_parser.add_option(
        "-i",
        "--interactive",
        action="store_true",
        dest="interactive",
        default=False,
        help="switch to interactive (inspect) mode",
    )

    argv_parser.add_option(
        "-n",
        "--samfe",
        action="store_true",
        dest="samfe",
        default=False,
        help="Invoke nas-fe command parser in batch & interactive modes",
    )

    argv_parser.add_option(
        "-p",
        "--replay",
        action="store_true",
        dest="replay",
        default=False,
        help="Replay and verify from a previous run.",
    )

    argv_parser.add_option(
        "-r",
        "--release",
        action="store",
        type="string",
        dest="release",
        default="",
        metavar="VERSION",
        help="Release version of this tool",
    )

    argv_parser.add_option(
        "-s",
        "--riesling-conf",
        action="append",
        type="string",
        dest="riesling_conf",
        default=["riesling.conf"],
        metavar="FILE",
        help="Default riesling.conf",
    )

    argv_parser.add_option(
        "-t", "--trace", action="store_true", dest="trace", default=False, help="Trace instruction stepping to stdout."
    )

    argv_parser.add_option(
        "-x",
        "--diag-simics",
        action="append",
        type="string",
        dest="diag_simics",
        default=["diag.simics"],
        metavar="FILE",
        help="Default diag.simics",
    )

    global opts
    global args

    (opts, args) = argv_parser.parse_args()
Example #4
0
def options(prog):
  argv_parser = OptionParser(usage="usage: "+prog+" [options]",
                             version=Pfe_Version.version(),
			     option_class=SliceOption)
  argv_parser.disable_interspersed_args()

  argv_parser.add_option(
    "-i","--interactive",
    action="store_true",dest="interactive",default=False,
    help="switch to interactive (inspect) mode")
    
  #argv_parser.add_option(
    #"-f","--file",
    #action="append",type="string",dest="file",default=[],
    #metavar="FILE",help="load one or more elf or memory image files")

  argv_parser.add_option(
    "-l","--lstmode",
    action="store_true",dest="lstmode",default=False,
    help="switch to lstmode, default is runmode")
    
  #argv_parser.add_option(
    #"-n","--steps",
    #action="store",type="int",dest="steps",
    #metavar="STEPS",help="step the simulator STEPS instructions per strand")

  #argv_parser.add_option(
    #"-a","--available",
    #action="store",type="slice",dest="available",default="0",
    #metavar="SLICE",help="CMP: Make the SLICE of strands available for stepping (default=0)")

  #argv_parser.add_option(
    #"-e","--enable",
    #action="store",type="slice",dest="enable",default="0",
    #metavar="SLICE",help="CMP: Set the SLICE of strands to enabled for stepping (default=0)")

  #argv_parser.add_option(
    #"-r","--running",
    #action="store",type="slice",dest="running",default="0",
    #metavar="SLICE",help="CMP: Put the SLICE of strands in running mode for stepping (default=0)")

  #argv_parser.add_option(
    #"-s","--stepping",
    #action="store",type="slice",dest="stepping",default="0",
    #metavar="SLICE",help="Enable the SLICE of strands for stepping (default=0)")

  global opts
  global args
  global argv

  (opts,args_argv) = argv_parser.parse_args()

  # Split the file arguments around the '--' if it is present.
  # There is one problem "-- no pyfile" fails, while
  # "pyfile -- no pyfile" succeeds. Awel, that;'s not a big 
  # issue as anything after '--' is means for the pyfile anyways.

  while args_argv:
    arg = args_argv[0]
    if arg == '--':
      argv = args_argv[1:]
      break
    else:
      args.append(arg)
      del args_argv[0]