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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [bin/] [xviv_ghdl_unisim] - Blame information for rev 33

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 29 wfjm
#!/bin/bash
2
# $Id: xviv_ghdl_unisim 642 2015-02-06 18:53:12Z mueller $
3
#
4
# Copyright 2015- by Walter F.J. Mueller 
5
# License disclaimer see LICENSE_gpl_v2.txt in $RETROBASE directory
6
#
7
#  Revision History:
8
# Date         Rev  Vers    Comment
9
# 2015-02-02   642   1.0    Initial version
10
#
11
 
12
if [ -z "$XTWV_PATH" ]
13
then
14
  echo "XTWV_PATH not defined"
15
  exit 1
16
fi
17
if [ ! -d "$XTWV_PATH" ]
18
then
19
  echo "$XTWV_PATH not existing"
20
  exit 1
21
fi
22
#
23
cd $XTWV_PATH
24
echo "============================================================"
25
echo "* Build ghdl UNISIM lib for $XTWV_PATH"
26
echo "============================================================"
27
#
28
if [ ! -d ghdl ]
29
then
30
  mkdir ghdl
31
fi
32
cd ghdl
33
#
34
if [ ! -d unisim  ]
35
then
36
  mkdir unisim
37
fi
38
cd unisim
39
#
40
# copy VCOMP and VPKG ----------------------------
41
#
42
cp $XTWV_PATH/data/vhdl/src/unisims/unisim_retarget_VCOMP.vhd .
43
cp $XTWV_PATH/data/vhdl/src/unisims/unisim_VPKG.vhd .
44
#
45
# copy 'primitive' models ------------------------
46
#
47
if [ ! -d primitive ]
48
then
49
  mkdir primitive
50
fi
51
pushd primitive
52
#
53
cp -p $XTWV_PATH/data/vhdl/src/unisims/primitive/*.vhd .
54
cp -p $XTWV_PATH/data/vhdl/src/unisims/primitive/vhdl_analyze_order .
55
# in Vivado 2014.4 the vhdl_analyze_order and contains two extraneous entries
56
# simply drop them to avoid errors later on
57
sed -i.bak -e '\|OBUFTDSE3| d' \
58
           -e '\|OBUFTE3| d' \
59
    vhdl_analyze_order
60
#
61
xilinx_vhdl_memcolltype_fix
62
popd
63
#
64
# copy 'retarget' models -------------------------
65
#
66
if [ ! -d retarget ]
67
then
68
  mkdir retarget
69
fi
70
pushd retarget
71
#
72
cp -p $XTWV_PATH/data/vhdl/src/unisims/retarget/*.vhd .
73
ls -1 *.vhd > vhdl_analyze_order
74
#
75
xilinx_vhdl_memcolltype_fix
76
popd
77
#
78
# now compile all --------------------------------
79
#
80
echo "# ghdl ... unisim_retarget_VCOMP.vhd"
81
ghdl -a --ieee=synopsys --work=unisim unisim_retarget_VCOMP.vhd
82
echo "# ghdl ... unisim_VPKG.vhd"
83
ghdl -a --ieee=synopsys --work=unisim unisim_VPKG.vhd
84
 
85
for file in `cat primitive/vhdl_analyze_order`
86
do
87
  echo "# ghdl ... primitive/$file"
88
  ghdl -a -fexplicit --ieee=synopsys --work=unisim \
89
      --no-vital-checks primitive/$file 2>&1 |\
90
      tee primitive/$file.ghdl.log
91
done
92
#
93
for file in `cat retarget/vhdl_analyze_order`
94
do
95
  echo "# ghdl ... retarget/$file"
96
  ghdl -a -fexplicit --ieee=synopsys --work=unisim \
97
      --no-vital-checks retarget/$file 2>&1 |\
98
      tee retarget/$file.ghdl.log
99
done
100
#
101
echo "--- scan for compilation errors:"
102
find primitive retarget -name "*.ghdl.log" | xargs grep error
103
#
104
#
105
echo "============================================================"
106
echo "* Build ghdl UNIMACRO lib for $XTWV_PATH"
107
echo "============================================================"
108
#
109
cd $XTWV_PATH/ghdl
110
if [ ! -d unimacro  ]
111
then
112
  mkdir unimacro
113
fi
114
cd unimacro
115
#
116
cp $XTWV_PATH/data/vhdl/src/unimacro/*.vhd .
117
#
118
for file in *.vhd
119
do
120
  echo "# ghdl ... $file"
121
  ghdl -a -P../unisim -fexplicit --ieee=synopsys --work=unimacro \
122
      --no-vital-checks $file 2>&1 | tee $file.ghdl.log
123
done
124
#
125
echo "--- scan for compilation errors:"
126
find . -name "*.ghdl.log" | xargs grep error
127
#

powered by: WebSVN 2.1.0

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