klayout icon indicating copy to clipboard operation
klayout copied to clipboard

Support for standalone LEF files

Open growly opened this issue 2 years ago • 7 comments

It would be nice to read a LEF file on its own in order to verify the abstracts generated for leaf cells. These LEFs are typically quite simple, but can require their own UNITS, i.e.:

UNITS
    DATABASE MICRONS 1000 ;
END UNITS

As I (now) understand this isn't supported by klayout yet. I can open the LEF file but with the UNITS stanza it fails:

Trying to read this in klayout yields an error: image

(The full file is here: test.lef.zip)

Without that stanza I imagine it's treated more or less like a DEF file, and renders correctly.

growly avatar Dec 05 '22 12:12 growly

There is a misunderstanding. KLayout does not read LEF files. It reads DEF files, and supports LEF as companion files. There is no "LEF" format support on "File/Open".

The only way currently to import LEF alone is by using "File/Import/LEF".

LEF-only support is questionable as LEF files often are only meaningful together with other LEF files (technology LEF) and a single LEF file often is not comprehensible without that context. A DEF file in that sense it is top level entity from which reading of a layout makes sense.

If you need LEF-only support, please rephrase the issue to an enhancement: support LEF-only file reading.

Matthias

klayoutmatthias avatar Dec 05 '22 22:12 klayoutmatthias

I see! Thank you for clarifying. I will rephrase the issue.

growly avatar Dec 05 '22 22:12 growly

Very good. I'd like to know what the master of LEF/DEF (@stefanottili) has to say to that :)

klayoutmatthias avatar Dec 05 '22 22:12 klayoutmatthias

Besides “just having a look”, the other use case to read Macro lef is to be able to compare (dbdiff/xor) IP deliverables. Unlike reading def there is no need to read technology lef to read macro lef. So there is no reason not to read pin and obs geometry and pin text of macro lef files and treat it as layout data the same way you would with gds/oasis/def or drc results.

stefanottili avatar Dec 07 '22 07:12 stefanottili

Is this "as simple" as adding support for the DATABASE unit-spec line for LEFs?

growly avatar Dec 13 '22 08:12 growly

No that is not the issue. LEF reading works. But when you use "File/Open", DEF is expected. LEF is not supported yet.

klayoutmatthias avatar Dec 13 '22 19:12 klayoutmatthias

Did not want to close it.

klayoutmatthias avatar Dec 13 '22 19:12 klayoutmatthias