#!/bin/sh # $Id: xilinx_ghdl_simprim 248 2009-11-08 22:51:38Z mueller $ # # Revision History: # 2009-11-08 248 1.1 adopt to ISE 11.1, use VITAL models from ./primitive # 2007-10-26 92 1.0 Initial version # if [ -z "$XILINX" ] then echo "XILINX not defined" exit 1 fi # cd $XILINX echo "============================================================" echo "* Build ghdl SIMPRIM libs for $XILINX" echo "============================================================" # if [ ! -d ghdl ] then mkdir ghdl fi # cd $XILINX/ghdl if [ ! -d simprim ] then mkdir simprim fi # cd $XILINX/ghdl/simprim cp $XILINX/vhdl/src/simprims/simprim_Vcomponents.vhd . cp $XILINX/vhdl/src/simprims/simprim_Vpackage.vhd . # # for ISE 11.1 the VITAL models are individually in sub-dir primitives # and vhdl_analyze_order is a file with best compilation order # for ISE 10 and before all VITAL models are in one concatenetaed file # in this case xilinx_vhdl_chop will chop this into individual model files # if [ ! -d primitive ] then mkdir primitive fi cd primitive # if [ -d $XILINX/vhdl/src/simprims/primitive ] then cp -p $XILINX/vhdl/src/simprims/primitive/other/*.vhd . cp -p $XILINX/vhdl/src/simprims/primitive/other/vhdl_analyze_order . else xilinx_vhdl_chop $XILINX/vhdl/src/simprims/simprim_VITAL.vhd find . -maxdepth 1 -name "*.vhd" | perl -p -e 's|\./||' > vhdl_analyze_order fi # xilinx_vhdl_memcolltype_fix # cd .. echo "# ghdl ... simprim_Vcomponents.vhd" ghdl -a --ieee=synopsys --work=simprim --no-vital-checks simprim_Vcomponents.vhd echo "# ghdl ... simprim_Vpackage.vhd" ghdl -a --ieee=synopsys --work=simprim --no-vital-checks simprim_Vpackage.vhd for file in `cat primitive/vhdl_analyze_order` do echo "# ghdl ... primitive/$file" ghdl -a -fexplicit --ieee=synopsys --work=simprim \ --no-vital-checks primitive/$file 2>&1 |\ tee primitive/$file.ghdl.log done # echo "--- scan for compilation errors:" find primitive -name "*.ghdl.log" | xargs grep error #