summaryrefslogtreecommitdiffstats
path: root/scripts/quartus/table.sh
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-11-24 18:49:44 +0000
committerYann Herklotz <git@yannherklotz.com>2022-11-24 18:49:44 +0000
commit3291d86ec38031e191ec1e7e5e8ddfa74b77cb7c (patch)
tree7d604206a2deb29c9f097ff1f3b7de78f44b34a3 /scripts/quartus/table.sh
downloadbutterstick-3291d86ec38031e191ec1e7e5e8ddfa74b77cb7c.tar.gz
butterstick-3291d86ec38031e191ec1e7e5e8ddfa74b77cb7c.zip
Squashed 'picorv32/' content from commit f00a88c
git-subtree-dir: picorv32 git-subtree-split: f00a88c36eaab478b64ee27d8162e421049bcc66
Diffstat (limited to 'scripts/quartus/table.sh')
-rw-r--r--scripts/quartus/table.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/quartus/table.sh b/scripts/quartus/table.sh
new file mode 100644
index 0000000..f5e6efe
--- /dev/null
+++ b/scripts/quartus/table.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+dashes="----------------------------------------------------------------"
+printf '| %-25s | %-10s | %-20s |\n' "Device" "Speedgrade" "Clock Period (Freq.)"
+printf '|:%.25s |:%.10s:| %.20s:|\n' $dashes $dashes $dashes
+
+for x in $( grep -H . tab_*/results.txt )
+do
+ read _ size device grade _ speed < <( echo "$x" | tr _/: ' ' )
+ case "$device" in
+ 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"
+done