runtest.sh 905 Bytes
#!/bin/sh

if [ ! -d Config ] ; then
    mkdir -p Config
else
    rm -rf Config
    mkdir -p Config
fi

if [ ! -d Results ] ; then
    mkdir -p Results
else
    rm -f Results/*
fi

VUSB_LANG=verilog

if [ "$1" = "vhdl" ] ; then
  VUSB_LANG=verilog
elif [ "$1" = "verilog" ] ; then
  VUSB_LANG=verilog
elif [ "$1" != "" ] ; then
  echo "Usage: $0 [vhdl|verilog]"
  exit 1
fi

case `uname -s`.`uname -r` in
  SunOS.5.*)
	cp ../software/bfm/co_simulation/tests/vusb/lib-gccsparcOS5/*.dll .
	;;
  Linux.2.*)
	cp ../software/bfm/co_simulation/tests/vusb/lib-linux/*.dll .
	;;
  CYGWIN*)
	cp ../software/bfm/co_simulation/tests/vusb/lib-VC60/*.dll .
	;;
  *)
	echo "Environment Not Supported: Contact VAutomation, Inc."
	;;
esac

if [ "$VUSB_LANG" = "vhdl" ] ; then
  make -f makefile sim 
  vsim vusb_bvci_tb -do startup.do
else
  make -f makefile sim
  vsim vusb_bvci_tb -pli SimSocket.dll -do startup.do
fi