1 |
145 |
lanttu |
#!/bin/sh
|
2 |
|
|
#
|
3 |
|
|
# This script compiles all the needed source file and
|
4 |
|
|
# creates a makeifle for also
|
5 |
|
|
#
|
6 |
|
|
# Environment variables
|
7 |
|
|
# TMP_DIR kertoo mihin hakemistoon kaannetyt fiilut laitetaan.
|
8 |
|
|
#
|
9 |
|
|
# Erno Salminen, 2010
|
10 |
|
|
|
11 |
|
|
clear
|
12 |
|
|
|
13 |
|
|
if test -z $TMP_DIR
|
14 |
|
|
then
|
15 |
|
|
echo "Env variable TMP_DIR, which defines the location of Modelsim's work dir, is not set"
|
16 |
|
|
echo "->Exit"
|
17 |
|
|
exit
|
18 |
|
|
fi
|
19 |
|
|
|
20 |
|
|
mkdir $TMP_DIR
|
21 |
|
|
|
22 |
|
|
echo "Removing old vhdl library "
|
23 |
|
|
rm -rf $TMP_DIR/codelib
|
24 |
|
|
|
25 |
|
|
echo; echo "Creating a new library at"
|
26 |
|
|
echo $TMP_DIR; echo
|
27 |
|
|
|
28 |
|
|
# Create and map library
|
29 |
|
|
vlib $TMP_DIR/codelib
|
30 |
|
|
vmap work $TMP_DIR/codelib
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
echo; echo "Compiling HIBI network"; echo
|
34 |
|
|
|
35 |
|
|
vcom -quiet -check_synthesis -pedanticerrors ../../../../ip.hwp.storage/fifos/fifo/1.0/vhd/fifo.vhd
|
36 |
|
|
vcom -quiet -check_synthesis -pedanticerrors ../../../../ip.hwp.storage/fifos/multiclk_fifo/1.0/vhd/multiclk_fifo.vhd
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
HIBI_DIR="../../../hibi/3.0/vhd"
|
40 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/hibiv3_pkg.vhd
|
41 |
|
|
|
42 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/addr_decoder.vhd
|
43 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/addr_data_demux_read.vhd
|
44 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/addr_data_mux_write.vhd
|
45 |
|
|
|
46 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/cfg_init_pkg.vhd
|
47 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/cfg_mem.vhd
|
48 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/dyn_arb.vhd
|
49 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/lfsr.vhd
|
50 |
|
|
|
51 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/double_fifo_demux_wr.vhd
|
52 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/double_fifo_mux_rd.vhd
|
53 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/fifo_mux_rd.vhd
|
54 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/fifo_demux_wr.vhd
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/rx_control.vhd
|
58 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/tx_control.vhd
|
59 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/receiver.vhd
|
60 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/transmitter.vhd
|
61 |
|
|
|
62 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/hibi_wrapper_r1.vhd
|
63 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $HIBI_DIR/hibi_wrapper_r4.vhd
|
64 |
|
|
|
65 |
|
|
echo
|
66 |
|
|
echo "Compile basic tester component"
|
67 |
|
|
TESTER_DIR="../vhd"
|
68 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $TESTER_DIR/txt_util.vhd
|
69 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $TESTER_DIR/basic_tester_pkg.vhd
|
70 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $TESTER_DIR/basic_tester_rx.vhd
|
71 |
|
|
vcom -quiet -check_synthesis -pedanticerrors $TESTER_DIR/basic_tester_tx.vhd
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
echo; echo "Compiling vhdl testbench";echo
|
76 |
|
|
vcom -quiet ../tb/tb_basic_tester.vhd
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
echo;echo "Creating a new makefile"
|
80 |
|
|
rm -f makefile.vhd
|
81 |
|
|
vmake $TMP_DIR/codelib > makefile.vhd
|
82 |
|
|
|
83 |
|
|
echo "To simulate, run"
|
84 |
|
|
echo " vsim -novopt work.tb_basic_tester &"
|
85 |
|
|
echo ""
|
86 |
|
|
echo " --compile all is done-- "
|