set outCnt = 1
source make-vlog

set evopt = ("-performance" "-performance -noipd -notcheck -vitalmsgoff -vitalxoff")
set xlopt = ("-a" "-a +notimingchecks +turbo+3 +twin_turbo")
foreach cvopt ("-avopt -performance" "-avopt -performance -bounds -underover -notcheck -vitalmsgoff -vitalxoff")
  rm -f hdl.var
  echo "DEFINE CDS_TEXT_EDITOR /usr/ucb/vi"			 > hdl.var
  echo "DEFINE WORK work"					>> hdl.var
  echo "DEFINE VXLOPTS timescale.v -v umc18co.v -q " $xlopt[1]	>> hdl.var
  echo cv -nocopyright -v93 $cvopt '<vhdFile>'			>> sv.time
  echo "------------------------------------------------"	>> sv.time
  echo -n running cv
  foreach vhd ("opwV.vhd" "opwVTst.vhd")
    echo -n $vhd": "						>> sv.time
    (time cv -nocopyright -v93 $cvopt $vhd)			>>& sv.time 
  end
  echo ev -nocopyright -v93 $evopt[1] -generic "'cyclesC=>50000'" tstvcfg \
								>> sv.time
  echo "------------------------------------------------"	>> sv.time
  echo -n " - ev"
  (time ev -nocopyright -v93 $evopt[1] -generic 'cyclesC=>50000' tstvcfg) \
								>>& sv.time 
  echo sv -nocopyright -batch -input sv.scr -output tmpout tstvcfg >> sv.time
  echo "------------------------------------------------"	>> sv.time
  echo -n " - sv"
  foreach run (1 2 3)
    echo -n " "$run
    (time sv -nocopyright -batch -input sv.scr -output tmpout tstvcfg) \
								>>& sv.time
    mv tmpout tmpout.$outCnt
    @ outCnt++
  end
  echo "" >> sv.time
  echo ""
  shift evopt
  shift xlopt
end
unset evopt
unset xlopt
