Skip to content

Commit

Permalink
mock-array: report error if all pins are not in .vcd for read_vcd
Browse files Browse the repository at this point in the history
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
  • Loading branch information
oharboe committed Jan 13, 2025
1 parent ceff92c commit 95c68e6
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions flow/designs/asap7/mock-array/power.tcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
source $::env(SCRIPTS_DIR)/util.tcl

foreach libFile $::env(LIB_FILES) {
if {[lsearch -exact $::env(ADDITIONAL_LIBS) $libFile] == -1} {
read_liberty $libFile
Expand All @@ -18,9 +20,41 @@ for {set x 0} {$x < 8} {incr x} {
}
}

report_parasitic_annotation
report_power
read_vcd -scope TOP/MockArray $::env(RESULTS_DIR)/MockArrayTestbench.vcd
log_cmd report_parasitic_annotation

log_cmd report_power
set vcd_file $::env(RESULTS_DIR)/MockArrayTestbench.vcd
log_cmd read_vcd -scope TOP/MockArray $vcd_file

puts "Total number of pins to be annotated: [llength [get_pins -hierarchical *]]"
set no_vcd_activity {}
set pins [get_pins -hierarchical *]
foreach pin $pins {
set activity [get_property $pin activity]
set activity_origin [lindex $activity 2]
if {$activity_origin == "vcd"} {
continue
}
if {$activity_origin == "clock"} {
continue
}
set direction [get_property $pin direction]
if {$direction == "internal"} {
continue
}
lappend no_vcd_activity "[get_full_name $pin] $activity $direction"
if {[llength $no_vcd_activity] >= 10} {
break
}
}

if {[llength $no_vcd_activity] > 0} {
puts "Error: Listing [llength $no_vcd_activity] pins without activity from $vcd_file:"
foreach pin $no_vcd_activity {
puts $pin
}
exit 1
}

set ces {}
for {set x 0} {$x < 8} {incr x} {
Expand Down

0 comments on commit 95c68e6

Please sign in to comment.