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 umc18co /local/tech1.1/umc/vhdlLib/sv/umc18co'$lib >> cds.lib
  echo 'DEFINE umc18io /local/tech1.1/umc/vhdlLib/sv/umc18io'$lib >> cds.lib
  echo 'DEFINE umc25co /local/tech1.1/umc/vhdlLib/sv/umc25co'$lib >> cds.lib
  echo 'DEFINE umc25io /local/tech1.1/umc/vhdlLib/sv/umc25io'$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 running cv
    foreach vhd ("alu.vhd" "opw.vhd" "opwTst.vhd" "opwS.vhd" "opwSTst.vhd")
      echo -n $vhd": "						>>sv.time$lib
      (time cv -nocopyright -v93 $cvopt $vhd)			>>& sv.time$lib
    end
    foreach tb ("tstcfg" "tstscfg")
      echo ev -nocopyright -v93 $evopt[1] -generic "'cyclesC=>50000'" $tb \
								>> sv.time$lib
      echo "------------------------------------------------"	>> sv.time$lib
      echo -n "  $tb - ev"
      (time ev -nocopyright -v93 $evopt[1] -generic 'cyclesC=>50000' $tb) \
								>>& sv.time$lib
      echo sv -nocopyright -batch -input sv.scr -output tmpout $tb \
								>> sv.time$lib
      echo "------------------------------------------------"	>> sv.time$lib
      echo -n " - sv"
      foreach run (1 2 3)
	echo -n " "$run
	(time sv -nocopyright -batch -input sv.scr -output tmpout $tb) \
								>>& sv.time$lib
	mv tmpout tmpout.$outCnt
	@ outCnt++
      end
      echo ""
    end
    echo "" >> sv.time$lib
    echo ""
    shift evopt
  end
end
unset evopt
