Root/xilinx_lib/xilinx_ghdl_unisim

Source at commit acf516e created 13 years 6 months ago.
By Carlos Camargo, Fixing some examples, adding scripts for compiling xilinx libs with ghdl
1#!/bin/sh
2# $Id: xilinx_ghdl_unisim 88 2007-10-12 20:37:45Z mueller $
3#
4if [ -z "$XILINX" ]
5then
6  echo "XILINX not defined"
7  exit 1
8fi
9#
10cd $XILINX
11echo "============================================================"
12echo "* Build ghdl UNISIM libs for $XILINX"
13echo "============================================================"
14#
15if [ ! -d ghdl ]
16then
17  mkdir ghdl
18fi
19#
20cd $XILINX/ghdl
21if [ ! -d unisim ]
22then
23  mkdir unisim
24fi
25#
26cd $XILINX/ghdl/unisim
27cp $XILINX/vhdl/src/unisims/unisim_VCOMP.vhd .
28cp $XILINX/vhdl/src/unisims/unisim_VPKG.vhd .
29#
30if [ ! -d unisim_vital_chop ]
31then
32  mkdir unisim_vital_chop
33fi
34cd unisim_vital_chop
35xilinx_vhdl_chop $XILINX/vhdl/src/unisims/unisim_VITAL.vhd
36#
37cd ..
38echo "# ghdl ... unisim_VCOMP.vhd"
39ghdl -a --ieee=synopsys --work=unisim unisim_VCOMP.vhd
40echo "# ghdl ... unisim_VPKG.vhd"
41ghdl -a --ieee=synopsys --work=unisim unisim_VPKG.vhd
42 
43for file in `find unisim_vital_chop -name "*.vhd"`
44do
45  echo "# ghdl ... $file"
46  ghdl -a -fexplicit --ieee=synopsys --work=unisim 2>&1 $file |\
47      tee $file.ghdl.log
48done
49#
50echo "--- scan for compilation errors:"
51find unisim_vital_chop -name "*.ghdl.log" | xargs grep error
52#
53

Archive Download this file

Branches:
master



interactive