Example #1
0
            if o == "--RASC-xst":
                DO_RASC_XST = True
            elif o == "--RASC-synplify-pro":
                DO_RASC_SYNPLIFY_PRO = True

        elif o == "--stop-before-make":
            DO_STOP_BEFORE_MAKE = True

    # save back to settings file
    ROCCC_PY_LIB.VERBOSE_LEVEL = VERBOSE_LEVEL

    if len(args) == 0:
        full_filename = 'DIRECTIVES.dat'

    elif len(args) != 1:
        ROCCC_PY_LIB.error_print(ERROR_PARSE_ARG,
                                 "Must specify only 1 input directives file")

    else:
        full_filename = args[0]

    ######
    # Error checking to make sure the options are valid
    ######

    if not os.path.isfile(full_filename):
        ROCCC_PY_LIB.error_print(
            ERROR_PARSE_ARG, 'File \"' + full_filename + '\" does not exist')

    return full_filename

            DO_PRINT_GRAPH = True

        elif o in ("--default-synthesis", "--default-synthesis-xst-only"):
            DO_DEFAULT_SYNTHESIS = True
            if o == "--default-synthesis-xst-only":
                DO_DEFAULT_SYNTHESIS_XST_ONLY = True

        elif o == "--RASC":
            DO_RASC_SYNTHESIS = True

    # set verbosity
    ROCCC_PY_LIB.VERBOSE_LEVEL = VERBOSE_LEVEL

    if DO_DEFAULT_SYNTHESIS and DO_RASC_SYNTHESIS:
        ROCCC_PY_LIB.error_print(
            ERROR_INVALID_ARG_MIX,
            "Can not use --RASC and --default-synthesis options together")

    if len(args) != 1:
        ROCCC_PY_LIB.error_print(ERROR_INVALID_ARG_MIX,
                                 "Must specify only one hicirrf input file")

    full_filename = args[0]

    # Take out prefix and split extension
    ext_temp = re.split('[.]', full_filename)
    hicirrf_filename_prefix = ext_temp[0]

    # split extension to determine ranges
    ext_range_temp = re.split(':', ext_temp[1])
    elif o in ("--default-synthesis", "--default-synthesis-xst-only") : 
      DO_DEFAULT_SYNTHESIS = True 
      if o == "--default-synthesis-xst-only" : 
        DO_DEFAULT_SYNTHESIS_XST_ONLY = True

    elif o == "--RASC":
      DO_RASC_SYNTHESIS = True 


  # set verbosity
  ROCCC_PY_LIB.VERBOSE_LEVEL = VERBOSE_LEVEL 


  if DO_DEFAULT_SYNTHESIS and DO_RASC_SYNTHESIS : 
    ROCCC_PY_LIB.error_print(ERROR_INVALID_ARG_MIX, "Can not use --RASC and --default-synthesis options together")
     
  if len(args) != 1 : 
    ROCCC_PY_LIB.error_print(ERROR_INVALID_ARG_MIX, "Must specify only one hicirrf input file")
  
  full_filename = args[0]

  # Take out prefix and split extension
  ext_temp = re.split('[.]',full_filename)
  hicirrf_filename_prefix = ext_temp[0]

  # split extension to determine ranges
  ext_range_temp = re.split(':', ext_temp[1])

  if len(ext_range_temp) == 1:
    if ext_temp[1].upper() != 'C' : 
            if o == "--RASC-xst":
                DO_RASC_XST = True
            elif o == "--RASC-synplify-pro":
                DO_RASC_SYNPLIFY_PRO = True

        elif o == "--stop-before-make":
            DO_STOP_BEFORE_MAKE = True

    # save back to settings file
    ROCCC_PY_LIB.VERBOSE_LEVEL = VERBOSE_LEVEL

    if len(args) == 0:
        full_filename = "DIRECTIVES.dat"

    elif len(args) != 1:
        ROCCC_PY_LIB.error_print(ERROR_PARSE_ARG, "Must specify only 1 input directives file")

    else:
        full_filename = args[0]

    ######
    # Error checking to make sure the options are valid
    ######

    if not os.path.isfile(full_filename):
        ROCCC_PY_LIB.error_print(ERROR_PARSE_ARG, 'File "' + full_filename + '" does not exist')

    return full_filename


#######################