some layers missing

edited June 2014 in KLayout Support
Matthias,

When I open a gds file, some layers are missing.
However, If I import the same GDS layout into the first one creting a second toplevel_$, I can see all layers.

Did I miss something when opening a GDS file ?

Rgds,
Laurent

Comments

  • edited November -1

    Hi Laurent,

    maybe that GDS does not have any shapes on these layers? Basically, a GDS file does not "contain layers", it just contains shapes. If there are no shapes (or texts) on a layer, the layer will not be there.

    A solution is to provide a mapping table listing all layers that should be in that file, or to load a layer properties file. In both cases, KLayout will use that information to add layers which it otherwise does not know about.

    Matthias

  • edited November -1
    Hi,

    I solved it by unselecting in the menu [Reader options] the option [Read all layers].
    And now, it works whatever the options I select/unselect !

    Rgds,
    Laurent
  • edited November -1

    I think I don't understand ... are you saying there is a bug?

    Matthias

  • edited November -1
    There was something strange, but I cannot reproduce it ...

    Laurent
  • edited November -1
    Sorry to bring this up, but I see the same problem (and can reproduce it). I have created a technology and a layer mapping for a process. It does not contain mappings for unknown layers. The layout statistic report all layers present in the technology/mapping, not the layers present in the gds (which is what I expect). If I remove the only technology I have I see all layers when I open the gds (numbered in the layer overview). Now layout statistics only show the layers I expect (and that I know I have).
    I used the "Add other layers" option. I also tried with both the "Read all layers" option enabled and disabled during file open.
    I can choose the "Default" process when I open a file, but still my defined process is used showing names instead of layer numbers. If I do the same with "open in the same panel", I do get the "Default" process. And that shows me my the missing layers.
    This bit me during tapeout. The foundry asked me what this layer was doing in our design. I insisted it was not present as I did not see it in my brand-new layout tool.....
    I can send my .klayout resource folder and a test gds if that might help.
  • edited February 2015

    Hi Theo,

    I am still somewhat puzzled. I am trying to figure out what is the input and what is expected.

    Maybe a word of caution regarding the layer mapping is in place.

    Basically, the layer MAPPING is some kind of filtering on reading. That means the layers won't be read although they are in the layout. This option is somewhat special and is intended mainly to provide a mapping of layers between formats using names and formats using layer/datatypes. The layer mapping will basically modify a layout, hence it's a somewhat dangerous option.

    If you want to DISPLAY layers in a specific way, you can specify a layer properties file. This will just specify the way the layers are shown, not modify the database. Specifically, if you switch a technology (chose a technology and click on the technology button), the layers will be shown differently, according to the specification in the new technology. SO I'd recommend to specify a layer properties file rather than a mapping. You can assign speaking names to layer entries within layer properties files using "Rename" from the layer list's context menu.

    BTW: layer properties files are designed to provide a list of layers to display. By default, the other layers are not shown (although they are present in the database). You can add "Add other layer entries" from the layer list's context menu, or you can make a layer properties file to show all the remaining layers in some default color and style by adding the following entry at the end of the file:

    <layer-properties>
     ... normal content
     <properties>
      <source>*/*@*</source>
     </properties>
    </layer-properties>
    

    Another remark: when you reload a file from the "most recently used" list, KLayout will use the technology used at the point of time that file was loaded. Maybe that is confusing too. When you said, you have loaded with "(Default)" technology, but you still saw mapped layers, could you check, whether "(Default)" was really used (File/Layout Properties)? Plus, the technology is also shown in the lower left corner next to the "T" label (in that case, "(Default)" is shown as no text). Please check whether it really was "(Default)".

    Maybe that clears up things a little. Does that explanation help?

    Matthias

  • edited February 2015
    Hi Matthias

    Thanks for your answer. May I suggest you copy and paste this to the manual as well. It would really help to understand the difference between mapping and display.

    Let me explain how I use Klayout and why I started using mapping.
    I have used layer mappings, as I want to name the GDS layer/datatype combinations. It's confusion to me that the names are given both in the process as mapping and in the layer properties. The layer map is a simple format, with one layer mapping per line. With a stream editor I created this list for the layer definitions provided by the foundry (Calibre rule file). The ASCII technology file I then imported which gave me the process with correct layer names (mapping as I now understand). Any gds that was already opened (actually present in <mru> in ~/.klayout/klayoutrc) did not use the new layer mapping and the layers were still displayed as numbers. Newly read-in gds, did show the names however. I then edited ~/.klayout/klayoutrc and removed <mru> completedly. Now if I open my gds the layer names appear. Next step was to order the layers in a number of groups (frond-end/metal etc.) and colour them nicely. This layer setup I then saved as layerproperties.lyp. And layerproperties.lyp I choose in technology manager under layers as the file to load for this technology. Creating layerproperties.lyp is much more difficult for me each layer has several nested XML groups. I prefer to work with simple lines as possible in the <layer-map> block of the technology file.

    Both the technology and the layer property file are stored in the project using svn for the design team (I advertised klayout in our team as the tool to use for review). $KLAYOUT_PATH points to that folder.

    I disabled the layer mapping button in the technology manager. Now it works almost as I expect. If I open a gds file (using recently opened) I can choose the technology. The T icon shows the name, but the layer property file is not applied. Only after I press on the T, the layers are shown with the name. The layer that I know is missing, appears if I use "Add other layer entries". So in this way I can update my display file. If I open the same file with the meny->open entry, I get the same reader option and I again choose my process. Now the process is indeed applied. It is confusing that File->open works different than File->open recent

    Lastly the Default technology can be chosen, but it does not reset the display of the layers. I would expect that if I choose 'Default' that my layers would be shown again as numbers not as the names that were used for the previous no longer active technology. Under Layout properties it shows that the 'Default' technology is used (also in the status bar).

    It feels to me that the layer mapping feature breaks the "Add other layers" function. If this is a feature, the function should be grayed out and the documentation should tell that layers are always ignored if not mapped. Also the "reader options" should grey out the "Read all layers (additional to the ones in the mapping table)" option.
    But the comment in this last option clearly states that the additional layers should still be read-in. But it does not happen. I guess that makes it a bug right?
  • edited February 2015

    Hi Theo,

    I can understand your concerns.

    The idea is that the technology is some property assigned to a layout. The technology selector will allow you to change that assignment. Pushing this button says "I want to make this layout use that technology". Different layouts can use different technologies and the string next to the lower left "T" label shows the technology assigned to the current layout.

    Once you have made a choice, the technology associated with a layout file should be stored somewhere, so you don't have to make this choice again. The MRU list looked like a good place to store this, without having to modify the layout files. But if you chose a new one, the system won't have any idea what to use so initially, so you'll have to make a choice by picking one technology in the assignment button.

    The default technology does not reset the layer properties because I guess there is no .lyp file associated with the Default technology. if you want the default technology to reset the layer properties to some default you can use the following dummy .lyp file for "(Default)":

    <?xml version="1.0" encoding="utf-8"?>
    <layer-properties>
     <properties>
      <source>*/*@*</source>
     </properties>
    </layer-properties>
    

    Looking deeply into the code I noticed that there is some strange behaviour regarding the adding of new layers when using .lyp files. There is no individual "add missing layers" flag for the technology's .lyp file. Instead the global flag is used (see Setup/Layer Properties). So if that is set, the missing layers are added automatically. This is not intended. I'd like to add this flag to the technology too, so you can configure that behaviour. Until then you can check whether the "auto-add missing layers" flag is set by looking into the configuration file:

    <default-add-other-layers>true</default-add-other-layers>
    

    There may be a similar issue with the "read all other layers" for the layer mapping. The technology should have the same switch and it should work independently from the reader options.

    I'll check that. That's surely a strange behaviour.

    Matthias

  • edited March 2015
    Hi Mathias

    Just discovered a bug when using an entry form the MRU. I have enabled "read options" to pop-up. But when I choose a specific process from the list it is ignored. It always opens with the process that it stored in the MRU. Can be changed with the process button, but that does not update the MRU entry. Only way to fix it is to open the file from the "File open" menu and choose the correct process.
    It happens when you open a gds file on the commandline (klayout file.gds) without specifying a process (-n option). It seems to pick the first process.
    It also happens if you by accident open a file with the wrong process.

    If you then keep using the "Open recent" menu entry you keep getting the wrong process.

    Theo
  • edited November -1

    Hi Theo,

    it is actually intended: the program tries to identify a layout file with a technology. When you load it again it will use the same technology than you had before. The reasoning is that if you use multiple technologies, you would like to associate files with different technologies and using the original one for the original files seemed to make sense. But I understand your wish to update the MRU entry when you change the technology.

    When you load a file from the command line without a technology, it should use "(Default)", which is the first one - that's right.

    Matthias

Sign In or Register to comment.