How to use PERC to transform the XY coordinates from cell space to world space

Document created by chung_lee on Oct 4, 2012
Version 1Show Document
  • View in full screen mode

You can use perc::cache_device to promote the instance up to every containing cell.


For instance, in the code below, you can use perc::cache_device to promote MN devices all the way to the top level.


proc rule {} {
    perc::check_device -type {MN} -condition cond


proc cond {inst} {
     if { ! [perc::is_top $inst] } {
        #If the device is not at the top level, promote
        perc::cache_device $inst
        return 0
     set x [perc::x_coord $inst]
     set y [perc::y_coord $inst]
     puts " Instance Name: [perc::name $inst] -- Location: ($x,$y) - Instance Path: [perc::path $inst -fromTop]"
     return 1


Note: The code snippet that’s provided will cause all MN devices that are not at the top level to be reported in top-level coordinates.  If this is a large design, your transcript could be huge due to the puts.