Cell independent sizing

Dear Matthias

I want to run a sizing script on a layout containing two cells, each containing one polygon of the same layer. I would like to run it on cell1, then on cell2 with different parameters.
Unfortunately, whenever I run it on one cell, it deletes the generated output in the other cell.
How is it possible to run the script on cell1 and later on cell2 but still keeping the outputs in the cells.
Thank you very much.

layout.select("-*", +layout.cell_name)
L1 = input(1,0)

output_cell(layout.cell_name)
L1.size(1.um).output(2,0)

Comments

  • Hi spi,

    That's not possible with a DRC script. DRC always operates on full layers.

    In general, operations on cells or rather cell subtrees are critical as modifying the sub-hierarchy of a cell may have undesired side effects for other instances of subcells.

    Matthias

  • Hi Matthias

    Thank you for the answer. It would have been nice to do the sizing on individual cells, since I have various cells in a library, which require different sizing parameters. However, I might split the libraries according to the sizing.
    Martin

  • Hi Martin,

    yes, that's the best option I can think of.

    If your library is strictly of a discrete hierarchy type, like this:

    TOP
    + CELLA
    + CELLB
    + CELLC
    

    then you can run the sizing on CELLA, CELLB and CELLC individually if you use a script (not DRC) like this:

    ly = RBA::CellView::active.layout
    
    linput = ly.layer(1, 0)
    
    # create a temporary layer
    ltemp = ly.layer
    
    # [ [ cell_name, size_value_in_dbu ], ... ]
    [ [ "CELLA", 100 ], [ "CELLB", 200 ], [ "CELLC", 300 ] ].each do |cell_name,sz|
    
      cell = ly.cell(cell_name)
    
      region = RBA::Region::new(cell.begin_shapes_rec(linput))
      region.size(sz)
    
      # insert the sized shapes flat(!) -> sub-hierarchy is lost!
      cell.shapes(ltemp).insert(region)
    
    end
    
    # exchange the sized with the input layer and remove the temp one
    ly.swap_layers(linput, ltemp)
    ly.clear_layer(ltemp)
    

    Note that the sized shapes will end up in CELLA, CELLB etc., but and sub-hierarchy is lost.

    Matthias

  • Hi Matthias

    Thank you very much. Indeed, this seems to be a good option. I guess I can handle the flat cells loosing the sub-hierarchy since the cells are not too big in size and amount of subcells. Thanks again, I appreciate your help a lot.

    Martin

Sign In or Register to comment.