aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTom Verbeure <tom_verbeure@yahoo.com>2016-08-29 23:22:53 -0700
committerTom Verbeure <tom_verbeure@yahoo.com>2016-08-29 23:22:53 -0700
commit248560c18d32bb11d73a9ecfb448581af6930c0c (patch)
treea64354d20297ccd4130a40d78e7977aaabdd97d7 /scripts
parent71a46afa791a642bd8de012f1c0b236d6066ab05 (diff)
downloadpicorv32-248560c18d32bb11d73a9ecfb448581af6930c0c.tar.gz
picorv32-248560c18d32bb11d73a9ecfb448581af6930c0c.zip
table.txt generation works
Diffstat (limited to 'scripts')
-rw-r--r--scripts/quartus/Makefile2
-rw-r--r--scripts/quartus/table.sh8
-rw-r--r--scripts/quartus/tabtest.sh44
3 files changed, 27 insertions, 27 deletions
diff --git a/scripts/quartus/Makefile b/scripts/quartus/Makefile
index ab9357a..31f26cd 100644
--- a/scripts/quartus/Makefile
+++ b/scripts/quartus/Makefile
@@ -48,6 +48,8 @@ area: synth_area_small synth_area_regular synth_area_large
-grep -B4 -A10 'Slice LUTs' synth_area_small.log synth_area_regular.log synth_area_large.log
table.txt: tab_small_ep4ce_c7/results.txt
+table.txt: tab_small_ep4cgx_c7/results.txt
+table.txt: tab_small_5cgx_c7/results.txt
table.txt:
bash table.sh > table.txt
diff --git a/scripts/quartus/table.sh b/scripts/quartus/table.sh
index f81f586..f5e6efe 100644
--- a/scripts/quartus/table.sh
+++ b/scripts/quartus/table.sh
@@ -8,11 +8,9 @@ for x in $( grep -H . tab_*/results.txt )
do
read _ size device grade _ speed < <( echo "$x" | tr _/: ' ' )
case "$device" in
- xc7a) d="Xilinx Artix-7T" ;;
- xc7k) d="Xilinx Kintex-7T" ;;
- xc7v) d="Xilinx Virtex-7T" ;;
- xcku) d="Xilinx Kintex UltraScale" ;;
- xcvu) d="Xilinx Virtex UltraScale" ;;
+ ep4ce) d="Altera Cyclone IV E" ;;
+ ep4cgx) d="Altera Cyclone IV GX" ;;
+ 5cgx) d="Altera Cyclone V GX" ;;
esac
speedtxt=$( printf '%s.%s ns (%d MHz)' ${speed%?} ${speed#?} $((10000 / speed)) )
printf '| %-25s | %-10s | %20s |\n' "$d" "-$grade" "$speedtxt"
diff --git a/scripts/quartus/tabtest.sh b/scripts/quartus/tabtest.sh
index 2695368..ad8cf10 100644
--- a/scripts/quartus/tabtest.sh
+++ b/scripts/quartus/tabtest.sh
@@ -7,9 +7,9 @@ read _ ip dev grade _ < <( echo $* | tr '_/' ' '; )
mkdir -p tab_${ip}_${dev}_${grade}
cd tab_${ip}_${dev}_${grade}
+max_speed=99
+min_speed=01
best_speed=99
-speed=30
-step=16
synth_case() {
if [ -f test_${1}.txt ]; then
@@ -18,7 +18,9 @@ synth_case() {
fi
case "${dev}" in
- ep4ce) al_device="ep4ce30f23${grade}" ;;
+ ep4ce) al_device="ep4ce30f23${grade}" ;;
+ ep4cgx) al_device="ep4cgx50df27${grade}" ;;
+ 5cgx) al_device="5cgxbc9c6f23${grade}" ;;
esac
cat > test_${1}.qsf <<- EOT
@@ -36,39 +38,37 @@ set_global_assignment -name SDC_FILE test_${1}.sdc
echo "Running tab_${ip}_${dev}_${grade}/test_${1}.."
- quartus_map test_${1}
- quartus_fit --read_settings_files=off --write_settings_files=off test_${1} -c test_${1}
+ if ! quartus_map test_${1}; then
+ exit 1
+ fi
+ if ! quartus_fit --read_settings_files=off --write_settings_files=off test_${1} -c test_${1}; then
+ exit 1
+ fi
+ if ! quartus_sta test_${1} -c test_${1}; then
+ exit 1
+ fi
-# if ! $VIVADO -nojournal -log test_${1}.log -mode batch -source test_${1}.tcl > /dev/null 2>&1; then
-# cat test_${1}.log
-# exit 1
-# fi
-# mv test_${1}.log test_${1}.txt
+ cp output_files/test_${1}.sta.summary test_${1}.txt
}
-countdown=2
+countdown=6
while [ $countdown -gt 0 ]; do
+ speed=$(((max_speed+min_speed)/2))
synth_case $speed
- if grep -q '^Slack.*(VIOLATED)' test_${speed}.txt; then
+ if grep -q '^Slack : -' test_${speed}.txt; then
echo " tab_${ip}_${dev}_${grade}/test_${speed} VIOLATED"
- [ $speed -eq 38 ] || step=$((step / 2))
- speed=$((speed + step))
- elif grep -q '^Slack.*(MET)' test_${speed}.txt; then
+ min_speed=$((speed))
+ elif grep -q '^Slack : [^-]' test_${speed}.txt; then
echo " tab_${ip}_${dev}_${grade}/test_${speed} MET"
[ $speed -lt $best_speed ] && best_speed=$speed
- step=$((step / 2))
- speed=$((speed - step))
+ max_speed=$((speed))
else
echo "ERROR: No slack line found in $PWD/test_${speed}.txt!"
exit 1
fi
- if [ $step -eq 0 ]; then
- countdown=$((countdown - 1))
- speed=$((best_speed - 2))
- step=1
- fi
+ countdown=$((countdown-1))
done
echo "-----------------------"