我正在「拾陆楼」和朋友们讨论有趣的话题,你⼀起来吧?
分析clock tree的时候可以看到一些delay detour buffer,其作用是为了满足balance的要求不得已去垫delay,在版图上兜兜绕绕的插buffer,这时候分析就需要找到把它们拉长的原因,单纯分析latency最到的部分sink未必能找到原因,而找到距离root最远的sink也有很高的参考价值。
proc findingFarthestSink {args} {
parse_proc_arguments -args $args opt
set clock_tree_name $opt(-in_clock_tree)
set root $opt(-root)
set skew_group $opt(-skew_group)
set sink_list ""
foreach i [get_ccopt_clock_tree_sinks -in_clock_trees $clock_tree_name] {
select_obj $root
if {[lsort -unique [db get selected. objType]] == "instTerm" } {
set x [expr abs([expr [dbget [dbget top. insts. instTerms. name $i -p]. pt_x]-[dbget [dbget top. insts. instTerms. name $root -p]. pt_x]])]
set y [expr abs([expr[dbget [dbget top. insts. instTerms. name si -p]. pt_y]-[dbget [dbget top. insts. instTerms. name $root -p]. pt_y]])]
lappend sink_list"$i [expr $x + $y]"
} else {
set x [expr abs([expr [dbget [dbget top. insts. instTerms. name $i -p]. pt_x]-[dbget [dbget top. terms. name $root -p]. pt_x]])]
set y [expr abs([expr [dbget [dbget top. insts. instTerms. name $i -p]. pt_y]-[dbget [dbget top. terms. name $root -p]. pt_y]])]
lappend sink_list"$i [expr $x + $y]"
}
}
puts "[linde x [lsort -index 1 -real -decreasing $sink_list] 0]"
dehighlight
ctd_win -title HighlightFarthestsink
ctd_trace -from [lindex [get_ccopt_skew_group_path -skew_group $skew_group -sink [lindex [ lindex / lsort index 1 -real -decreasing $sink_list] 0] 0] ] 0] -to [ lindex [lindex / lsort index 1 -real -decreasing $sink_list] 0] 0] -color red
define_proc_arguments findingFarthestSink -info "find out the max sink by calculating its manhatttan distance" -define_args {
{-in_clock_tree "specify the clock tree name" "" string required}
{-root "specify the root name" "" string required}
{-skew_group "specify the skew group name" "" string required)}
}|