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

Subversion Repositories radiohdl

[/] [radiohdl/] [trunk/] [quartus/] [quartus_fmax.sh] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 danv
#!/bin/bash -eu
2
###############################################################################
3
#
4
# Copyright (C) 2015
5
# ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
6
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
7
#
8
# This program is free software: you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation, either version 3 of the License, or
11
# (at your option) any later version.
12
#
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
# GNU General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License
19
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
#
21
###############################################################################
22
 
23
# Purpose:
24
# . Extract fMax from Timequest report file
25
# Usage:
26
# . $ quartus_fmax [project].sta.rpt [clk]
27
# . [clk] is the full path of the clock of interest; copy/paste this from Timequest GUI.
28
 
29
 
30
if [ ! -z $1 ]; then
31
    # $1 was given
32
    RPT_FILE=$1
33
else
34
    : # $1 was not given
35
    echo 'Pass a .sta.rpt file as first argument.'
36
    exit 1
37
fi
38
 
39
if [ ! -z $2 ]; then
40
    : # $2 was given
41
    CLK=$2
42
else
43
    : # $2 was not given
44
    echo 'Pass (part of) the clock path as second argument.'
45
    exit 1
46
fi
47
 
48
 
49
 
50
 
51
nof_clk=`awk '/; Slow 900mV 85C Model Fmax Summary/,/This panel reports FMAX/' $RPT_FILE | grep -c $CLK`
52
 
53
if [ $nof_clk = 0 ]; then
54
    echo 'Clock not found; check provided clock path'
55
    exit 1
56
elif [ $nof_clk -gt 1 ]; then
57
    echo 'Multiple clocks found; check provided clock path.'
58
    exit 1
59
else
60
    # Good; only one clock found mathing user passed clk path.
61
    awk '/; Slow 900mV 85C Model Fmax Summary/,/This panel reports FMAX/' $RPT_FILE | grep $CLK | cut -d';' -f2
62
fi
63
 
64
 

powered by: WebSVN 2.1.0

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