merged command outputs empty layout with 0.25 version

edited January 2018 in KLayout Support
Hi,

I have only two rectangles partially overlapping each other in the GDS,
Here is my code in file merge.drc -

source($gds)
lay = layout($gds)
target($mergeGds)
layers = []
lay.layout.layer_indices.each do |index|
info = lay.layout.get_info(index)
layers << [info.layer, info.datatype ]
end
layers.sort.uniq.each do |l,d|
log "-Merging LPP #{l}/#{d} .."
input(l, d).merged.output(l, d)
end

I run it from command line like this-

klayout -b -rd gds=aa.gds -rd mergeGds=aa_merged.gds -r merge.drc

0.24.10 => the output is all good and merged well in aa_merged.gds
0.25 => the out file aa_merged.gds is empty, when I try select all I get following error -
*** ERROR: /root/klayout-0.24.10/src/layLayoutView.cc,5835,int (m_cellviews.size ()) > index && m_cellviews [index].is_valid ()
*** ERROR: Internal error: /root/klayout-0.24.10/src/layLayoutView.cc:5835 int (m_cellviews.size ()) > index && m_cellviews [index].is_valid () was not true

Please let me know if I am missing something or it is a bug.

Thanks & Regards
Rambir

Comments

  • edited November -1

    Hi Rambir,

    thanks for reporting this issue. The problem is that - contrary to the documentation - the cell name is not optional for "target". So you need to specify the output cell name currently.

    You can further simplify the script - instead of reading the input layout twice, you can take the layer from the actual (first) input and apply a few other simplifications. Essentially the script can be as simple as this:

    source($gds)
    target($mergeGds, source.layout.top_cell.name)
    source.layout.layer_infos.each do |info|
        log "-Merging LPP #{info.to_s} .."
        input(info).merged.output(info)
    end
    

    I filed ticket on GitHub: https://github.com/klayoutmatthias/klayout/issues/71

    Thanks,

    Matthias

  • edited November -1
    Hi Matthias,

    Thanks for the clarification.
    You are simply a magician..
    have a nice day.

    Best Regards
    Rambir
Sign In or Register to comment.