mirror of
git://projects.qi-hardware.com/nn-usb-fpga.git
synced 2024-12-12 18:36:19 +02:00
53 lines
1.1 KiB
Bash
Executable File
53 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# $Id: xilinx_ghdl_unisim 88 2007-10-12 20:37:45Z mueller $
|
|
#
|
|
if [ -z "$XILINX" ]
|
|
then
|
|
echo "XILINX not defined"
|
|
exit 1
|
|
fi
|
|
#
|
|
cd $XILINX
|
|
echo "============================================================"
|
|
echo "* Build ghdl UNISIM libs for $XILINX"
|
|
echo "============================================================"
|
|
#
|
|
if [ ! -d ghdl ]
|
|
then
|
|
mkdir ghdl
|
|
fi
|
|
#
|
|
cd $XILINX/ghdl
|
|
if [ ! -d unisim ]
|
|
then
|
|
mkdir unisim
|
|
fi
|
|
#
|
|
cd $XILINX/ghdl/unisim
|
|
cp $XILINX/vhdl/src/unisims/unisim_VCOMP.vhd .
|
|
cp $XILINX/vhdl/src/unisims/unisim_VPKG.vhd .
|
|
#
|
|
if [ ! -d unisim_vital_chop ]
|
|
then
|
|
mkdir unisim_vital_chop
|
|
fi
|
|
cd unisim_vital_chop
|
|
xilinx_vhdl_chop $XILINX/vhdl/src/unisims/unisim_VITAL.vhd
|
|
#
|
|
cd ..
|
|
echo "# ghdl ... unisim_VCOMP.vhd"
|
|
ghdl -a --ieee=synopsys --work=unisim unisim_VCOMP.vhd
|
|
echo "# ghdl ... unisim_VPKG.vhd"
|
|
ghdl -a --ieee=synopsys --work=unisim unisim_VPKG.vhd
|
|
|
|
for file in `find unisim_vital_chop -name "*.vhd"`
|
|
do
|
|
echo "# ghdl ... $file"
|
|
ghdl -a -fexplicit --ieee=synopsys --work=unisim 2>&1 $file |\
|
|
tee $file.ghdl.log
|
|
done
|
|
#
|
|
echo "--- scan for compilation errors:"
|
|
find unisim_vital_chop -name "*.ghdl.log" | xargs grep error
|
|
#
|