set outCnt = 10
source make-vlog

set elabopt = ("-access +R" "-afile ncsim.access"	\
	"-afile ncsim.access -neverwarn -notimingchecks -no_tchk_msg")
set simopt  = ("" "" "-neverwarn -epulse_no_msg -plinowarn")
foreach vlogopt ("" "" "-neverwarn -nopragmawarn")
  rm -rf work
  mkdir  work
  echo ncvlog -nocopyright -nostdout -nolog $vlogopt '<vFile>'	>> ncsim.time
  echo "------------------------------------------------"	>> ncsim.time
  echo -n running ncvlog
  foreach vlog ("dcfClockS.v" "tstClock.v")
    echo -n $vlog": "						>>ncsim.time
    (time ncvlog -nocopyright -nostdout -nolog $vlogopt $vlog)	>>& ncsim.time 
  end
  echo ncelab -nocopyright -nostdout -nolog $elabopt[1] \\	>> ncsim.time
  echo "       "-timescale 1ns/10ps tstClock			>> ncsim.time
  echo "------------------------------------------------"	>> ncsim.time
  echo -n " - ncelab"
  (time ncelab -nocopyright -nostdout -nolog $elabopt[1]	\
	-timescale 1ns/10ps tstClock)				>>& ncsim.time 
  echo ncsim -nocopyright -batch -input ncsim.scr -nostdout \\	>> ncsim.time
  echo "       "-nokey -logfile tmpout $simopt[1] tstClock	>> ncsim.time
  echo "------------------------------------------------"	>> ncsim.time
  echo -n " - ncsim"
  foreach run (1 2)
    echo -n " "$run
    (time ncsim -nocopyright -batch -input ncsim.scr -nostdout	\
	-nokey -logfile tmpout $simopt[1] tstClock)		>>& ncsim.time
    mv tmpout tmpout.$outCnt
    @ outCnt++
  end
  echo "" >> ncsim.time
  echo ""
  shift elabopt
  shift simopt
end

unset elabopt
unset simopt
unset outCnt
