Module 1: The Physical Design Landscape · 1.2 The Open-Source EDA Stack

Magic, Netgen and KLayout

Yosys and OpenROAD generate design data. Yosys synthesizes a gate-level netlist. OpenROAD produces a placed and routed layout. This article introduces the physical verification tools. These tools verify that the generated layout is correct and manufacturable.

Magic: Interactive Layout Tool and DRC Engine

Magic performs three primary tasks in physical design. It operates as an interactive layout editor to draw, inspect, and modify polygons. It operates as a design rule checking (DRC) engine to verify polygons against foundry rules. It also exports the final layout to the standard GDSII stream format.

In the OpenLane flow, Magic runs mostly in batch mode without a graphical interface. Designers can also start Magic interactively to inspect standard cells and mask polygons directly.

Launch Magic with the SKY130 technology file to inspect a layout:

magic -T sky130A.tech design.mag

Magic displays a color-coded canvas. Each color represents a distinct mask layer defined in the technology file. Polysilicon, diffusion, and metal1 layers use distinct colors. An adjacent Tcl console accepts query and editing commands. Magic makes the mask polygon layer visible to the designer.

Netgen: Layout Versus Schematic Verification

Design rule checking cannot verify electrical connectivity. A layout can satisfy every design rule and still contain incorrect circuit connections. Routing errors can short two distinct nets together or leave a required connection open.

Layout versus schematic (LVS) verification detects these connectivity errors. Netgen performs LVS in this open-source tool stack. Netgen extracts a transistor-level netlist directly from the layout polygons. Netgen then compares this extracted netlist against the synthesized structural netlist. A clean LVS report confirms that the physical layout matches the intended electrical circuit.

Netgen compares the netlist extracted from layout against the synthesized netlist
Figure 1: LVS: layout versus schematic

KLayout: Independent Layout Viewer and Verification Engine

KLayout is a fast layout viewer for GDSII and OASIS files. Designers use KLayout daily to inspect large layouts quickly. KLayout does not require the complex technology file setup that Magic requires for basic viewing. KLayout also contains an independent DRC and LVS engine.

This tool independence improves verification reliability. Magic and KLayout use separate software implementations to evaluate the SKY130 rule deck. Two independent engines catch software bugs that a single tool can miss. If both tools report zero errors, confidence in the design increases. If the tools disagree, the engineering team must investigate the discrepancy before tapeout.

Commercial ASIC design teams apply this same signoff strategy. Commercial flows frequently run both vendor rule decks and foundry golden rule decks before tapeout. Module 9 demonstrates this dual signoff methodology with Magic DRC and KLayout DRC. Skipping either check reduces verification coverage.

Practice Exercise

A layout passes Magic DRC but fails Netgen LVS. Netgen reports an electrical short between two separate nets. Explain how a layout can be DRC-clean and LVS-broken simultaneously.

Solution

DRC and LVS verify different design requirements. DRC validates geometric dimensions, including polygon widths, spacings, and enclosures. DRC does not check which nets the polygons connect.

LVS validates electrical connectivity against the schematic or structural netlist. Two wires can obey all width and spacing rules while touching each other incorrectly. This creates an illegal electrical short that violates LVS rules. DRC cannot detect this error because DRC evaluates only geometric rules, not netlist intent.

The next article examines OpenLane. OpenLane orchestrates Yosys, OpenROAD, Magic, Netgen, and KLayout into an automated ASIC design flow.

← Yosys and OpenROAD OpenLane as Orchestrator →