dc.cpu.toshiba 1.13 KB
#!/bin/sh 

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

usage()
{
    echo "Usage: dc.cpu [-g]"
    echo "  Generate DC test vectors on sim.cpu.ipc"
    echo "     -g use gate_level simulate instead"  
    echo "     You may also specified DUMPOPTS environmnent virable to"
    echo "     to get more signal dumped"
    echo '     For example, export DUMPOOPTS="+dump_bcp" in bash'
    exit
}

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+FLASH_BIG +define+TOSHIBA_64MB"
if [ "$GATE" = "1" ]; then
    export SIMGATE=1
else
    export SIMGATE=""
fi
make sim.cpu.ipc
cp ${ROOT}/PR/lib/bbboot/final/rom.hex final_rom
./sim.cpu.ipc +sysclk=200000 +usbclk=400000 +vclk=400000 +delay_mode_zero  +cbus_mon +dbus_mon +non_clk_mon +brom=final_rom $DUMPOPTS &

cd ${ROOT}/PR/iosim/src/jtag_test
export CPU_AT_5MHZ=1
export TOSHIBA_FLASH=1
rm test_vector
make clean
make test_vector
./test_vector -i -b -t d -q -S 10208