set terms [dbGet [dbGet top.insts.cell.name JLFLS064K09DG -p2].pgInstTerms.name VPP -v -p1]
set n 0
foreach term $terms {
set inst [dbGet $term.inst]
set lrects [dbGet $term.term.pins.layerShapeShapes.shapes.rect]
set net [lindex [dbGet $term.net.name] 0]
set layer1 [dbGet $term.term.layer.name]
set layer [dbGet $term.term.pins.layerShapeShapes.layer.name]
lappend pins_info [list $layer $lrects]
set i 0
foreach lrect [lindex [lindex $pins_info $n] 1] {
set grect [dbTransform -inst $inst -localPt $lrect]
set curr_layer [lindex [lindex [lindex $pins_info $n] 0] $i]
set ip_llx [dbGet $inst.box_llx]
set ip_lly [dbGet $inst.box_lly]
set ip_urx [dbGet $inst.box_urx]
set ip_ury [dbGet $inst.box_ury]
set term_llx [lindex $grect 0]
set term_lly [lindex $grect 1]
set term_urx [lindex $grect 2]
set term_ury [lindex $grect 3]
if {[expr $term_lly == $ip_lly]} {
set term_rect [dbShape [dbShape $grect SIZEY 8] MOVE {0 -8}]
add_shape -layer $curr_layer -net $net -rect $term_rect -shape STRIPE -user_class IP_PoG_STRIPE -status FIXED
set term_rect1 [dbShape [dbShape $grect SIZEY 50] MOVE {0 -55}]
add_shape -layer $layer1 -net $net -rect $term_rect1 -shape STRIPE -user_class IP_PoG_STRIPE -status FIXED
} elseif {[expr $term_ury == $ip_ury]} {
set term_rect [dbShape [dbShape $grect SIZEY 8] MOVE {0 8}]
add_shape -layer $curr_layer -net $net -rect $term_rect -shape STRIPE -user_class IP_PoG_STRIPE -status FIXED
set term_rect1 [dbShape [dbShape $grect SIZEY 50] MOVE {0 55}]
add_shape -layer $layer1 -net $net -rect $term_rect1 -shape STRIPE -user_class IP_PoG_STRIPE -status FIXED
} elseif {[expr $term_llx == $ip_llx]} {
set term_rect [dbShape [dbShape $grect SIZEX 8] MOVE {-8 0}]
add_shape -layer $curr_layer -net $net -rect $term_rect -shape STRIPE -user_class IP_PoG_STRIPE -status FIXED
set term_rect1 [dbShape [dbShape $grect SIZEX 50] MOVE {-55 0}]
add_shape -layer $layer1 -net $net -rect $term_rect1 -shape STRIPE -user_class IP_PoG_STRIPE -status FIXED
} elseif {[expr $term_urx == $ip_urx]} {
set term_rect [dbShape [dbShape $grect SIZEX 8] MOVE {8 0}]
add_shape -layer $curr_layer -net $net -rect $term_rect -shape STRIPE -user_class IP_PoG_STRIPE -status FIXED
set term_rect1 [dbShape [dbShape $grect SIZEX 50] MOVE {55 0}]
add_shape -layer $layer1 -net $net -rect $term_rect1 -shape STRIPE -user_class IP_PoG_STRIPE -status FIXED
}
incr i
}
incr n
}