Skip to content

Add routing geometry constraints to DifferentialPairProps #743

Description

@0hmX

Summary

DifferentialPairProps currently exposes only positiveConnection, negativeConnection, and maxLengthSkew. This allows length matching, but it cannot express the routing geometry required for a controlled differential pair.

Tested with:

  • @tscircuit/props 0.0.585
  • @tscircuit/core 0.0.1468
  • tsci 0.0.2112

Current API

<differentialpair
  name="TX_PAIR"
  positiveConnection="TX_POS"
  negativeConnection="TX_NEG"
  maxLengthSkew={0.1}
/>

There is no prop for pair gap, pair-level width, routing layer, same-layer enforcement, maximum uncoupled length, or matched via transitions.

Reproduction / motivation

On a six-layer USB-C pass-through board, the autorouter can route the two members of a TX pair on different internal layers because the pair cannot require a common layer. For example, one generated route used top -> inner2 -> top while its partner used top -> inner1 -> top.

The reference design requires a 0.17 mm trace width, 0.28 mm differential-pair gap, and no more than 0.1 mm intra-pair skew. Only the skew can currently be represented by <differentialpair>.

Minimal shape of the problem:

<trace name="TX_POS" from=".J1 > .pin1" to=".J2 > .pin1" thickness="0.17mm" />
<trace name="TX_NEG" from=".J1 > .pin2" to=".J2 > .pin2" thickness="0.17mm" />

<differentialpair
  positiveConnection="TX_POS"
  negativeConnection="TX_NEG"
  maxLengthSkew={0.1}
  // No way to request a 0.28 mm gap or require both traces on one layer.
/>

Proposed props

An initial API could look like:

<differentialpair
  positiveConnection="TX_POS"
  negativeConnection="TX_NEG"
  traceWidth="0.17mm"
  traceGap="0.28mm"
  layer="inner1"
  requireSameLayer
  maxLengthSkew={0.1}
  maxUncoupledLength="1mm"
  viaGap="0.25mm"
  requireMatchedVias
/>

Possible schema additions:

  • traceWidth?: Distance
  • traceGap?: Distance (document whether this is edge-to-edge)
  • layer?: LayerRefInput
  • requireSameLayer?: boolean
  • maxUncoupledLength?: Distance
  • viaGap?: Distance
  • requireMatchedVias?: boolean

Target differential impedance could be handled separately because it depends on stackup dielectric and copper data.

Expected behavior

These props should be validated by @tscircuit/props and made available for downstream core/autorouter implementations. Post-route DRC should eventually be able to report violations of gap, same-layer, uncoupled-length, skew, and matched-via constraints.

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