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	\
						>> vss.${aWd}x${bWd}.time
    echo "------------------------------------------------"		\
						>> vss.${aWd}x${bWd}.time
    (time vhdlan -nc -cycle -event mulPkg.vhd mul8.vhd mul16.vhd	\
	mul24.vhd mul32.vhd mulTst.vhd)		>>&vss.${aWd}x${bWd}.time
    echo ""					>> vss.${aWd}x${bWd}.time
    echo "assign ${aWd} aWdC"			>  vss.gen
    echo "assign ${bWd} bWdC"			>> vss.gen
    echo "assign 50000 cyclesC"			>> vss.gen
    echo "assign (20 ns) periodC"		>> vss.gen

    foreach opt  ("-d4 -fi_all" "-d1 -fi_all" "-fi_all" "-d4" "-d1" "")
      echo -n running ${aWd}x${bWd} $opt ...
      echo vhdlsim -nc -t ns $opt -i vss.scr -gfile vss.gen mul${aWd}Cfg \
						>> vss.${aWd}x${bWd}.time
      echo "------------------------------------------------"		\
						>> vss.${aWd}x${bWd}.time
      foreach run (1 2 3)
	echo -n " "$run
        (time vhdlsim -nc -t ns $opt -i vss.scr -gfile vss.gen		\
		-o tmpout mul${aWd}Cfg)		>>&vss.${aWd}x${bWd}.time

	mv tmpout tmpout.${aWd}x${bWd}.$outCnt
	@ outCnt++
      end
      echo ""
      echo ""					>> vss.${aWd}x${bWd}.time
    end
  end
  shift bWdSet
end
unset bWdSet
unset outCnt
