2013-07-24

ICCompiler オブジェクトの外枠を取得

ICC にて セルやマクロの外枠座標を取得するプロシージャを紹介する.
proc get_bbox {name {offset 0}} {
    set bbox [get_attribute ${name} bbox]
    set x1 [lindex [lindex $bbox 0] 0]
    set y1 [lindex [lindex $bbox 0] 1]
    set x2 [lindex [lindex $bbox 1] 0]
    set y2 [lindex [lindex $bbox 1] 1]
    return [list [list [expr $x1-$offset] [expr $y1-$offset]] [list [expr $x2+$offset] [expr $y2+$offset]]]
}
上記の定義にて, マクロの外枠を取得でき, offset を指定すれば, そのオフセット分だけ外に広げて return する. マクロ周囲にブロッケージを生成する場合などに便利である. 使用例を示す.
icc_shell> get_bbox I0 
{456.0 921.6} {1651.6 1645.2}
icc_shell> get_bbox I0 16
{440.0 905.6} {1667.6 1661.2}

1 件のコメント:

  1. マクロの周囲にブロッケージを張るのであればset_keepout_margin -type hard -all_macros -outer {left bottom right top}でもできます.

    返信削除