Skip to content

klayout cannot open CIF files exported by LASI tlc2cif #28

@coldlogix

Description

@coldlogix

LASI generates CIF files which fail to be identified as CIF by klayout.

LASI has a tool, tlc2cif, that outputs files like the one attached (lasi.cif.txt -- note, I had to add the .txt suffix so github would upload it, though klayout is perfectly happy with the .txt extension using klayout -e lasi.cif.txt)

The CIF file unfortunately contains
DS#1 2/2;
as the first part of the 'signature', and while the klayout cif parser can parse this, the klayout code that checks to see if this is a CIF file is more restrictive, wanting "DS <number>" instead of D<seperator>S<seperator><number>

Simply changing
DS#1 2/2;
to
DS 1 2/2;

allows klayout to properly identify, and then parse and open the file, but as far as I can tell, there's nothing illegal about using # as a separator as LASI does. And the only problem is that klayout doesn't recognize the file as a CIF file because it fails to find the "DS #" signature.
(lasi-klayout.cif.txt has this change made)

lasi.cif.txt
lasi-klayout.cif.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions