syntax for layoutOptions.lefdef_config.map_file

What is the proper syntax for the layermap file for layoutOptions.lefdef_config.map_file in a python script executed in line with klayout -zz -rd ... ?

I have tried :

# KLayout layer_map :

But I got a warning :

Warning: Reading layer map file /home/laurent/OpenROAD-flow-scripts/flow/results/my_tech/my_design/base/layermap.txt, line 2 not understood - skipped

Thanks, BRgds,



  • Hi Laurent,

    this brief description is taken from "strm2xxx":

        --lefdef-map                                 Specifies to use a layer map file
              Use this option to turn off pattern-based layer mapping and to use an
              explicit mapping file instead. See '--lefdef-via-geometry-suffix' for
              a description of the pattern-based mapping scheme.
              Using a map file is an alternative way to specify layer mapping. With
              a layer mapping file, the individual target layers need to specified 
              individually for different layer/purpose combinations.
              The mapping file is one layer mapping entry per line. Each line is a 
              layer name, followed by a list of purposes (VIA, PIN ...) and a layer
              and datatype number. In addition, 'DIEAREA' can be used to map the 
              design outline to a layer. 'NAME' in place of the layer name and 
              using layer/purpose in the purpose column allows mapping labels to 
              specific layers.
              This is an example for a layer map file:
              DIEAREA ALL 100 0
              M1 LEFPIN 12 0
              M1 PIN 12 2
              M1 NET 12 3
              M1 SPNET 12 4
              M1 VIA 12 5
              M1 BLOCKAGE 12 10
              NAME M1/PIN 12 10
              VIA1 LEFPIN,VIA,PIN,NET,SPNET 13 0
              M2 LEFPIN,PIN,NET,SPNET,VIA 14 0
              If a map file is used, only the layers present in the map file are 
              generated. No other layers are produced. 

    The format was developed with @StefanThiede and I understand it is basically the layer map format Encounter uses (I am not an Encounter user, so I cannot verify that).

    Best regards,


  • Thank you Matthias and Stefan. I found my way to write the file for the OpenROAD flow as I wrote in :


Sign In or Register to comment.