Design / Library Management

I'm starting to accumulate and now reuse a lot of low
level (custom transistor) layouts in my work and it's
getting a bit crowded in the file pile.

I have seen that there's some kind of "use a second
GDS file as a library" capacity. I've found it a bit clunky
to copy between open layouts so have been just exporting
"done" devices to their own individual GDS file. Those
seem like my two options for corralling a herd of funky
one-off device layouts for a series of future products
(a lateral PNP is a lateral PNP, unless it's in a LM158).

But thought I'd kick off a discussion of how other people
(if anybody out there is going down the same or similar
road) like to approach this aspect of design management.

Comments

  • Basically libraries are a simple way to organize layouts.

    There is a simple way to use GDS files as libraries:

    1. Put everything you want to see as a library element into it's own top cell
    2. Save the GDS file with a meaningful LIBNAME (see GDS writer options)
    3. Put the GDS file into the ~/.klayout/libraries folder (you can also stash it somewhere else and use $KLAYOUT_PATH to define multiple places KLayout looks for). On Windows the place is c:\Users\you\KLayout\libraries.

    You will then find the new library under the LIBNAME you gave it when saving in the library browser (by default below the cell list).

    Some things are worth noting:

    1. The Layer numbers are not translated so they need to fit to your technology. It's possible to define technologies and assign libraries to them if needed. In that case a library becomes visible only if that technology is selected.
    2. Database units should be translated, but I'd recommend using the same DBU across libraries and layouts which use them.
    3. Library cells can contain PCells and cells from other libraries. In that case these other libraries need to be available too.
    4. If a layout uses Library cells, these instances are annotated in a special way in GDS (like PCells). If you load such a file with a different KLayout where the library is not available, the cell will still be available content-wise, but it will be shown as combing from a "" library.
    5. If you want to get rid of the library references (e.g. on tapeout), save the GDS file without "Cell context":

    Matthias

  • Hi Matthias,

    I found this very helpful, do you think the information here could be put onto the "About Libraries" page? https://www.klayout.de/doc/about/about_libraries.html

    Specifically, because I didn't have the libraries folder in my Klayout folder, I wasn't sure if I had done something incorrectly when saving my previous gds with a lib filename. But after finding this post, I figured I should try out manually creating the \libraries folder and placing my gds there. The library name didn't seem to match with what I had put in the "Library name" when Saving as, but at least it's there now to use

    It took me a while to find this post, but I'm definitely glad it's here . :)

  • I agree with the above. Updating the "About Libraries" documentation with the information discussed in this forum thread would be very helpful.

    Further, what would be really helpful is if for a given library name, Klayout can pull all top-level cells from all GDS files saved with the same library name. Right now, it seems if you have multiple GDS files in ~/.klayout/libraries with the same library name, only one of those GDS files will mapped to that library name. This would be handy when you have multiple designers contributing to a single library. Each designer can work in a separate GDS file which then contribute to the unified cell library.

  • I'd take this a step further and maybe look at
    making a "CAD administration for non-sysadmins"
    cookbook. We all want to jump ahead to the fun,
    but running the Zamboni first (and maybe at half
    time) does improve the game-play.

    If it spread to encompass schematic and simulation
    point tools so much the better. I look ahead to the
    day when klayout, xschem and ngspice become
    an integrated design platform like SDA1.0 and that
    layer, wants this.

  • edited September 8

    Hi @kurisu,

    I have created a ticket for this request: https://github.com/KLayout/klayout/issues/2147

    @dick_freebird People are working on this, but as always, it's a matter of funding. In this case, it's public money. Company sponsorship is hard to find for such an endeavor.

    Matthias

  • Thanks @Matthias ! Appreciate it!

Sign In or Register to comment.