Games / Command flash cards / Layout and parasitic formats / LEF (Library Exchange Format) macros

LEF (Library Exchange Format) macros

Each card shows a command to explain. A missed card returns later in the round and starts the schedule over. A card answered correctly moves up the schedule and next appears after 1, 3, 7, then 21 days. Keys 1 to 4 choose an option, h shows a hint, and Enter moves on. A hint keeps the card where it is on the schedule. An ordering card is answered by clicking its items in order, and one wrong click ends it. Time values are in nanoseconds. Progress is stored in this browser.

SourceFour formats carry a design between tools: LEF (Library Exchange Format) for the technology and the cells, DEF (Design Exchange Format) for the layout, SPEF (Standard Parasitic Exchange Format) for extracted wires, and SDF (Standard Delay Format) for annotated delays. The LEF (Library Exchange Format) excerpts here are quoted from the Nangate45 files that OpenROAD-flow-scripts ships; the rest follow the formats as OpenROAD and OpenSTA read them. Reference: the OpenSTA command reference (the open flow on GitHub).
All 8 cards in this section, with answers
  • MACRO INV_X1 CLASS core ; ORIGIN 0 0 ; SYMMETRY X Y ; SITE FreePDK45_38x28_10R_NP_162NW_34O ; SIZE 0.38 BY 1.4 ;
    The cell's outline and the flips it allows, on the site it belongs to.

    Hint: One of these lines is what lets a placer flip the cell.

    SYMMETRY X Y says the cell may be mirrored about either axis, which is what optimize_mirroring uses and what lets rows alternate orientation and share rails. CLASS core marks it a standard cell; a hard macro is CLASS BLOCK, and a pad is CLASS PAD. the open flow reference

  • PIN A DIRECTION INPUT ; PORT LAYER metal1 ; POLYGON 0.06 0.525 0.165 0.525 0.165 0.7 0.06 0.7 ; END END A
    The pin's direction and the shapes the router must reach.

    Hint: Ask what the router needs to know about a pin beyond its name.

    The layer is named with the shapes. A pin can have several ports and several shapes, which is why a router computes access points rather than aiming at a coordinate. Everything the outside world may touch is here; the cell's insides are not in LEF (Library Exchange Format) at all. the open flow reference

  • OBS LAYER metal1 ; RECT 0.0 0.0 0.38 1.4 ; END
    Blocked area: metal inside the cell that routing must avoid.

    Hint: It is inside the macro but is not a pin. Ask what it forbids.

    The cell's internal wiring already occupies parts of the lower layers, so the router must know where it cannot put its own. On a hard macro, obstructions over several layers are what force routing to go around or above it. the open flow reference

  • ANTENNAGATEAREA 0.05225 ; ANTENNAPARTIALMETALAREA 0.018375 LAYER metal1 ;
    The gate and metal areas the antenna check compares.

    Hint: Ask which check needs a ratio between two areas.

    The ratio between them is what the rule limits: metal area against the gate area it connects to, so the library has to declare the gate area behind each pin and the metal the cell itself already contributes. check_antennas adds the routed metal to these. the open flow reference

  • SITE FreePDK45_38x28_10R_NP_162NW_34O ; SIZE 0.38 BY 1.4 ;
    The cell is one row tall and two sites wide.

    Hint: The site is 0.19 by 1.4. Compare that with the size.

    Every standard cell is a whole number of sites wide and a whole number of rows tall, which is what lets them abut with the rails lining up. A cell that is two rows tall is a double-height cell, and it must start on a row of the right orientation. the open flow reference

  • FOREIGN INV_X1 0.0 0.0 ; ORIGIN 0 0 ; SYMMETRY X Y ;
    The layout cell this abstract stands for, and the flips that are legal.

    Hint: One line points outside the file. The other says how the cell may be turned.

    FOREIGN names the real cell in the GDSII (Graphic Design System II) file that this abstract represents, so the two can be merged at streamout. SYMMETRY X Y says the cell may be mirrored about either axis, which is what lets a placer flip cells so that rails abut. the open flow reference

  • CLASS CORE ; CLASS BLOCK ; CLASS PAD ; CLASS CORE SPACER ;
    What kind of object it is, which decides how it may be placed.

    Hint: Ask what each one tells the placer to do with the object.

    A core cell goes in a row, a block is a hard macro placed by hand or by the macro placer, a pad sits in the ring at the edge of the die, and a spacer is filler. The class also decides whether a cell is counted in the design's area and whether it blocks routing. the open flow reference

  • PIN VDD DIRECTION INOUT ; USE power ; SHAPE ABUTMENT ; END VDD
    A rail that connects by touching its neighbour's rail in the row.

    Hint: Ask how this pin gets connected, given that no router ever touches it.

    SHAPE ABUTMENT means the shape reaches both edges of the cell, so a row of cells forms a continuous rail with no routing at all. The grid then only has to drop straps onto that rail. A macro's supply pins have no such shape and must be connected explicitly. the open flow reference