rm -r WORK/*
echo vhdlan -nc -cycle -event alu.vhd opw.vhd opwTst.vhd >> cyc.time
echo "------------------------------------------------"  >> cyc.time
(time vhdlan -nc -cycle -event alu.vhd opw.vhd opwTst.vhd) >>& cyc.time
echo "" >> cyc.time

set outCnt = 1
foreach sta ("-4state" "-2state")
  set simopt = ("-debug" "-debug"      "-perf" "-perf")
  foreach opt  ("-debug" "-debug -tbl" "-perf" "-perf -tbl")
    echo cylab -nc -t ns $sta $opt tstcfg >> cyc.time
    echo "------------------------------------------------" >> cyc.time
    (time cylab -nc -t ns $sta $opt -o /dev/null tstcfg) >>& cyc.time 
    foreach rew ("-rewind" "")
      echo -n running $sta $opt / $rew ...
      echo cysim -nc -t ns $sta $simopt[1] $rew -i cyc.scr tstcfg >> cyc.time
      echo "------------------------------------------------" >> cyc.time
      foreach run (1 2 3)
	echo -n " "$run
	(time cysim -nc -t ns $sta $simopt[1] $rew -i cyc.scr -o tmpout tstcfg) >>& cyc.time
	mv tmpout tmpout.$outCnt
	@ outCnt++
      end
      echo ""
    end
    echo "" >> cyc.time
    shift simopt
  end
end
unset simopt
