makeOutFiles.sh 1.2 KB
#!/bin/sh -f

TNAME="" 

#
#  Directories
#
PRDEPTH="../../.."
INDATA="InData"
OUTDATA="OutData"

#
#  Tools
#
FILTER=${ROOT}/PR/rdpsim/backend/filter
RDRAM2IMG=${ROOT}/usr/sbin/rdram2image


##################################################
#
#  Usage message
#
##################################################
usage()
{
  echo "Usage: makeOutFiles <-n> test_name"
  exit 2
}

##################################################
#
#  generate .rgb, .cvg, .z files
#
##################################################
out_files()
{
  set -x

  #  Generate output file names
  COV_FILE=${OUTDATA}/${TNAME}_0.cov
  CVG_FILE=${OUTDATA}/${TNAME}_0.cvg
  RGB_FILE=${OUTDATA}/${TNAME}_0.rgb
  RGBF_FILE=${OUTDATA}/${TNAME}_f_0.rgb

  ${RDRAM2IMG} ${INDATA}/${TNAME}

  #  Create output files for comparison
  ${FILTER} -c ${COV_FILE} -i ${CVG_FILE} \
	-n ${RGB_FILE}

  # cleanup
#  rm -f ${INDATA}/${TNAME}.rdram

}

##################################################
#  Main
#
##################################################
  if test $# = 0 
  then
    usage
  fi
  
  while getopts "n:" a
  do
    case $a in
    	n)  TNAME=$OPTARG;;
    	\?) usage ;;
    esac
  done
  shift `expr $OPTIND - 1`

  out_files

# End makeOutFiles