Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Extract information from oasis file

Hello,

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

bbox , x placement coordinate , y placement coordinate

Is possible run automatically a script directly on oasis file to do it?

Many thanks in advance and regards

Luciano

Comments

  • Hi Luciano,

    yes that's possible. Are all the cells on a single level of hierarchy (i.e. below the top cell)? And you don't need the orientation?

    Matthias

  • Hi Matthias,
    All cells are divided in a double level of hierarchy below the top cell.
    The orientation should be needed in the future but if It's possible extract also this data thanks to give me also the instruction for this one.

    Thanks

    Luciano

  • Hi Matthias,
    can You give me the code to extract the datas?
    Thanks

    Luciano

  • edited January 16

    Hi Luciano,

    please don't let me guess. There are too many variants of hierarchy, so there isn't a single answer. "Double layer of hierarchy" means there is a cell in between top cell and the one you're interested in? So you want the coordinates of all leaf cells? Paste a sketch, a screenshot, an example, code you've tried already, anything. Your description is too fuzzy to give an answer quickly.

    Matthias

  • edited January 16

    And for now, here is something new:

    ly = RBA::CellView::active.layout
    # for batch mode save this text to "this_script.rb" and use
    #  ly = RBA::Layout::new
    #  ly.read($input) 
    # and use "klayout -b -rd input=yourfile.oas ... -r this_script.rb" to set $input
    
    RBA::LayoutQuery::new("select cell.name, path_trans * cell.bbox, path_trans.disp.x, path_trans.disp.y from instances of ...*").each(ly) do |q|
      puts q.data.collect { |d| d.to_s }.join("\t")
    end
    

    This approach uses the LayoutQuery feature. It's the basis of the "search & replace" feature. The classic approach was to iterate the cells and indexes and dive down into the hierarchy recursively. The query does this for you.

    Matthias

Sign In or Register to comment.