#!/bin/sh

cell=tap
if [ $# = 1 ]
then
	cell=$1
elif [ $# -gt 1 ]
then
	echo "usage: $0 [cellname]"
	exit
fi

echo "running bdnet"
#bdnet stage_logic.net
#bdnet ${cell}_logic.net
bdnet ${cell}.net

#echo "running padplace"
#padplace -l ${cell}:logic > ${cell}.padlist
padplace -D ${cell}.padlist ${cell}:logic

echo "running octflatten"
octflatten -t LEAF -o ${cell}:flat ${cell}:logic

echo "running wolfe"
wolfe -f -o ${cell}:placed ${cell}:flat

echo "running chipstats"
chipstats ${cell}:placed

