@@ -6,6 +6,33 @@ foreach libFile $::env(LIB_FILES) {
66 }
77}
88
9+ proc check_log_for_warning { logfile } {
10+ set f [open $logfile r]
11+ set log_contents [read $f ]
12+ close $f
13+ puts $log_contents
14+ # Check each line in the file for warnings other than:
15+ # Warning: pin io_lsbOuts_0 not found
16+ #
17+ # Also list unexpected warnings here as they are found.
18+ set unexpected_warnings {}
19+ foreach line [split $log_contents " \n " ] {
20+ if { [string match " *Warning:*" $line ] } {
21+ if { ![string match " *pin * not found*" $line ] } {
22+ lappend unexpected_warnings $line
23+ }
24+ }
25+ }
26+ if { [llength $unexpected_warnings ] > 0 } {
27+ puts " Error: Unexpected warnings found in log file $logfile :"
28+ foreach warning $unexpected_warnings {
29+ puts $warning
30+ }
31+ exit 1
32+ }
33+ }
34+
35+
936# $::env(VARIANT) contains 4x4_foo, fish out what comes before _
1037set name [lindex [split $::env(FLOW_VARIANT) " _" ] 0]
1138
@@ -15,12 +42,15 @@ log_cmd read_verilog $::env(PLATFORM_DIR)/verilog/stdcell/empty.v
1542log_cmd link_design MockArray
1643
1744log_cmd read_sdc $::env(RESULTS_DIR) /$::env(POWER_STAGE_STEM) .sdc
18- log_cmd read_spef $::env(RESULTS_DIR) /$::env(POWER_STAGE_STEM) .spef
45+ log_cmd read_spef $::env(RESULTS_DIR) /$::env(POWER_STAGE_STEM) .spef > log.txt
46+ check_log_for_warning log.txt
47+
1948puts " read_spef for ces_*_* macros"
2049for { set x 0 } { $x < $::env(ARRAY_COLS) } { incr x } {
2150 for { set y 0 } { $y < $::env(ARRAY_ROWS) } { incr y } {
2251 log_cmd read_spef -path ces_${x} _${y} \
23- $::env(RESULTS_DIR) /../../Element/${name} _base/$::env(POWER_STAGE_STEM) .spef
52+ $::env(RESULTS_DIR) /../../Element/${name} _base/$::env(POWER_STAGE_STEM) .spef > log.txt
53+ check_log_for_warning log.txt
2454 }
2555}
2656
0 commit comments