nandring 661 Bytes
#!/bin/sh -x 

if [ "$ROOT" = "" ];  then
    echo "Please specified the ROOT "
    exit
fi

usage()
{
    echo "Usage: dc [-g]"
    echo "  Generate nandring test vector"
    echo "     -g use gate_level simulate instead"   
}

GATE=0
while getopts "g?" a 
do
    case $a in
         g) GATE=1;;
         *) usage;;
    esac
done

cd ${ROOT}/PR/hw2/chip/vsim
rm -f verilog.dump
rm -f dump.v 
cp -f dump.v.padio dump.v

make clean
export SIMDEFS="+nospecify +define+TEST_VECTORS +define+NANDRING"
if [ "$GATE" = "1" ]; then
    export SIMGATE=1
else
    export SIMGATE=""
fi
make
./sim.v +sysclk=200000 +usbclk=200000 +vclk=200000 +delay_mode_zero +non_clk_mon