Skip to content

Commit 55157c7

Browse files
committed
test/orfs/mock-array: clip duty cycle to 1.0
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
1 parent 3af4619 commit 55157c7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/orfs/mock-array/power.tcl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ foreach pin $pins {
1616
if { $activity_origin != "vcd" } {
1717
continue
1818
}
19+
set duty [lindex $activity 1]
20+
if { $duty > 1.0 } { # this generates an sta error
21+
set duty 1.0
22+
}
1923
puts $fp "set_power_activity \
2024
-pin \[get_pins \{[get_property $pin full_name]\}\] \
2125
-activity [expr [lindex $activity 0] * $clock_period] \
22-
-duty [lindex $activity 1]"
26+
-duty $duty"
2327
}
2428
close $fp
2529

0 commit comments

Comments
 (0)