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

Subversion Repositories fir_wishbone

[/] [fir_wishbone/] [trunk/] [workspaces/] [synthesis/] [quartus/] [synthesise.sh] - Blame information for rev 16

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 15 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
echo $(date "+[%Y-%m-%d %H:%M:%S]: Removing previously-generated files and folders...");
34
cd $1;
35
rm -rf ./synthesise.log ./db ./incremental_db;
36
 
37
# Compile top-level design.
38
quartus_sh --flow compile fir | tee -ai ./synthesise.log;
39
 
40
error=false;
41
 
42
errorStr=`grep 'Error (' ./synthesise.log`
43
if [ `echo ${#errorStr}` -gt 0 ]
44
then
45
        echo ${errorStr};
46
        error=true;
47
fi
48
 
49
errorStr=`grep 'Error (' ./output_files/*.rpt`
50
if [ `echo ${#errorStr}` -gt 0 ]
51
then
52
        echo ${errorStr};
53
        error=true;
54
fi
55
 
56
if [ $error == 'true' ]
57
then
58
        echo "Build error(s) exist. Refer to report files in the output_files directory for more details. Exiting."; exit;
59
else
60
        echo $(date "+[%Y-%m-%d %H:%M:%S]: Configuring device...");
61 16 daniel.kho
        quartus_pgm -c 'USB-Blaster [1-1.1]' -m jtag -o 'p;./output_files/fir.sof' | tee -ai ./synthesise.log;
62 15 daniel.kho
fi
63
 
64
errorStr=`grep 'Error (' ./synthesise.log`
65
if [ `echo ${#errorStr}` -gt 0 ]
66
then
67
#       echo ${errorStr};
68
        error=true;
69
fi
70
 
71
errorStr=`grep 'Error (' ./output_files/*.rpt`
72
if [ `echo ${#errorStr}` -gt 0 ]
73
then
74
        echo ${errorStr};
75
        error=true;
76
fi
77
 
78
if [ $error == 'true' ]
79
then echo "Configuration error(s) exist. Refer to report files in the output_files directory for more details. Exiting."; exit;
80
else
81
        echo $(date "+[%Y-%m-%d %H:%M:%S]: Loading waveform session...");
82
#       quartus_stpw ./waves-spi.stp &
83
fi

powered by: WebSVN 2.1.0

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