set outCnt = 1
foreach lib ("" "-opt")
  rm -r work/*
  echo 'INCLUDE $CDS_INST_DIR/tools/leapfrog/files/cds.lib'	   > cds.lib
  echo 'INCLUDE /local/tech1.1/cds/ldv3.1/share/cdssetup/cds.lib' >> cds.lib
  echo 'DEFINE work work'					  >> cds.lib
  echo 'DEFINE csx_hrdlib /local/tech1.1/ams/vhdlLib/sv/csx33/csx_HRDLIB'$lib \
								  >> cds.lib

  set evopt = ("-performance"						\
    "-performance -noipd -notcheck -vitalmsgoff -vitalxoff")
  foreach cvopt ("-avopt -performance"					\
    "-avopt -performance -bounds -underover -notcheck -vitalmsgoff -vitalxoff")
    echo cv -nocopyright -v93 $cvopt '<vhdFile>'		>> sv.time$lib
    echo "------------------------------------------------"	>> sv.time$lib
    echo -n running cv
    foreach vhd ("compPkg.vhd" "dcfClockS.vhd" "simEnvPkg.vhd"		\
		"dcfSend.vhd" "tstClock.vhd")
      echo -n $vhd": "						>>sv.time$lib
      (time cv -nocopyright -v93 $cvopt $vhd)			>>& sv.time$lib
    end
    echo ev -nocopyright -v93 $evopt[1] cfgClock		>> sv.time$lib
    echo "------------------------------------------------"	>> sv.time$lib
    echo -n " - ev"
    (time ev -nocopyright -v93 $evopt[1] cfgClock)		>>& sv.time$lib
    echo sv -nocopyright -batch -input sv.scr -output tmpout cfgClock	\
								>> sv.time$lib
    echo "------------------------------------------------"	>> sv.time$lib
    echo -n " - sv"
    foreach run (1 2)
      echo -n " "$run
      (time sv -nocopyright -batch -input sv.scr -output tmpout cfgClock) \
								>>& sv.time$lib
      mv tmpout tmpout.$outCnt
      @ outCnt++
    end
    echo ""							>> sv.time$lib
    echo ""
    shift evopt
  end
end
unset evopt
unset outCnt
