Skip to content

D141 — Pin swap: the free-assignment oracle gains too little to build the pass

Context

M20's C2 item (doc 18 §4): "Pin and gate swap: feasibility experiment first ... measure routed count, vias and layers with and without the freedom. Build the pass only if the gain is large", on at least ten boards; a pass, if built, would only propose swaps (doc 18 §7). Vendors claim fewer crossings and layers, but no independent number was found. PCBench boards do not say which pins are interchangeable. The records are in bench/records/m20-c2/.

Decision

  • The experiment uses an oracle, bench/pin_swap.py: swappable groups by construction (connector signal pins: reference J, P, CN, CON or X, one pad type and size, not a supply, ground or differential-pair net by name, the net's only pad on the connector; resistor arrays RN/RP of 4, 8 or 16 pads, resistors as units either way round), nets assigned to pads by a minimum-cost assignment of the distance to the nearest pad of the net elsewhere (the Hungarian method, Kuhn 1955; a minimum Euclidean bipartite matching has no crossing pairs). The swapped copy permutes the pads' (net ...) nodes and nothing else.
  • Result: no clear gain (the 20 failing tier B-D boards with a group: open connections 982 → 978, 5 boards better and 5 worse, vias −3 %, length −1 %, 0 → 0 clean; the 10 quick boards with a group: 27 → 26 open, 7 → 6 clean). The pin-swap pass is not built, and C2 is closed with this measurement.

Alternatives

  • Pins from the schematic's library (pin functions, units of multi-unit symbols). The honest eligibility list, and what a pass would need; not needed to bound the gain, which the oracle overestimates.
  • Gate swap of logic parts (74xx units). Needs the symbols' unit structure; the PCBench boards with such parts are few, and a connector group is the larger freedom.
  • Crossing count as the oracle's cost. Distance matching already removes crossings between the group's own connections; the routed result, not a proxy, is what was measured.

Consequences

  • The oracle is an upper bound: on these boards the order of connector pins is not what leaves connections open (C5, doc 05 §55, says what does). A swap pass would cost an eligibility list the user must supply and a back-annotation step, for about 3 % of vias.
  • bench/pin_swap.py stays for boards where the eligibility is known (a user's own); the layer count was not measured on the swapped copies.
  • Docs: 05 §56, 18 §11, 11 (M20 row).