Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
882d966b
Commit
882d966b
authored
9 years ago
by
Daniel van der Schuur
Browse files
Options
Downloads
Patches
Plain Diff
-Added seed option to run_qcomp;
-Added fmax extraction.
parent
54340441
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/quartus/quartus_fmax.sh
+68
-0
68 additions, 0 deletions
tools/quartus/quartus_fmax.sh
tools/quartus/run_qcomp
+37
-5
37 additions, 5 deletions
tools/quartus/run_qcomp
with
105 additions
and
5 deletions
tools/quartus/quartus_fmax.sh
0 → 100755
+
68
−
0
View file @
882d966b
#!/bin/bash
###############################################################################
#
# Copyright (C) 2015
# ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
# Purpose:
# . Extract fMax from Timequest report file
# Usage:
# . $ quartus_fmax [project].sta.rpt [clk]
# . [clk] is the full path of the clock of interest; copy/paste this from Timequest GUI.
if
[
!
-z
$1
]
then
# $1 was given
RPT_FILE
=
$1
else
:
# $1 was not given
echo
'Pass a .sta.rpt file as first argument.'
exit
1
fi
if
[
!
-z
$2
]
then
:
# $2 was given
CLK
=
$2
else
:
# $2 was not given
echo
'Pass (part of) the clock path as second argument.'
exit
1
fi
nof_clk
=
`
awk
'/; Slow 900mV 85C Model Fmax Summary/,/This panel reports FMAX/'
$RPT_FILE
|
grep
-c
$CLK
`
if
[
$nof_clk
=
0
]
then
echo
'Clock not found; check provided clock path'
exit
1
elif
[
$nof_clk
-gt
1
]
then
echo
'Multiple clocks found; check provided clock path.'
exit
1
else
# Good; only one clock found mathing user passed clk path.
awk
'/; Slow 900mV 85C Model Fmax Summary/,/This panel reports FMAX/'
$RPT_FILE
|
grep
$CLK
|
cut
-d
';'
-f2
fi
This diff is collapsed.
Click to expand it.
tools/quartus/run_qcomp
+
37
−
5
View file @
882d966b
...
@@ -55,6 +55,7 @@ shift # shift left commandline args: $2 becomes $1 ... ($0 is untouched)
...
@@ -55,6 +55,7 @@ shift # shift left commandline args: $2 becomes $1 ... ($0 is untouched)
project
=
project
=
rev
=
rev
=
SEED
=
1
SEED
=
1
CLK
=
os
=
os
=
# parse cmdline
# parse cmdline
for
arg
;
do
for
arg
;
do
...
@@ -74,6 +75,12 @@ for arg ; do
...
@@ -74,6 +75,12 @@ for arg ; do
seed
=
*
)
seed
=
*
)
SEED
=
`
echo
${
arg
}
|
sed
's/^seed=//'
`
SEED
=
`
echo
${
arg
}
|
sed
's/^seed=//'
`
;;
;;
--clk
=
*
)
CLK
=
`
echo
${
arg
}
|
sed
's/^--clk=//'
`
;;
clk
=
*
)
CLK
=
`
echo
${
arg
}
|
sed
's/^clk=//'
`
;;
*
=
*
)
*
=
*
)
# it was an option. skip it - if we wanted to,
# it was an option. skip it - if we wanted to,
# we could process them over here
# we could process them over here
...
@@ -127,9 +134,34 @@ else
...
@@ -127,9 +134,34 @@ else
mem_width
=
mem_width
=
fi
fi
#for i in $(seq $SEED); do echo $i; done
for
i
in
$(
echo
$SEED
|
sed
"s/,/ /g"
)
do
# Add the seed value to the QSF. We can simply append it because Quartus removes previous (duplicate) assignments.
# Add the seed value to the QSF. We can simply append it because Quartus removes previous (duplicate) assignments.
unb_info
$0
"Adding fitter seed value of
${
SEED
}
to
${
project_rev
}
.qsf"
unb_info
$0
"Adding fitter seed value of
${
i
}
to
${
project_rev
}
.qsf"
echo
-e
"set_global_assignment -name SEED
${
SEED
}
\n
"
>>
${
quartusdir
}
/
${
project_rev
}
.qsf
echo
-e
"set_global_assignment -name SEED
${
i
}
\n
"
>>
${
quartusdir
}
/
${
project_rev
}
.qsf
unb_info
$0
"Performing full compile of project
${
project_rev
}
"
unb_info
$0
"Performing full compile of project
${
project_rev
}
"
quartus_sh
$mem_width
--flow
compile
${
project_rev
}
quartus_sh
$mem_width
--flow
compile
${
project_rev
}
if
[
$?
-eq
0
]
then
unb_info
$0
"Full compile successful."
else
unb_error
$0
"Full compile failed."
fi
if
[
-z
"
${
CLK
}
"
]
then
:
else
fmax_str
=
`
quartus_fmax.sh
${
quartusdir
}
/
${
project_rev
}
.sta.rpt
$CLK
`
fmax
=
`
echo
$fmax_str
|
cut
-f1
-d
"."
|
sed
's/[^0-9]//g'
`
unb_info
$0
"fMax of
${
CLK
}
:
${
fmax
}
MHz"
cp
-r
${
quartusdir
}
${
quartusdir
}
_
${
fmax
}
MHz
fi
done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment