File tree Expand file tree Collapse file tree 1 file changed +23
-7
lines changed
flow/designs/asap7/mock-array Expand file tree Collapse file tree 1 file changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -86,16 +86,32 @@ for {set x 0} {$x < 8} {incr x} {
8686 }
8787}
8888
89- # puts {report_power -instances [get_cells $ces]}
89+ puts {report_power -instances [get_cells $ces ]}
9090report_power -instances [get_cells $ces ]
91- log_cmd report_power > $::env(REPORTS_DIR) /power_vcd.txt
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+
9299source $::env(RESULTS_DIR) /activity.tcl
93- log_cmd report_power > $::env(REPORTS_DIR) /power_user.txt
94- exec diff $::env(REPORTS_DIR) /power_vcd.txt $::env(REPORTS_DIR) /power_user.txt
100+ log_cmd report_power
101+ set total_power_user_activity [total_power]
95102
96- set fp [open $::env(REPORTS_DIR) /power_user.txt r]
97- puts " [ read $fp ] "
98- close $fp
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+ }
99115
100116log_cmd report_parasitic_annotation
101117log_cmd report_activity_annotation -report_unannotated
You can’t perform that action at this time.
0 commit comments