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

Subversion Repositories axi4_tlm_bfm

[/] [axi4_tlm_bfm/] [trunk/] [workspace/] [simulation/] [questa/] [simulate.sh] - Blame information for rev 29

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 29 daniel.kho
#!/bin/bash
2
#
3
#       Example bash script for Mentor Graphics QuestaSim/ModelSim simulation.
4
#
5
#       Author(s):
6
#       - Daniel C.K. Kho, daniel.kho@opencores.org | daniel.kho@tauhop.com
7
#
8
#       Copyright (C) 2012-2013 Authors and OPENCORES.ORG
9
#
10
# This program is free software: you can redistribute it and/or modify
11
# it under the terms of the GNU General Public License as published by
12
# the Free Software Foundation, either version 3 of the License, or
13
# (at your option) any later version.
14
#
15
# This program is distributed in the hope that it will be useful,
16
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
# GNU General Public License for more details.
19
#
20
# You should have received a copy of the GNU General Public License
21
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
#
23
# This notice and disclaimer must be retained as part of this text at all times.
24
#
25
#       @dependencies:
26
#       @designer: Daniel C.K. Kho [daniel.kho@gmail.com] | [daniel.kho@tauhop.com]
27
#       @history: @see Mercurial log for full list of changes.
28
#
29
#       @Description:
30
#
31
 
32
#read -p "press Enter to run full simulation now, or Ctrl-C to exit: ";
33
echo $(date "+[%Y-%m-%d %H:%M:%S]: Removing previously-generated files and folders...");
34
rm -rf modelsim.ini ./simulate.log ./work ./altera ./osvvm ./tauhop;
35
 
36
echo $(date "+[%Y-%m-%d %H:%M:%S]: Remove successful.");
37
echo $(date "+[%Y-%m-%d %H:%M:%S]: Compiling project...");
38
vlib work; vmap work work;
39
vlib osvvm; vmap osvvm osvvm;
40
vlib tauhop; vmap tauhop tauhop;
41
 
42
vcom -2008 -work osvvm ../../../rtl/packages/os-vvm/SortListPkg_int.vhd \
43
        ../../../rtl/packages/os-vvm/RandomBasePkg.vhd \
44
        ../../../rtl/packages/os-vvm/RandomPkg.vhd \
45
        ../../../rtl/packages/os-vvm/CoveragePkg.vhd \
46
        | tee -ai ./simulate.log;
47
 
48
vcom -2008 -work tauhop ../../../rtl/packages/pkg-tlm.vhdl \
49
        ../../../rtl/packages/pkg-axi-tlm.vhdl \
50
        ../../../rtl/packages/pkg-types.vhdl \
51
        ../../../rtl/axi4-stream-bfm-master.vhdl \
52
        ../../../tester/stimuli/galois-lfsr.vhdl \
53
        ../../../tester/stimuli/prbs-31.vhdl \
54
        | tee -ai ./simulate.log;
55
 
56
vcom -2008 -work work ../../../tester/tester.vhdl \
57
        ../../../rtl/user.vhdl \
58
        | tee -ai ./simulate.log;
59
 
60
errorStr=`grep "\*\* Error: " ./simulate.log`
61
if [ `echo ${#errorStr}` -gt 0 ]
62
then echo "Errors exist. Refer simulate.log for more details. Exiting."; exit;
63
else
64
        vsim -t ps -do ./waves.do -voptargs="+acc" "work.user(rtl)";
65
        echo $(date "+[%Y-%m-%d %H:%M:%S]: simulation loaded.");
66
fi

powered by: WebSVN 2.1.0

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