# Electrical layout-versus-schematic runset for the receiver die, for KLayout. PhotonForge passes the
# exported layout, the schematic it writes from the nets declared on the die, and the results path.
source($gdsfile)
schematic($schematicfile)
report_lvs($resultsfile)

# Hierarchical extraction: every cell is compared with its own subcircuit
deep

# The layers that conduct: M1 and the tungsten plugs under it. The silicon, its implants and the
# germanium are left out, so a photodiode is a device between its two plugs and shows as two
# separate pins: a trace that bridged a photodiode would merge two declared nets into one.
m1 = input(14, 0)
contact = input(10, 0)

# The terminal names, written as text labels on M1 before export, name the nets
m1_labels = labels(14, 0)

connect(m1, contact)
connect(m1, m1_labels)

netlist
align
compare
