set bWdSet = ("8 16 24 32" "16 24 32" "24 32" "32")
foreach aWd ("8" "16" "24" "32")
  foreach bWd ($bWdSet[1])
    set outCnt = 1

    rm -r WORK/*
    echo vhdlan -nc -cycle -event mulPkg mul8 mul16 mul24 mul32 mulTst	\
						>> cyc.${aWd}x${bWd}.time
    echo "------------------------------------------------"		\
						>> cyc.${aWd}x${bWd}.time
    (time vhdlan -nc -cycle -event mulPkg.vhd mul8.vhd mul16.vhd	\
	mul24.vhd mul32.vhd mulTst.vhd)		>>& cyc.${aWd}x${bWd}.time
    echo ""					>> cyc.${aWd}x${bWd}.time

    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 mul${aWd}Cfg			\
						>> cyc.${aWd}x${bWd}.time
	echo "------------------------------------------------"		\
						>> cyc.${aWd}x${bWd}.time
	(time cylab -nc -t ns $sta $opt -o /dev/null mul${aWd}Cfg)	\
						>>& cyc.${aWd}x${bWd}.time
	foreach rew ("-rewind" "")
	  echo -n running ${aWd}x${bWd} $sta $opt / $rew ...
	  echo cysim -nc -t ns $sta $simopt[1] $rew -i cyc.scr mul${aWd}Cfg \
						>> cyc.${aWd}x${bWd}.time
	  echo "------------------------------------------------"	\
						>> cyc.${aWd}x${bWd}.time
	  foreach run (1 2 3)
	    echo -n " "$run
	    (time cysim -nc -t ns $sta $simopt[1] $rew -i cyc.scr -o tmpout \
		mul${aWd}Cfg)			>>& cyc.${aWd}x${bWd}.time
	    mv tmpout tmpout.${aWd}x${bWd}.$outCnt
	    @ outCnt++
	  end
	  echo ""
	end
	echo ""					>> cyc.${aWd}x${bWd}.time
	shift simopt
      end
    end
  end
  shift bWdSet
end
unset bWdSet
unset simopt
unset outCnt
