#! /bin/sh -v

JFLAGS=-Xmx256m

# Gather statistics from fpdivide module

	echo ""; echo ""; echo ""; rm xx-fpdivide.*
java ${JFLAGS} tb_FPDivide build width=6 exp.width=2 pipelevel=2
	head -n 28 xx-fpdivide.mrp; tail -n 16 xx-fpdivide.par.twr

	echo ""; echo ""; echo ""; rm xx-fpdivide.*
java ${JFLAGS} tb_FPDivide build width=6 exp.width=2 pipelevel=1
	head -n 28 xx-fpdivide.mrp; tail -n 16 xx-fpdivide.par.twr

	echo ""; echo ""; echo ""; rm xx-fpdivide.*
java ${JFLAGS} tb_FPDivide build width=6 exp.width=2 pipelevel=0
	head -n 28 xx-fpdivide.mrp; tail -n 16 xx-fpdivide.par.twr


	echo ""; echo ""; echo ""; rm xx-fpdivide.*
java ${JFLAGS} tb_FPDivide build width=32 exp.width=8 pipelevel=2
	head -n 28 xx-fpdivide.mrp; tail -n 16 xx-fpdivide.par.twr
#	grep "Number of Slices" xx-fpdivide.mrp; grep "Minimum period" xx-fpdivide.par.twr; grep "Maximum combinational path delay" xx-fpdivide.par.twr; grep "Maximum net delay" xx-fpdivide.par.twr

	echo ""; echo ""; echo ""; rm xx-fpdivide.*
java ${JFLAGS} tb_FPDivide build width=32 exp.width=8 pipelevel=1
	head -n 28 xx-fpdivide.mrp; tail -n 16 xx-fpdivide.par.twr
#	grep "Number of Slices" xx-fpdivide.mrp; grep "Minimum period" xx-fpdivide.par.twr; grep "Maximum combinational path delay" xx-fpdivide.par.twr; grep "Maximum net delay" xx-fpdivide.par.twr

	echo ""; echo ""; echo ""; rm xx-fpdivide.*
java ${JFLAGS} tb_FPDivide build width=32 exp.width=8 pipelevel=0
	head -n 28 xx-fpdivide.mrp; tail -n 16 xx-fpdivide.par.twr
#	grep "Number of Slices" xx-fpdivide.mrp; grep "Minimum period" xx-fpdivide.par.twr; grep "Maximum combinational path delay" xx-fpdivide.par.twr; grep "Maximum net delay" xx-fpdivide.par.twr


	echo ""; echo ""; echo ""; rm xx-fpdivide.*
java ${JFLAGS} tb_FPDivide build width=24 exp.width=6 pipelevel=2
	head -n 28 xx-fpdivide.mrp; tail -n 16 xx-fpdivide.par.twr
#	grep "Number of Slices" xx-fpdivide.mrp; grep "Minimum period" xx-fpdivide.par.twr; grep "Maximum combinational path delay" xx-fpdivide.par.twr; grep "Maximum net delay" xx-fpdivide.par.twr

	echo ""; echo ""; echo ""; rm xx-fpdivide.*
java ${JFLAGS} tb_FPDivide build width=24 exp.width=6 pipelevel=1
	head -n 28 xx-fpdivide.mrp; tail -n 16 xx-fpdivide.par.twr
#	grep "Number of Slices" xx-fpdivide.mrp; grep "Minimum period" xx-fpdivide.par.twr; grep "Maximum combinational path delay" xx-fpdivide.par.twr; grep "Maximum net delay" xx-fpdivide.par.twr

	echo ""; echo ""; echo ""; rm xx-fpdivide.*
java ${JFLAGS} tb_FPDivide build width=24 exp.width=6 pipelevel=0
	head -n 28 xx-fpdivide.mrp; tail -n 16 xx-fpdivide.par.twr
#	grep "Number of Slices" xx-fpdivide.mrp; grep "Minimum period" xx-fpdivide.par.twr; grep "Maximum combinational path delay" xx-fpdivide.par.twr; grep "Maximum net delay" xx-fpdivide.par.twr


	echo ""; echo ""; echo ""; rm xx-fpdivide.*
java ${JFLAGS} tb_FPDivide build width=16 exp.width=4 pipelevel=2
	head -n 28 xx-fpdivide.mrp; tail -n 16 xx-fpdivide.par.twr
#	grep "Number of Slices" xx-fpdivide.mrp; grep "Minimum period" xx-fpdivide.par.twr; grep "Maximum combinational path delay" xx-fpdivide.par.twr; grep "Maximum net delay" xx-fpdivide.par.twr

	echo ""; echo ""; echo ""; rm xx-fpdivide.*
java ${JFLAGS} tb_FPDivide build width=16 exp.width=4 pipelevel=1
	head -n 28 xx-fpdivide.mrp; tail -n 16 xx-fpdivide.par.twr
#	grep "Number of Slices" xx-fpdivide.mrp; grep "Minimum period" xx-fpdivide.par.twr; grep "Maximum combinational path delay" xx-fpdivide.par.twr; grep "Maximum net delay" xx-fpdivide.par.twr

	echo ""; echo ""; echo ""; rm xx-fpdivide.*
java ${JFLAGS} tb_FPDivide build width=16 exp.width=4 pipelevel=0
	head -n 28 xx-fpdivide.mrp; tail -n 16 xx-fpdivide.par.twr
#	grep "Number of Slices" xx-fpdivide.mrp; grep "Minimum period" xx-fpdivide.par.twr; grep "Maximum combinational path delay" xx-fpdivide.par.twr; grep "Maximum net delay" xx-fpdivide.par.twr

