Skip to content

Commit 8736781

Browse files
committed
Merge remote-tracking branch 'private/master' into secure-grt-rudy-tweak
2 parents 9aede18 + 7bd3c6d commit 8736781

File tree

5 files changed

+283
-239
lines changed

5 files changed

+283
-239
lines changed

flow/designs/asap7/mock-array/power.tcl

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,24 @@ log_cmd report_power
2525
set vcd_file $::env(RESULTS_DIR)/MockArrayTestbench.vcd
2626
log_cmd read_vcd -scope TOP/MockArray $vcd_file
2727

28-
puts "Total number of pins to be annotated: [llength [get_pins -hierarchical *]]"
29-
set no_vcd_activity {}
28+
set fp [open $::env(RESULTS_DIR)/activity.tcl w]
3029
set pins [get_pins -hierarchical *]
30+
set clock_period [expr [get_property [get_clocks] period] * 1e-12]
31+
foreach pin $pins {
32+
set activity [get_property $pin activity]
33+
set activity_origin [lindex $activity 2]
34+
if {$activity_origin != "vcd"} {
35+
continue
36+
}
37+
puts $fp "set_power_activity \
38+
-pin \[get_pins \{[get_property $pin full_name]\}\] \
39+
-activity [expr [lindex $activity 0] * $clock_period] \
40+
-duty [lindex $activity 1]"
41+
}
42+
close $fp
43+
44+
puts "Total number of pins: [llength [get_pins -hierarchical *]]"
45+
set no_vcd_activity {}
3146
foreach pin $pins {
3247
set activity [get_property $pin activity]
3348
set activity_origin [lindex $activity 2]
@@ -73,7 +88,30 @@ for {set x 0} {$x < 8} {incr x} {
7388

7489
puts {report_power -instances [get_cells $ces]}
7590
report_power -instances [get_cells $ces]
91+
92+
proc total_power {} {
93+
return [lindex [sta::design_power [sta::corners]] 3]
94+
}
95+
96+
set total_power_vcd [total_power]
97+
log_cmd report_power
98+
99+
source $::env(RESULTS_DIR)/activity.tcl
76100
log_cmd report_power
101+
set total_power_user_activity [total_power]
102+
103+
puts "Total power from VCD: $total_power_vcd"
104+
puts "Total power from user activity: $total_power_user_activity"
105+
106+
if {$total_power_vcd == $total_power_user_activity} {
107+
puts "Error: settting user power activity had no effect, expected some loss in accuracy"
108+
exit 1
109+
}
110+
111+
if {abs($total_power_vcd - $total_power_user_activity) > 1e-3} {
112+
puts "Error: Total power mismatch between VCD and user activity: $total_power_vcd vs $total_power_user_activity"
113+
exit 1
114+
}
77115

78116
log_cmd report_parasitic_annotation
79117
log_cmd report_activity_annotation -report_unannotated

flow/designs/ihp-sg13g2/i2c-gpio-expander/pad.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ place_pad -row IO_WEST -location [calc_vertical_pad_location 0 5] {sg13g2_IOPad_
7676
place_pad -row IO_WEST -location [calc_vertical_pad_location 1 5] {sg13g2_IOPad_io_gpio_6} -master sg13g2_IOPadInOut16mA
7777
# IO pin io_gpio_7
7878
place_pad -row IO_WEST -location [calc_vertical_pad_location 2 5] {sg13g2_IOPad_io_gpio_7} -master sg13g2_IOPadInOut16mA
79-
place_pad -row IO_WEST -location [calc_vertical_pad_location 3 5] {sg13g2_IOPadVss_west_3} -master sg13g2_IOPadVss
80-
place_pad -row IO_WEST -location [calc_vertical_pad_location 4 5] {sg13g2_IOPadVdd_west_4} -master sg13g2_IOPadVdd
79+
place_pad -row IO_WEST -location [calc_vertical_pad_location 3 5] {sg13g2_IOPadIOVss_west_3} -master sg13g2_IOPadIOVss
80+
place_pad -row IO_WEST -location [calc_vertical_pad_location 4 5] {sg13g2_IOPadIOVdd_west_4} -master sg13g2_IOPadIOVdd
8181
# Place Corner Cells and Filler
8282
place_corners sg13g2_Corner
8383

flow/designs/ihp-sg13g2/i2c-gpio-expander/pdn.tcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ add_global_connection -net {VSS} -pin_pattern {^VSSE$}
1111
add_global_connection -net {VDD} -pin_pattern {^vdd$} -power
1212
add_global_connection -net {VSS} -pin_pattern {^vss$} -ground
1313

14+
# padframe io power pins
15+
add_global_connection -net {IOVDD} -pin_pattern {^iovdd$} -power
16+
add_global_connection -net {IOVSS} -pin_pattern {^iovss$} -ground
17+
1418
global_connect
1519

1620
# core voltage domain

0 commit comments

Comments
 (0)