Layout Verification
Design rule checks and layout-versus-schematic comparisons run through an
external engine selected by the engine argument: KLayout (DRC and LVS) or
Calibre (DRC). KLayout 0.29.12 or newer is required; each check stops with an
error naming an older version.
With engine="calibre", the rules file is an SVRF rule deck. Calibre runs a
copy of it whose LAYOUT PATH, LAYOUT SYSTEM, LAYOUT PRIMARY (when
the source is a component), DRC RESULTS DATABASE and DRC SUMMARY REPORT
(when the deck declares one) name the files of the check; the deck itself is
never edited. args holds Calibre’s command-line
arguments, such as ("-hier", "-turbo", "4"). The Calibre engine requires a
Photonic Canvas (PhotonForge Enterprise) license. Both engines return the same
verification.DRCResults.
The LVS schematic can come from the component itself: with schematic unset
or set to a Component, lvs_check writes a SPICE schematic from
Component.get_netlist. Routes built by the
parametric routing functions are written as wires and virtual connections as nets, so a routed component
is its own design intent, and so is its unrouted version.
pre_export_function adds the port markers and labels the rules file
extracts pins from.
Functions
Section titled “Functions”photonforge.drc_checkRun a design rule check (DRC) on a layout.photonforge.lvs_checkRun a layout-versus-schematic (LVS) comparison.photonforge.load_drc_resultsRead the results database of an earlier design rule check.photonforge.load_lvs_resultsRead the results database of an earlier layout-versus-schematic
DRC Results
Section titled “DRC Results”Coordinates are in micrometers. DRCResults is also available as
photonforge.DRCResults.
photonforge.DRCResultsResults of a DRC run, from any engine.photonforge.verification.DRCViolationThe markers of one rule (category).photonforge.verification.DRCCellA cell of the results.photonforge.verification.DRCCellReferenceAn example placement of a cell in another cell;parentis that cell’s key.photonforge.verification.PlacementMagnification, then mirroring about x, then counter-clockwise rotation, then displacement.photonforge.verification.DRCMarkerMarker of one violation, with the cell it was found in.photonforge.verification.EdgeMarkerOne edge, for rules that report edges.photonforge.verification.EdgePairMarkerTwo edges;symmetricfor same-layer rules (width, space), directed otherwise,photonforge.verification.PolygonMarkerA polygon with optional holes; boxes and paths are reported as polygons.photonforge.verification.TextMarkerA text output and its position.photonforge.verification.ValueMarkerAny other marker value, as the engine prints it (KLayout only).
Layout Pins
Section titled “Layout Pins”A photonic runset tells the ports of a passive cell apart only by layout
labels, which the layout export does not write. layout_pins returns a
pre_export_function for lvs_check that draws them on the layers
the runset reads: devices get their core shapes as an outline, a box at each
port and the port name; circuits get the names; routes nothing.
photonforge.verification.layout_pinsPre-export function that draws pins overPort.
LVS Results
Section titled “LVS Results”LVSResults is also available as photonforge.LVSResults.
photonforge.LVSResultsResults of a KLayout LVS run.photonforge.verification.LVSComparisonThe comparison of a layout circuit with a schematic circuit.photonforge.verification.LVSPairTwo objects KLayout paired; either side isNonewhen it found no partner.photonforge.verification.LVSMessageA comparison or extraction message.photonforge.verification.LVSGeometryA polygon attached to a message.photonforge.verification.LVSNetlistThe layout or the schematic netlist;circuitsis in file order, children first.photonforge.verification.LVSCircuitA circuit of a netlist, with lookups by id or index that raiseKeyError.photonforge.verification.LVSNetA net of a circuit, with its connections and, for the layout, its geometry per layer.photonforge.verification.LVSConnectionWhat a net connects to: a circuit pin, a subcircuit pin, or a device terminal.photonforge.verification.LVSLabelA text label KLayout attached to a layout net.photonforge.verification.LVSPinA circuit pin and the net it connects to.photonforge.verification.LVSDeviceAn extracted or schematic device;terminalsmaps terminal names to net ids.photonforge.verification.LVSDevicePartOne of the extracted devices combined into a device.photonforge.verification.LVSDeviceClassA device class;templatenames KLayout’s built-in class it derives from.photonforge.verification.LVSParameterDefinitionA parameter of a device class;primaryparameters are compared by LVS.photonforge.verification.LVSDeviceAbstractThe geometry of an extracted device, per terminal and layer.photonforge.verification.LVSSubcircuitAn instance of another circuit;pinsmaps its pin indices to net ids.photonforge.verification.LVSLayerA layer of the extraction and the layers and global nets it connects to.