set outCnt = 1
foreach lib ("vhdl" "vlog")
source make-$lib

set elabopt = ("" "-neverwarn -notimingchecks -noipd -no_tchk_msg -no_tchk_xgen -no_vpd_msg -no_vpd_xgen")
set simopt  = ("" "-neverwarn -nocifcheck")
foreach vhdlopt ("" "-neverwarn -nopragmawarn")
  rm -rf work
  mkdir work
  echo ncvlog -nocopyright -nostdout -nolog $vhdlopt '<vFile>'	\
							>> ncsim.time.$lib
  echo ncvhdl -nocopyright -v93 -nostdout -nolog $vhdlopt '<vhdFile>'	\
							>> ncsim.time.$lib
  echo "------------------------------------------------"		\
							>> ncsim.time.$lib
  echo -n running ncvlog
  echo -n opwS.v": "					>>ncsim.time.$lib
  (time ncvlog -nocopyright -nostdout -nolog $vhdlopt timescale.v opwS.v) \
							>>& ncsim.time.$lib
  echo -n " - ncvhdl"
  echo -n "opwVTst.vhd: "				>>ncsim.time.$lib
  (time ncvhdl -nocopyright -v93 -nostdout -nolog $vhdlopt opwVTst.vhd)	\
							>>& ncsim.time.$lib
  echo ncelab -nocopyright -v93 -generic "'cyclesC=>50000' \\"		\
							>> ncsim.time.$lib
  echo "      "-nostdout -nolog $elabopt[1] tstCfg	>> ncsim.time.$lib
  echo "------------------------------------------------"		\
							>> ncsim.time.$lib
  echo -n " - ncelab"
  (time ncelab -nocopyright -v93 -generic 'cyclesC=>50000'	\
	-nostdout -nolog $elabopt[1] tstCfg)		>>& ncsim.time.$lib
  echo ncsim -nocopyright -batch -input ncsim.scr -nostdout -nokey \\	\
							>> ncsim.time.$lib
  echo "      "-logfile tmpout $simopt[1] tstCfg	>> ncsim.time.$lib
  echo "------------------------------------------------"		\
							>> ncsim.time.$lib
  echo -n " - ncsim"
  foreach run (1 2 3)
    echo -n " "$run
    (time ncsim -nocopyright -batch -input ncsim.scr -nostdout -nokey	\
		-logfile tmpout $simopt[1] tstCfg)	>>& ncsim.time.$lib
    mv tmpout tmpout.$outCnt
    @ outCnt++
  end
  echo ""						>> ncsim.time.$lib
  echo ""
  shift elabopt
  shift simopt
end

end
unset elabopt
unset simopt
unset outCnt
