Skip to content

Fallback net labels for two pins of one chip are both anchored at the same port, leaving the other pin unconnected #5545

Open

Description

@peteking

If a net connects only two pins of the same chip, and the schematic router falls
back to net labels for it (other parts are in the way), both
schematic_net_labels are anchored at one port. The other pin gets no label, so
it's unconnected in the schematic, and in KiCad after export.

Reproduction

const sixteenPins = Object.fromEntries(
  Array.from({ length: 16 }, (_, i) => [`pin${i + 1}`, `P${i + 1}`]),
)

export default () => (
  <board width="100mm" height="80mm">
    {/* U1 pin1 and pin2 share net.TIE and nothing else is on that net */}
    <chip
      name="U1"
      footprint="dip8"
      pinLabels={{ pin1: "OUTA", pin2: "INA_N", pin3: "INA_P", pin4: "VEE", pin5: "INB_P", pin6: "INB_N", pin7: "OUTB", pin8: "VCC" }}
      connections={{ pin1: "net.TIE", pin2: "net.TIE", pin3: "net.VREF", pin4: "net.GND", pin5: "net.LV", pin6: "net.FB", pin7: "net.FX", pin8: "net.VP" }}
    />
    <chip name="U2" footprint="dip16" pinLabels={sixteenPins} connections={{ pin15: "net.FB", pin7: "net.K1", pin8: "net.K2" }} />
    <chip name="U3" footprint="dip16" pinLabels={sixteenPins} connections={{ pin15: "net.FB", pin7: "net.K3", pin8: "net.K4" }} />
    <resistor name="R1" resistance="18k" footprint="axial_p10.16mm" connections={{ pin1: "net.K2", pin2: "net.MID" }} />
    <capacitor name="C1" capacitance="22uF" polarized footprint="axial_p10.16mm" connections={{ pin1: "net.MID", pin2: "net.GND" }} />
    <resistor name="R2" resistance="1M" footprint="axial_p10.16mm" connections={{ pin1: "net.MID", pin2: "net.VREF" }} />
  </board>
)

tsci export index.circuit.tsx -f circuit-json:

U1 pin1 schematic_port center     (0.405, 3.700)
U1 pin2 schematic_port center     (0.405, 3.500)
schematic_net_label "TIE" anchor  (0.405, 3.500)
schematic_net_label "TIE" anchor  (0.405, 3.500)   <- expected (0.405, 3.700)

tsci check netlist is correct (NET: TIE - U1 INA_N, U1 OUTA), but the KiCad
export, read back by KiCad 10.0.8, gives:

TIE                          [U1.2]
unconnected-(U1-OUTA-Pad1)   [U1.1]

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions