OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [bin/] [xilinx_ghdl_simprim] - Rev 24

Compare with Previous | Blame | View Log

#!/bin/sh
# $Id: xilinx_ghdl_simprim 547 2013-12-29 13:10:07Z mueller $
#
#  Revision History:
# Date         Rev  Vers    Comment
# 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
#

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.