Update PCell references

edited June 2014 in General

Hi,

I've searched for an answer on this one and can't seem to find it..

I have a GDS library in "libraries" folder in home dir.

I instance a library component in a file (call this new file "A.gds") and save that file. Then I go modify the library. Then re-open A.gds and it still shows the old cell. To get it to show the updated cell, I go to properties, change that cell to point to something else, then change it back. Now it shows the updated cell.

This can be tedious for large layouts. Is there a function that will just go and update all library references all at once?

Thanks,
David

Comments

  • edited November -1

    Hi David,

    I hope I won't cause frustration again: this is how it worked for me:

    • Create A.gds
    • Save & close KLayout
    • Open KLayout again
    • Edit the library
    • Save & close again
    • Open KLayout once again
    • Open A.gds

    KLayout won't refresh the layout when you don't save & close in between. That is because libraries were designed with a static repository in mind. They reside in the background and are not updated. Unlike in the Cadence framework they are not part of the dynamic cell tree.

    I'll test that on Windows too - maybe there is an issue with initialization order which causes a broken link between library and layout. I tested the recipe on Linux.

    It's basically possible to reload a library, but the information about the original file name is not accessible through RBA, so it's somewhat difficult. If the library is loaded, but the content of the cell is not updated, the following little script should resynchronize the cells with the library content (it will also recompute PCell's if required):

    ly = RBA::CellView::active.layout
    ly.each_cell { |cell| cell.refresh } 
    

    Best regards,

    Matthias

  • edited November -1

    Hi David,

    brief update: the recipe given above also works on Windows 7 SP1 - when closing and opening again, the layout is updated. What are the exact steps you take?

    Best regards,

    Matthias

  • edited June 2014

    No frustration at all! Really, you are so extremely helpful. Actually I hope I don't cause you frustration -- because I have been unable to reproduce this. :( I've tried a lot of things, but while before I definitely had a library cell that wouldn't update, now it's working perfectly. Sorry! If it happens again I'll hunt down the reason.

    Thanks,
    David

Sign In or Register to comment.