dan-fritchman / Layout21

Integrated Circuit Layout
BSD 3-Clause "New" or "Revised" License
47 stars 10 forks source link

Expand LEF Support to include the technology components #43

Open dan-fritchman opened 1 year ago

dan-fritchman commented 1 year ago

The Lef21 docs begin with:

LEF is near-ubiquitously used IC-industry-wide for two related purposes:

LEF design libraries, primarily comprised of LEF macros, provide the physical abstract view of circuit designs. Such abstract-views are commonly the target for layout-synthesis programs ("place and route"). They include a circuit's pin locations and requirements for physical blockages ("obstructions"), among other metadata, typically without including the circuit's internal implementation. LEF technology descriptions ("tech-lef") provide a concise description of design-rules for assembling such cells, as commonly performed by layout-synthesis software.

Lef21 includes comprehensive support for parsing and writing LEF design libraries, primarily stored as its [LefLibrary] and [LefMacro] types. A select subset of tech-lef features are also supported, particularly those which blur the lines between technology and library data.

This issue: add the latter "tech-lef" content.
This will be especially valuable for other layout21 use cases which endeavor to auto-generate layout from existing technology data - especially from tech-LEF.


Likely Implementations

nanobowers commented 3 months ago

Per the lef documentation (http://coriolis.lip6.fr/doc/lefdef/lefdefref/lefdefref.pdf) page 11, there is some overlap of allowed statements between what's in a tech-lef vs. a library-lef, is your idea to have something like this?

Lef
-> overlapping items here (version, busbitchars, via, site, beginext...)
-> Optional<LefTech> (LAYER, NONDEFAULTRULE and other tech-only statements)
-> Optional<LefLibrary> (MACRO and other library-only)
dan-fritchman commented 3 months ago

Wasn't sure honestly!

I think the primary options are (a) that, or (b) just having a bunch of overlapping fields (perhaps with some macro-assistance), or (c) just one big thing called Lef, no explicit LefLibrary vs LefTech

nanobowers commented 2 months ago

Thinking about this a little more, there are two main approaches I can think of:

Skipping over the pros/cons of the first method, the second method has the following pros/cons

A hybrid method is possible/practical: certain tech constructs could be fully parsed/supported and other unsupported/undersupported constructs would be captured as LefGenericAttribute. Maybe this would be be more confusing, unsure.