Support Forum

Is there a way to import layer color and fill patterns?

Michael

Saturday 8th May 2021
I'm trying to view a stream file generated from Cadence Virtuoso. In the Cadence world I have put a lot of effort into making my layout look very good by editing all the layer colors and fill patterns etc. via the display.drf file (the default colors Cadence uses are just about the ugliest possible). Is it possible to configure Layout so that everything looks the same by importing the display.drf file?
Jürgen
LayoutEditorFull
Sunday 9th May 2021
There is by far more than one way to import layer setting. In you case just place the *display.drf* file and the *strmInOut.layertable* in the working folder you start the LayoutEditor from. Also activate the option *setup/user_interface/load layer setting in working folder*. With the next start from that folder both files will be read and the layer names and color set accordingly. You will need both file as one contains the layer names/gds numbers and the other file the color and fill style infos.
Michael

Monday 10th May 2021
Thanks for your response! Actually, is any of that in the documentation? I did try searching for "display.drf" or similar things but the way the documentation is provided makes searching very difficult - is it available as a pdf file so I can search the whole documentation at once? As you suggested, I put my display.drf file into the same folder as my gds file (I don't have a strmInOut.layertable file) and I set the preferences to load the layer settings. I then quit LayoutEditor. I'm on a Mac, so I set my .gds file to be opened by LayoutEditor when I double-click on it. However, when I then double-clicked on my gds file the layout came up the same way as before i.e. it the display.drf file wasn't used. Am I doing something wrong? In case it matters, I'm just using the free version to view the layout.
Jürgen
LayoutEditorFull
Tuesday 11th May 2021
Michael, the location of the GDS file does no matter, the way how you start the LayoutEditor is important. On Mac you need to open a terminal window, change the directory to the folder containing the *display.drf* file and a *.layermap* file. and start from there via the terminal window the LayoutEditor (usually by typing /Applications/layout.app/Contents/MacOS/layout ) Alternatively you can also load the *display.drf* file manual via the LayerManager , press the little + in the lower left of the LayerManager and choose *Import Layer Setting* with selecting the your *display.drf* file. A *display.drf* file contains layer names, color and fill style. Loading the file will not have an effect in case no layer is named. So you need to name the layer number with the names used in the display.drf file before its load. This step is normally done with the *.layertable* or also sometime called *.layermap* file. This type of layer setup if used by X-Fab PDK. So you will find some information about it in the section on the X-Fab PDK installation under SchematicEditor/libraries/xfab in the manual: https://layouteditor.org/schematiceditor/libraries/xfab
Michael

Thursday 13th May 2021
Thanks again Jürgen. I looked around for a layer file that corresponded with my display.drf and couldn't find one (I didn't really know too many places to look though). Would you please be able to post an example layer file and I'll try modifying it to make it work with my display.drf file. I would really appreciate this.
Jürgen
LayoutEditorFull
Thursday 13th May 2021
The layermap format was defined by Cadence. So you will find a full spec there. A typical file may look like below. Any line starting with a # is a comment. ``` # File( strmInOut_abc ) # $Id: strmInOut.layertable ##################################################### # Cadence | Cadence | Stream | Stream # # layerName | purpose | number | datatype # #---------------+---------------+--------+----------# CONT drawing 5 0 MET1 drawing 6 0 VIA1 drawing 7 0 MET2 drawing 8 0 ```
Michael

