0 Replies Latest reply on Aug 1, 2017 12:05 AM by luciano.artuso

    Extract parameters from subcells on gds file

    luciano.artuso

            Hello,

       

      I need to extract these parameters from all cells present on gds file:

       

      placement rotation , x placement coordinate , y placement coordinate  and bbox.

       

      For the first 3 information, I haven't problem, but  how ca I get bbox in my following script?

       

      Many thanks in advance and regards

       

          Luciano

       

      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

       

       

      #

      #

      #

      if {$argc != 1} {

        puts ""

        puts "Error: wrong number of arguments."

        puts "Usage: calibredrv <this macro> <input filename>"

        exit 1

        }

      set input [lindex $argv 0]

      set root [ file rootname $input ]

       

       

      #

      #

      #

      set L [layout create $input -dt_expand -preservePaths -preserveProperties -preserveTextAttributes ]

      # porto la magnification a livello precision

      set dbu [expr [$L units microns] / 1000 ]

      set mytop [$L topcell]

      set maxde [$L maxdepth]

      file delete -force coordinates.dat

      set fout [open "coordinates.dat" w]

      foreach lacell [$L cells] {

        set clist [$L iterator sref $lacell range 0 end -depth 0 $maxde]

        foreach x [lsort -unique $clist] {

        if {[string last "/" [lindex $x 1]] == 0 } {

        set struc [lindex [lindex $x 0] 0]

        set papi [string range [lindex $x 1] 1 end]

        set tx [ expr ([lindex [lindex $x 0] 1]  / $dbu ) ]

        set ty [ expr ([lindex [lindex $x 0] 2]  / $dbu ) ]

        set rot [expr int([lindex [lindex $x 0] 4])]

        set mirr [lindex [lindex $x 0] 3]

       

        set linout "$papi $struc $rot $tx $ty"

        puts $fout "$linout"

       

        }

        }

      }

      puts $fout ":::::::::: END REPORT FILE :::::::::::"

      close $fout

      exit