Skip to content

Commit 2ed874f

Browse files
committed
test/orfs/mock-array: check for read_spef warnings in OpenSTA
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 8b193f4 commit 2ed874f

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

test/orfs/mock-array/load_power.tcl

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ 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+
if { [regexp -nocase "Warning" $log_contents] } {
15+
puts "ERROR: Warning found in $logfile"
16+
exit 1
17+
}
18+
}
19+
920
# $::env(VARIANT) contains 4x4_foo, fish out what comes before _
1021
set name [lindex [split $::env(FLOW_VARIANT) "_"] 0]
1122

@@ -15,12 +26,15 @@ log_cmd read_verilog $::env(PLATFORM_DIR)/verilog/stdcell/empty.v
1526
log_cmd link_design MockArray
1627

1728
log_cmd read_sdc $::env(RESULTS_DIR)/$::env(POWER_STAGE_STEM).sdc
18-
log_cmd read_spef $::env(RESULTS_DIR)/$::env(POWER_STAGE_STEM).spef
29+
log_cmd read_spef $::env(RESULTS_DIR)/$::env(POWER_STAGE_STEM).spef > log.txt
30+
check_log_for_warning log.txt
31+
1932
puts "read_spef for ces_*_* macros"
2033
for { set x 0 } { $x < $::env(ARRAY_COLS) } { incr x } {
2134
for { set y 0 } { $y < $::env(ARRAY_ROWS) } { incr y } {
2235
log_cmd read_spef -path ces_${x}_${y} \
23-
$::env(RESULTS_DIR)/../../Element/${name}_base/$::env(POWER_STAGE_STEM).spef
36+
$::env(RESULTS_DIR)/../../Element/${name}_base/$::env(POWER_STAGE_STEM).spef > log.txt
37+
check_log_for_warning log.txt
2438
}
2539
}
2640

0 commit comments

Comments
 (0)