Add Placement & Route Blockage to IO Cells

Scripts

###  NOTE : WARNING
###
###  add_io_cover takes two arguments.  The first is the hard blockage distance
###  around the io.  The second is the amount the PG route guide is INSET from
###  that blockage -- a number picked to be slightly larger than half the standard
###  cell PG rail width.  The reason for the inset is to prevent a situation where
###  placement rows wind up without a PG rail.
###  d = blockage border [one row default], e is half M1 pwr rail width + margin
proc add_io_cover { d e } {
  set x 0
  foreach_in_collection c [get_cells -hier -all -filter "is_io==true"] {
    set coord [get_attribute $c bbox]
    set low_x [expr [lindex [lindex $coord 0] 0] - $d]
    set low_y [expr [lindex [lindex $coord 0] 1] - $d]
    set high_x [expr [lindex [lindex $coord 1] 0] + $d]
    set high_y [expr [lindex [lindex $coord 1] 1] + $d]
    create_placement_blockage -bbox "$low_x $low_y $high_x $high_y" -type hard -name IoBlockH_$x
    set newCord [list [list [expr $low_x  + $e ] [expr $low_y  + $e ]] [list [expr $high_x - $e ] [expr $high_y - $e ]] ]
    create_route_guide -name IoBlockR_$x -no_preroute_layers {M1 M2 M3 M4 M5 M6 M7 M8} -coordinate $newCord -no_snap
    incr x
  }
}
 
add_io_cover 1.8 0.14