table.txt generation works

This commit is contained in:
Tom Verbeure 2016-08-29 23:22:53 -07:00
parent 71a46afa79
commit 248560c18d
3 changed files with 27 additions and 27 deletions

View File

@ -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 -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_ep4ce_c7/results.txt
table.txt: tab_small_ep4cgx_c7/results.txt
table.txt: tab_small_5cgx_c7/results.txt
table.txt: table.txt:
bash table.sh > table.txt bash table.sh > table.txt

View File

@ -8,11 +8,9 @@ for x in $( grep -H . tab_*/results.txt )
do do
read _ size device grade _ speed < <( echo "$x" | tr _/: ' ' ) read _ size device grade _ speed < <( echo "$x" | tr _/: ' ' )
case "$device" in case "$device" in
xc7a) d="Xilinx Artix-7T" ;; ep4ce) d="Altera Cyclone IV E" ;;
xc7k) d="Xilinx Kintex-7T" ;; ep4cgx) d="Altera Cyclone IV GX" ;;
xc7v) d="Xilinx Virtex-7T" ;; 5cgx) d="Altera Cyclone V GX" ;;
xcku) d="Xilinx Kintex UltraScale" ;;
xcvu) d="Xilinx Virtex UltraScale" ;;
esac esac
speedtxt=$( printf '%s.%s ns (%d MHz)' ${speed%?} ${speed#?} $((10000 / speed)) ) speedtxt=$( printf '%s.%s ns (%d MHz)' ${speed%?} ${speed#?} $((10000 / speed)) )
printf '| %-25s | %-10s | %20s |\n' "$d" "-$grade" "$speedtxt" printf '| %-25s | %-10s | %20s |\n' "$d" "-$grade" "$speedtxt"

View File

@ -7,9 +7,9 @@ read _ ip dev grade _ < <( echo $* | tr '_/' ' '; )
mkdir -p tab_${ip}_${dev}_${grade} mkdir -p tab_${ip}_${dev}_${grade}
cd tab_${ip}_${dev}_${grade} cd tab_${ip}_${dev}_${grade}
max_speed=99
min_speed=01
best_speed=99 best_speed=99
speed=30
step=16
synth_case() { synth_case() {
if [ -f test_${1}.txt ]; then if [ -f test_${1}.txt ]; then
@ -19,6 +19,8 @@ synth_case() {
case "${dev}" in case "${dev}" in
ep4ce) al_device="ep4ce30f23${grade}" ;; ep4ce) al_device="ep4ce30f23${grade}" ;;
ep4cgx) al_device="ep4cgx50df27${grade}" ;;
5cgx) al_device="5cgxbc9c6f23${grade}" ;;
esac esac
cat > test_${1}.qsf <<- EOT 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}.." echo "Running tab_${ip}_${dev}_${grade}/test_${1}.."
quartus_map test_${1} if ! quartus_map test_${1}; then
quartus_fit --read_settings_files=off --write_settings_files=off test_${1} -c test_${1} 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 cp output_files/test_${1}.sta.summary test_${1}.txt
# cat test_${1}.log
# exit 1
# fi
# mv test_${1}.log test_${1}.txt
} }
countdown=2 countdown=6
while [ $countdown -gt 0 ]; do while [ $countdown -gt 0 ]; do
speed=$(((max_speed+min_speed)/2))
synth_case $speed 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" echo " tab_${ip}_${dev}_${grade}/test_${speed} VIOLATED"
[ $speed -eq 38 ] || step=$((step / 2)) min_speed=$((speed))
speed=$((speed + step)) elif grep -q '^Slack : [^-]' test_${speed}.txt; then
elif grep -q '^Slack.*(MET)' test_${speed}.txt; then
echo " tab_${ip}_${dev}_${grade}/test_${speed} MET" echo " tab_${ip}_${dev}_${grade}/test_${speed} MET"
[ $speed -lt $best_speed ] && best_speed=$speed [ $speed -lt $best_speed ] && best_speed=$speed
step=$((step / 2)) max_speed=$((speed))
speed=$((speed - step))
else else
echo "ERROR: No slack line found in $PWD/test_${speed}.txt!" echo "ERROR: No slack line found in $PWD/test_${speed}.txt!"
exit 1 exit 1
fi fi
if [ $step -eq 0 ]; then
countdown=$((countdown-1)) countdown=$((countdown-1))
speed=$((best_speed - 2))
step=1
fi
done done
echo "-----------------------" echo "-----------------------"