#!tcsh -f
if ( "$1" == "" ) then
  echo "Create a Cheops input file from an Alliance description"
  echo "usage : `basename $0` chip"
  exit 1
endif
setenv MBK_IN_PH  ap
setenv MBK_OUT_PH cp
setenv MBK_IN_LO  vst
setenv MBK_OUT_LO hns
CMD.EXE /c frin.exe $1
if ($status != 0) exit 1;
set core=`grep ^I $MBK_WORK_LIB/$1.cp | tail -1 | ggawk -F\" '{print $2}'`
CMD.EXE /c vticheops.exe << EOT
$core



EOT
CMD.EXE /c x2y.exe cp ap $1
rm $1.cp
