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
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

View File

@ -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"

View File

@ -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
@ -19,6 +19,8 @@ synth_case() {
case "${dev}" in
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 "-----------------------"