#!/bin/tcsh -f
#----------------------------------------------------------
# post-TimberWolf cleanup
#----------------------------------------------------------
# Tim Edwards, 5/7/07, for MultiGiG, Inc.
#----------------------------------------------------------

if ($#argv < 1) then
   echo "Usage:  posttw.sh <cellname>"
   exit 1
endif

set rootname=${argv[1]:r}

#-----------------------------------------------
# 1) Create the .list netlist
#-----------------------------------------------

place2net2.tcl $rootname

#-----------------------------------------------
# 2) Create the unrouted layout
#-----------------------------------------------

rm -f ${rootname}_unrouted.mag

magic -dnull -noconsole <<EOF
drc off
box 0 0 0 0
source place2lef2.tcl
place2lef ${rootname}
save ${rootname}_unrouted
quit -noprompt
EOF

#----------------------------------------------------------
# 3) Cleanup the (excessively numerous) Timberwolf files
#----------------------------------------------------------

rm -f ${rootname}.blk ${rootname}.gen ${rootname}.gsav ${rootname}.history
rm -f ${rootname}.log ${rootname}.mcel ${rootname}.mdat ${rootname}.mgeo
rm -f ${rootname}.mout ${rootname}.mpin ${rootname}.mpth ${rootname}.msav
rm -f ${rootname}.mver ${rootname}.mvio ${rootname}.pin ${rootname}.pl1
rm -f ${rootname}.pl2 ${rootname}.pth ${rootname}.sav ${rootname}.scel
rm -f ${rootname}.stat ${rootname}.out

#----------------------------------------------------------

