diff --git a/docs/elements/differential-pair.mdx b/docs/elements/differential-pair.mdx index 95d0fdd..c056a6c 100644 --- a/docs/elements/differential-pair.mdx +++ b/docs/elements/differential-pair.mdx @@ -20,43 +20,30 @@ differential impedance, trace width, pair spacing, or parallel routing. ## Quick start with trace names -Use trace names when the same circuit creates the traces and the constraint. Give each `` a unique `name`, then reference those names from ``. ( - - - + + + @@ -65,31 +52,70 @@ Give each `` a unique `name`, then reference those names from In this example: -- `usb_dp` and `usb_dm` create the electrical connections. +- `USB_P` and `USB_N` create the electrical connections. - `` groups those connections for length matching. - `maxLengthSkew={0.05}` allows an absolute routed-length difference of up to 0.05 mm. -Supported autorouters try to add length, often as a meander, to the shorter -route. Routing can fail when there is no valid segment or enough room to meet -the tolerance. +## Quick start with pin selectors + +Use pin selectors when you want the pair declaration to identify each trace by +a pin it connects to. Each selector must resolve to one pin that belongs to +exactly one trace. Pins are ports in tscircuit, so `.U1 > .pin1` is a port +selector for a specific pin. + + ( + + + + + + + + + + ) +`} /> + +Only one pin from each trace is needed. Here, `.U1 > .pin1` and +`.U1 > .pin2` resolve to the two existing traces. A component selector such as +`.U1` is not enough; select a specific pin. ## Choosing trace names or pin selectors | Use | When to choose it | Example | | --- | --- | --- | -| Trace name | The same circuit defines and names the traces. | `positiveConnection="usb_dp"` | -| Pin selector | A reusable component knows its differential pins, while its parent creates the traces. | `positiveConnection=".USBC > .DP1"` | +| Trace name | The trace has a unique `name`. | `positiveConnection="USB_P"` | +| Pin selector | The selected pin connects to exactly one trace. | `positiveConnection=".U1 > .pin1"` | You may use a trace name for one connection and a pin selector for the other. Each value must ultimately resolve to exactly one trace in the same board or autorouted subcircuit. +If a selected pin connects to multiple `` elements, use a trace name +to avoid an ambiguous match. In +[phased autorouting](./autoroutingphase.mdx), the `routingPhaseIndex` prop +assigns a `` to a phase. Both traces in a pair must use the same value. + ## Properties | Property | Type | Description | | --- | --- | --- | | `name` | `string` | Optional name for the differential pair. | -| `positiveConnection` | `string` | Exact positive trace name or pin/port selector. | -| `negativeConnection` | `string` | Exact negative trace name or pin/port selector. | -| `maxLengthSkew` | `number` | Maximum absolute difference between the routed lengths, in millimeters. Accepts `0` through `1`; defaults to `0.1` mm. | +| `positiveConnection` | `string` | Exact positive trace name or port selector. | +| `negativeConnection` | `string` | Exact negative trace name or port selector. | +| `maxLengthSkew` | `number` | Maximum absolute difference between the routed lengths, in millimeters. Accepts any non-negative distance and defaults to `0.1` mm. | diff --git a/docs/elements/trace.mdx b/docs/elements/trace.mdx index 4ab9ab2..29d2ca9 100644 --- a/docs/elements/trace.mdx +++ b/docs/elements/trace.mdx @@ -154,17 +154,15 @@ refer to the traces by `name` or by a specific pin selector. ) `} /> -The constraint is passed to the autorouter. Supported autorouters try to add -length to the shorter route until the absolute difference is at most -`maxLengthSkew`. This only constrains routed length; it does not set pair -spacing or differential impedance. See the dedicated page for pin selectors, -reusable connector components, and troubleshooting. +`maxLengthSkew` sets the maximum absolute routed-length difference in +millimeters. It does not set pair spacing or differential impedance. See the +dedicated page for complete trace-name and pin-selector examples. ## Net vs Direct connections