proc proc_check_cdc_multi_driven {async_file_list} {
set file1 [open "$async_file_list" r]
while {[gets $file1 line] != -1 } {
set ep_clk [get_attribute [get_pins -hierarchical -filter "full_name =~ $line/CP"] clocks]
set all_fanin_cell [all_fanin -flat -to [get_pins -hierarchical -filter "full_name =~ $line/D*"] -startpoints_only]]
set all_fanin_cell_num [sizeof_collection $all_fanin_cell]
if {$all_fanin_cell_num > 1} {
set num 0
foreach_in_collection stp_clks $all_fanin_cell {
set stp_clk [get_attribute $stp_clks clocks]
set clk_relation [get_clock_relationship "$stp_clk $ep_clk" -type asynchronous]
if {$clk_relation == "true"} {
incr num
}
}
if {num > 1} {
echo "Error:$line is driven by multiple drive" >> ./cdc_issue.rpt
}
}
}
close file1
}
其中输入为: async cell 的list,具体情况根据async cell list来决定是否微调脚本,
灵活运用。