Fix WNS instead of TNS, handle TNS=0.000
@@ -171,12 +171,12 @@ report_drc -quiet -ruledeck bitstream_checks -name psl_fpga -file ./R
##
## checking timing
## Extract timing information, change ns to ps, remove leading 0's in number to avoid treatment as octal.
-set TIMING_TNS [exec grep -A6 "Design Timing Summary" ./Reports/timing_summary.rpt | tail -n 1 | tr -s " " | cut -d " " -f 2 | tr -d "." | sed {s/^\(\-*\)0*\([0-9]*\)/\1\2/}]
-puts [format "%-*s %-*s %-*s %-*s" $widthCol1 "" $widthCol2 "Timing (TNS)" $widthCol3 "$TIMING_TNS ps" $widthCol4 "" ]
-if { [expr $TIMING_TNS >= 0 ] } {
+set TIMING_WNS [exec grep -A6 "Design Timing Summary" ./Reports/timing_summary.rpt | tail -n 1 | tr -s " " | cut -d " " -f 2 | tr -d "." | sed {s/^\(\-*\)0*\([1-9]*[0-9]\)/\1\2/}]
+puts [format "%-*s %-*s %-*s %-*s" $widthCol1 "" $widthCol2 "Timing (WNS)" $widthCol3 "$TIMING_WNS ps" $widthCol4 "" ]
+if { [expr $TIMING_WNS >= 0 ] } {
puts [format "%-*s %-*s %-*s %-*s" $widthCol1 "" $widthCol2 "" $widthCol3 "TIMING OK" $widthCol4 "" ]
set remove_tmp_files TRUE
-} elseif { [expr $TIMING_TNS < $timing_lablimit ] && ( $ila_debug != "TRUE" ) } {
+} elseif { [expr $TIMING_WNS < $timing_lablimit ] && ( $ila_debug != "TRUE" ) } {
puts [format "%-*s %-*s %-*s %-*s" $widthCol1 "" $widthCol2 "" $widthCol3 "ERROR: TIMING FAILED" $widthCol4 "" ]
exit 42
} else {
@@ -199,7 +199,7 @@ if { $bram_used == "TRUE" } {
} else {
set RAM_TYPE noSDRAM
}
-append IMAGE_NAME [format {_%s_%s_%s} $RAM_TYPE $fpgacard $TIMING_TNS]
+append IMAGE_NAME [format {_%s_%s_%s} $RAM_TYPE $fpgacard $TIMING_WNS]
append IMAGE_NAME [expr {$factory_image == "TRUE" ? "_FACTORY" : ""}]
