1 |
30 |
daniel.kho |
#!/bin/bash
|
2 |
|
|
#
|
3 |
|
|
# Example bash script for Quartus synthesis, place-and-route, and design
|
4 |
|
|
# assembly.
|
5 |
|
|
#
|
6 |
|
|
# Author(s):
|
7 |
|
|
# - Daniel C.K. Kho, daniel.kho@opencores.org | daniel.kho@tauhop.com
|
8 |
|
|
#
|
9 |
|
|
# Copyright (C) 2012-2013 Authors and OPENCORES.ORG
|
10 |
|
|
#
|
11 |
|
|
# This program is free software: you can redistribute it and/or modify
|
12 |
|
|
# it under the terms of the GNU General Public License as published by
|
13 |
|
|
# the Free Software Foundation, either version 3 of the License, or
|
14 |
|
|
# (at your option) any later version.
|
15 |
|
|
#
|
16 |
|
|
# This program is distributed in the hope that it will be useful,
|
17 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19 |
|
|
# GNU General Public License for more details.
|
20 |
|
|
#
|
21 |
|
|
# You should have received a copy of the GNU General Public License
|
22 |
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
23 |
|
|
#
|
24 |
|
|
# This notice and disclaimer must be retained as part of this text at all times.
|
25 |
|
|
#
|
26 |
|
|
# @dependencies:
|
27 |
|
|
# @designer: Daniel C.K. Kho [daniel.kho@gmail.com] | [daniel.kho@tauhop.com]
|
28 |
|
|
# @history: @see Mercurial log for full list of changes.
|
29 |
|
|
#
|
30 |
|
|
# @Description:
|
31 |
|
|
#
|
32 |
|
|
|
33 |
|
|
quartus_sh --flow compile axi4-tlm;
|
34 |
|
|
|
35 |
|
|
errorStr=`grep 'Error (' ./output_files/*.rpt`
|
36 |
|
|
if [ `echo ${#errorStr}` -gt 0 ]
|
37 |
|
|
then echo "Build error(s) exist. Refer to report files in the output_files directory for more details. Exiting."; exit;
|
38 |
|
|
else
|
39 |
|
|
echo $(date "+[%Y-%m-%d %H:%M:%S]: Configuring device...");
|
40 |
|
|
quartus_pgm -c 'USB-Blaster [1-1.1]' -m jtag -o 'p;./output_files/axi4-tlm.sof';
|
41 |
|
|
|
42 |
|
|
fi
|
43 |
|
|
|
44 |
|
|
errorStr=`grep 'Error (' ./output_files/*.rpt`
|
45 |
|
|
if [ `echo ${#errorStr}` -gt 0 ]
|
46 |
|
|
then echo "Configuration error(s) exist. Refer to report files in the output_files directory for more details. Exiting."; exit;
|
47 |
|
|
else
|
48 |
|
|
echo $(date "+[%Y-%m-%d %H:%M:%S]: Loading waveform session...");
|
49 |
|
|
quartus_stpw ./waves.stp &
|
50 |
|
|
fi
|