Thursday 13th May 2021
I tried following your instructions, but still couldn't make it work. Each time I used your method of loading the display.drf file using the "+" button at the bottom left of the Layer Manager window. The display.drf file and the .layermap were each located in the same directory as the gds file. Here is a section of my display.drf file: ``` ;-------------------------------- LAYOUT -------------------------------------------------- ;( DisplayName PacketName Stipple LineStyle Fill Outline [FillStyle]) ( display NWELL_drawing dots1in64 dashed forest forest outlineStipple) ;TSMC_018 Layer 2 ( display NIMP_drawing dots1in16a solid green green outlineStipple) ;TSMC_018 Layer 8 ( display PIMP_drawing dots1in16b solid maroon maroon outlineStipple) ;TSMC_018 Layer 7 ( display DIFF_drawing backSlash thickLine2 base01_s base01_s outline ) ;TSMC_018 Layer 3 ( display VTM_N_drawing blank dash1_42w2 green green outline ) ;TSMC_018 Layer 24 ( display VTM_P_drawing blank dash1_42w2 maroon maroon outline ) ;TSMC_018 Layer 23 ``` and here are the corresponding sections of two versions of the .layermap file that I tried when loading the display.drf file. This first try was simply following the format of your original example: ``` NWELL drawing 2 0 NIMP drawing 8 0 PIMP drawing 7 0 DIFF drawing 3 0 VTM_N drawing 24 0 VTM_P drawing 23 0 ``` The second try was following your instructions where you said "you need to name the layer **number** with the **names** used in the display.drf file before its load": ``` NWELL drawing NWELL_drawing 0 NIMP drawing NIMP_drawing 0 PIMP drawing PIMP_drawing 0 DIFF drawing DIFF_drawing 0 VTM_N drawing VTM_N_drawing 0 VTM_P drawing VTM_P_drawing 0 ``` Each time I tried loading the display.drf file I didn't see any changes. Sorry to keep bothering you about this :-(.
Michael

Thursday 13th May 2021
Sorry - I pasted in those sections from my display.drf and .layermap files into the area where I was making my post and all the carriage returns were apparently deleted for some reason when my text wants posted (making everything super hard to read). I can't figure out how to edit my post or fix the carriage return issue. It certainly looked good before I hit the reply button!
Michael

Thursday 13th May 2021
OK - something must be wrong with the forum software. After posting my "Sorry" post I now see that all the carriage returns have been properly restored in post that looked completely broken before. Sigh. I'm sure you must think I'm a real pain in the neck by now...
Jürgen
LayoutEditorFull
Thursday 13th May 2021
Try this layermap file: ``` NWELL_drawing drawing 2 0 NIMP_drawing drawing 8 0 PIMP _drawing drawing 7 0 DIFF_drawing drawing 3 0 VTM_N _drawing drawing 24 0 VTM_P _drawing drawing 23 0 ``` After loading this file the layer 2 should be named *NWELL_drawing*, layer 8 *NIMP_drawing* and so on. Your display.drf file will give the layer named *NWELL_drawing* the color fill style setup previously defined in that file.
Jürgen
LayoutEditorFull
Thursday 13th May 2021
The forum uses markdown highlighting. To quote text with a fixed character width and highlighted as code put it between a triple ` . I have edited your text and edited these character to get your post readable.
Michael

Thursday 13th May 2021
I just tried your suggestion but it still didn't work :-(. Is there a log file or something that might help debug this? I have attached my display.drf and .layermap files. While I remember, is it possible for the load display.drf dialog box to remember the last place it was at - I have to keep navigating to the right directory.
Jürgen
LayoutEditorFull
Thursday 13th May 2021
there is an option *--debug* you can add when starting the LayoutEditor from command line. It will output a lot of debugging information to the terminal the LayoutEditor is started from.
Michael

Thursday 13th May 2021
For the first time, I tried starting layout from a terminal in the directory where the gds file, display.drf and .layout files all exist and the layer assignments then worked. Up until then, I always starting layout by double-clicking the gds file and then loading the display.drf file via the Layer Manager dialog box. This is what I saw in my terminal window doing the above: ``` mick@Micks-MBP16 Lhasa % /Applications/layout/layout.app/Contents/MacOS/layout --debug adc_usar.gds enable debug check license .... creating new layout creating GUI font size correction 1.296512 (77130) load layer map: .layermap load display file: /Users/mick/Employment/ZJW/Lhasa/display.drf ``` I then quit lqyout and started it in a different directory (not containing any of the above files) and issued the command: ``` mick@Micks-MBP16 ZJW % /Applications/layout/layout.app/Contents/MacOS/layout --debug ``` It started up the layout application, however I could already see the layer assignments were the same as when I ran it the last time. I then did File->Open and navigated to the gds file and opened it. Again, the layers were already OK from the last time, This was my terminal output: ``` mick@Micks-MBP16 ZJW % /Applications/layout/layout.app/Contents/MacOS/layout --debug enable debug check license .... creating new layout creating GUI font size correction 1.296512 (77130) start time: 3860 ms LayoutEditor started from /Applications/layout/layout.app/Contents Start operation 'openFile' start gds open magic bytes 0 6 HEADER 5 BGNLIB Modification: 2021:4:29,22:11:15 Access: 2021:5:7,8:33:13 LIBNAM lhasa UNITS userunits 1.000000e-03 databaseunits 1.000000e-09 BGNSTR Modification: 2021:5:7,8:33:13 Access: 1969:12:31,19:0:0 STRNAM Libname M2_M1_CDNS_620390792760 BONDRY LAYER 17 DATATYPE 0 XY 5 0: -130 390 5 1: 130 390 5 2: 130 650 5 3: -130 650 5 4: -130 390 5 ENDEL ``` As you can see, the display.drf and lay out files were not referenced. I then went into the Layer Manager and opened the display.drf file and got the following output in the terminal window: ``` load display file: /Users/mick/Employment/ZJW/Lhasa/display.drf ``` However, unlike when I opened the gds file from the directory where everything existed, this time there was no mention of opening the .layermap file. So it seems to me that opening the display.drf file via the Layer Manager dialog box does NOT automatically load the .layermap file.
Jürgen
LayoutEditorFull
Friday 14th May 2021
> However, unlike when I opened the gds file from the directory where everything existed, this time there was no mention of opening the .layermap file. So it seems to me that opening the display.drf file via the Layer Manager dialog box does NOT automatically load the .layermap file. No it does not. You need to load the .layermap file first is the same way you load afterwards the display.drf file.
Michael

Friday 14th May 2021
Thanks again for responding. I'm not sure I agree with the way this is done. For starters, one file is no good without the other so they should be loaded together just like when you start LayoutEditor in the same directory as those files. Additionally, if you do try to open the .layermap file via the file navigation dialog box then it doesn't show that file because it is invisible (by default) on the Mac and there is no straightforward way to reveal it so that you can select it. I would suggest that if you try to load display.drf via the Layer Manager then it should be automatic that the .layermap file loads also (to be consistent). Is this something you would consider?
Jürgen
LayoutEditorFull
Saturday 15th May 2021
Thanks for pointing me the is visibility issue for *.layermaps* files. This will be fixed with the next update. An automatic load of a *.layermap* file is not a good idea in my opinion. The naming convention is not always clear. In PDK I have already seen it named as *.map* file or *.layertable* or *.layer_map*. Even different name versions next to each other. With an antomatical load you will lost control which file is loaded and it is getting harder to retrace the settings origin and do adjustment if required.
Michael

Saturday 15th May 2021
Thanks. I'll leave this topic now that you have a fix proposed. The only parting comment I'd have, as a user and not a programmer, is that you offer your users consistency. When you start LayoutEditor in a directory containing display.drf and e.g. a .layermap file then you surely must have the potential filename conflicts you spoke of in place, yet a choice of files to load is made and the user appreciates starting up in a fully configured environment. If you started LayoutEditor from somewhere else and want to open up a new layout in a different directory also containing the same layer files then it would also be appreciated by the user to have the same configuration environment (ideally without having to do something special like going to the Layer Manager and loading up the layer environment when all the files are already there). All I ask for is consistency and not an inconsistent mess of rules and requirements.