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

    foreach lib ("FTGS" "FTGSC" "FTSM" "UDSM" "VITAL" "vital")
      if ($lib == "vital") then
	cp  /local/tech1.1/ams/vhdlLib/v3.30/csx33/.synopsys_vss.setup .
      else
	echo "csx_HRDLIB > csx"			>  .synopsys_vss.setup
	cat /local/tech1.1/ams/vhdlLib/vSrc/csx/${lib}/.synopsys_vss.setup \
						>> .synopsys_vss.setup
      endif

      rm -r WORK/*
      echo vhdlan -nc -cycle -event mul${aWd}x${bWd}S mulTstS mul${aWd}Cfg \
						>> vss.${aWd}x${bWd}.time.$lib
      echo "------------------------------------------------"		\
						>> vss.${aWd}x${bWd}.time.$lib
      (time vhdlan -nc -cycle -event mul${aWd}x${bWd}X.vhd mulTstS.vhd	\
	mul${aWd}Cfg.vhd)			>>&vss.${aWd}x${bWd}.time.$lib
      echo ""					>> vss.${aWd}x${bWd}.time.$lib
      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

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

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