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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [bin/] [xise_ghdl_unisim] - Diff between revs 22 and 29

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 22 Rev 29
Line 1... Line 1...
#!/bin/sh
#!/bin/bash
# $Id: xilinx_ghdl_unisim 547 2013-12-29 13:10:07Z mueller $
# $Id: xise_ghdl_unisim 642 2015-02-06 18:53:12Z mueller $
 
#
 
# Copyright 2007-2015 by Walter F.J. Mueller 
 
# License disclaimer see LICENSE_gpl_v2.txt in $RETROBASE directory
#
#
#  Revision History:
#  Revision History:
# Date         Rev  Vers    Comment
# Date         Rev  Vers    Comment
 
# 2015-02-03   642   1.3    remove ISE 10 legacy support; add unimacro support
 
# 2015-01-29   639   1.2    rename from xilinx_*; use XTWI_PATH rather XILINX
# 2009-11-08   248   1.1    adopt to ISE 11.1, use VITAL models from ./primitive
# 2009-11-08   248   1.1    adopt to ISE 11.1, use VITAL models from ./primitive
# 2007-10-26    92   1.0    Initial version
# 2007-10-26    92   1.0    Initial version
#
#
 
 
if [ -z "$XILINX" ]
if [ -z "$XTWI_PATH" ]
 
then
 
  echo "XTWI_PATH not defined"
 
  exit 1
 
fi
 
if [ ! -d "$XTWI_PATH/ISE_DS/ISE" ]
then
then
  echo "XILINX not defined"
  echo "$XTWI_PATH/ISE_DS/ISE not existing"
  exit 1
  exit 1
fi
fi
#
#
cd $XILINX
ise_path=$XTWI_PATH/ISE_DS/ISE
 
#
 
cd $ise_path
echo "============================================================"
echo "============================================================"
echo "* Build ghdl UNISIM libs for $XILINX"
echo "* Build ghdl UNISIM lib for $ise_path"
echo "============================================================"
echo "============================================================"
#
#
if [ ! -d ghdl ]
if [ ! -d ghdl ]
then
then
  mkdir ghdl
  mkdir ghdl
fi
fi
 
cd ghdl
#
#
cd $XILINX/ghdl
 
if [ ! -d unisim  ]
if [ ! -d unisim  ]
then
then
  mkdir unisim
  mkdir unisim
fi
fi
 
cd unisim
#
#
cd $XILINX/ghdl/unisim
cp $ise_path/vhdl/src/unisims/unisim_VCOMP.vhd .
cp $XILINX/vhdl/src/unisims/unisim_VCOMP.vhd .
cp $ise_path/vhdl/src/unisims/unisim_VPKG.vhd .
cp $XILINX/vhdl/src/unisims/unisim_VPKG.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 ]
if [ ! -d primitive ]
then
then
  mkdir primitive
  mkdir primitive
fi
fi
cd primitive
pushd primitive
#
#
if [ -d $XILINX/vhdl/src/unisims/primitive ]
cp -p $ise_path/vhdl/src/unisims/primitive/*.vhd .
then
cp -p $ise_path/vhdl/src/unisims/primitive/vhdl_analyze_order .
  cp -p $XILINX/vhdl/src/unisims/primitive/*.vhd .
 
  cp -p $XILINX/vhdl/src/unisims/primitive/vhdl_analyze_order .
 
else
 
  xilinx_vhdl_chop $XILINX/vhdl/src/unisims/unisim_VITAL.vhd
 
  find . -maxdepth 1 -name "*.vhd" | perl -p -e 's|\./||' > vhdl_analyze_order
 
fi
 
#
#
xilinx_vhdl_memcolltype_fix
xilinx_vhdl_memcolltype_fix
#
popd
cd ..
 
echo "# ghdl ... unisim_VCOMP.vhd"
echo "# ghdl ... unisim_VCOMP.vhd"
ghdl -a --ieee=synopsys --work=unisim unisim_VCOMP.vhd
ghdl -a --ieee=synopsys --work=unisim unisim_VCOMP.vhd
echo "# ghdl ... unisim_VPKG.vhd"
echo "# ghdl ... unisim_VPKG.vhd"
ghdl -a --ieee=synopsys --work=unisim unisim_VPKG.vhd
ghdl -a --ieee=synopsys --work=unisim unisim_VPKG.vhd
 
 
Line 70... Line 71...
done
done
#
#
echo "--- scan for compilation errors:"
echo "--- scan for compilation errors:"
find primitive -name "*.ghdl.log" | xargs grep error
find primitive -name "*.ghdl.log" | xargs grep error
#
#
 
echo "============================================================"
 
echo "* Build ghdl UNIMACRO lib for $XTWI_PATH/ISE_DS/ISE"
 
echo "============================================================"
 
#
 
cd $ise_path/ghdl
 
if [ ! -d unimacro  ]
 
then
 
  mkdir unimacro
 
fi
 
#
 
cd unimacro
 
cp $ise_path/vhdl/src/unimacro/*.vhd .
 
#
 
for file in *.vhd
 
do
 
  echo "# ghdl ... $file"
 
  ghdl -a -P../unisim -fexplicit --ieee=synopsys --work=unimacro \
 
      --no-vital-checks $file 2>&1 | tee $file.ghdl.log
 
done
 
#
 
echo "--- scan for compilation errors:"
 
find . -name "*.ghdl.log" | xargs grep error
 
#

powered by: WebSVN 2.1.0

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