Support for properties on vias in LEF

I have a LEF where I've put a property on a VIA in LEF. When I load this into KLayout I get:

ERROR: ./util/def2gds.py:10: Expected token: END (line=1978, cell=, file=14lppxl_13m_tech.lef) in Layout.read
./util/def2gds.py:10 (class exceptions.RuntimeError)

The relevant line is:

PROPERTY OR_DEFAULT 1 ;

I looked at dbLEFImporter.cc and I didn't spot any support for properties on vias. I can generate a test case if needed but this seems to be an omission. No other tools have had an issue with this LEF.

Comments

  • Hi,

    Could you please provide more context? Like where this property line appears? Ideally you would provide a short test file that reproduces the problem.

    LEF/DEF underwent some heavy refactoring recently, but this new version is not finalized yet. I can try if this problem vanishes with this branch.

    Matthias

  • I will put one together but it is just inside a VIA statement in LEF. Btw, why write your own parser when Si2 provides an open source parser (https://si2.org/oa-tools-utils-libs/)

  • This is a minimal LEF to reproduce the problem. I'm not sure how to upload an attachment or I would provide a more complete test case. Thanks.

    VERSION 5.6 ;

    UNITS
    DATABASE MICRONS 2000 ;
    END UNITS

    PROPERTYDEFINITIONS
    VIA OR_DEFAULT STRING ;
    END PROPERTYDEFINITIONS

    LAYER metal1
    TYPE ROUTING ;
    END metal1

    LAYER via1
    TYPE CUT ;
    END via1

    LAYER metal2
    TYPE ROUTING ;
    END metal2

    VIA via1_4 DEFAULT
    LAYER via1 ;
    RECT -0.035 -0.035 0.035 0.035 ;
    LAYER metal1 ;
    RECT -0.035 -0.07 0.035 0.07 ;
    LAYER metal2 ;
    RECT -0.035 -0.07 0.035 0.07 ;
    PROPERTY OR_DEFAULT Y ;
    END via1_4

    END LIBRARY

  • edited June 2020

    There is an "attach file" button (the "document" thing) in the comment editor. Wrap it all in a .zip file, so it gets accepted as a legal file format.

    And you don't need to point me to Si2 sources. I know them well. If this means you volunteer for integrating third-party code into KLayout and maintaining this solution, you're welcome to do so. I'd be really happy to drop that crap from the source base. But please don't expect me to justify my decision not to use their code.

    Matthias

Sign In or Register to comment.