set ext = ("mix" "syn" "oldmix" "oldsyn" "verilog" "rtl")
foreach group ( "leapfrogMix ncvhdlMix"		\
		"synopsysSyn leapfrogSyn ncvhdlSyn"		\
		"oldLeapfrogMix oldNcvhdlMix"			\
		"oldSynopsysSyn oldLeapfrogSyn oldNcvhdlSyn"	\
		"verilog"					\
		"synopsys leapfrog ncvhdl")
  mkdir $ext[1]
  cd $ext[1]

  set first
  echo -n "plot">plot.cmd
  foreach dir ( $group )

    foreach fi ( ../../$dir/*.time* )
	set sim = `basename $fi | sed 's/time/plt/'`
	../../../plot/xTime $fi
	if $?first then
	  unset first
	else
	  echo ", \">>plot.cmd
	endif
	echo -n '  "'$sim'"' using 4:1:2:3 title '"'$sim'"' with errorbars \
								>>plot.cmd
    end
  end
  if ($ext[1] == "rtl") then
    foreach fi (../../../win/clock/*/*.time)
	set sim = `basename $fi .time`
	../../../plot/${sim}Time $fi
	echo ", \">>plot.cmd
	echo -n '  "'$sim.plt'"' using 4:1:2:3 title '"'$sim'"' with errorbars \
								>>plot.cmd
    end
  endif
  echo "">>plot.cmd
  echo "pause -1">>plot.cmd

  cd ..
  shift ext
end
unset ext
unset sim
