through-hole PCB assembly

Length Matching Rules for DDR Routing: Groups and Tolerance

A parallel memory bus depends on several signals arriving together. The controller launches data, a strobe edge tells the device when to sample, and the margin between them is the window in which the whole bus works or fails. Trace length is the main variable an engineer controls, so length matching is where that margin is won or lost — but only if the matching is done against the quantity that matters, which is delay rather than distance.

Why Length Matters

Signals travel at a finite speed along a trace, and the propagation delay depends on the dielectric around the trace. Two routes of identical physical length on different layers do not take identical time to traverse, because one has more dielectric around it and the other has air and a soldermask layer above it.

What the bus cares about is the difference in arrival time between signals that must be sampled together. On a wide data bus, the byte lanes are sampled against their own strobes, and the address and command group is sampled against the clock. Each of those relationships has a budget: a window of skew across which the interface still reads correctly. Length matching is the process of keeping every route in a group inside that window.

The budget comes from the interface, from its speed and from the training the controller performs at start-up. Training can correct a certain amount of skew; the design’s job is to be inside the range that training can correct, with margin left for manufacturing variation.

Group Before You Measure

A group is a set of signals that must arrive together, and the grouping determines everything that follows.

For memory interfaces the natural grouping is the byte lane: the data conductors that share a strobe, together with the strobe itself and the associated mask signal. Each lane is matched within itself, and the lanes are matched to each other. The address and command group is treated separately, matched to the clock rather than to the data.

Getting the grouping right is more important than the number chosen for the tolerance, because a signal placed in the wrong group will be matched against the wrong reference and will fail in a way that looks like a length problem but is not.

Define the Start and the End

A length means nothing until the two points it is measured between are defined. The route begins at a specific pin of the controller and ends at a specific pin of the memory device, and the measurement must exclude the parts of the net that are not on the signal path — the internal connections inside a package or inside a component are not trace and cannot be tuned.

Where the topology is more complicated than a simple point-to-point connection, defining the path requires specifying pin pairs rather than whole nets, because a net may pass a device on its way to another and the length that matters is the portion between the two pins the signal actually travels between.

Components in the path complicate the definition further. A series resistor or a decoupling component between the driver and the receiver breaks the net into segments as far as the design tool is concerned, and the path has to be defined across those components before any matching rule can be applied to it. This is usually handled before the rule is set, not afterwards.

<img src="https://www.gopcba.com/wp-content/uploads/2024/09/6.jpg" alt="serpentine tuning on a memory bus routing layer” />

Choosing the Reference and the Tolerance

Every group needs a reference to measure against. The natural choice is a representative trace in the group — often one near the middle of the length distribution — so that the amount of tuning required is distributed rather than concentrated on one or two routes.

The tolerance is the permitted deviation from that reference. Its value comes from the interface and the rate: a slow bus tolerates a wide spread, and a fast one tolerates very little. Two practices improve the result. Keeping the tolerance as a single number for the group rather than a per-signal allowance makes the rule easy to verify. And being honest about which quantity is being matched matters: a rule expressed in length is convenient, but where routes change layers the delay difference is what has to be compensated, and a length-based rule can pass a design that is electrically mismatched.

Tuning the Routes

When a route is too short relative to its group, the additional length is added deliberately by routing it in a pattern that occupies space without changing the endpoints: a serpentine.

The parameters of that pattern are not arbitrary. The spacing between adjacent segments of the serpentine should be several times the trace width, because a serpentine whose loops are packed tightly couples into itself, and the coupling changes the effective delay of the added section — which defeats the purpose of adding it. Corners should be obtuse rather than square, since a sharp reversal is a reflection point and an etching hazard. The amplitude of the pattern should be moderate, so that the added section behaves like the rest of the trace rather than becoming a new structure with its own behaviour.

Where the tuning is placed also matters. The added section should be near the point in the route where the delay is needed, which is generally close to the receiver, so that the compensation is not undone by the remaining routing. And the pattern should not be placed where it would couple into another net or into a reference discontinuity.

The accumulated effect of vias belongs in the same calculation. Every layer change adds both delay and a discontinuity, and a route that changes layers several times has a delay that differs from a route of the same length that does not.

Test Points and Other Modifications

A test point added to a route changes its delay, both by adding a short branch and by loading the line. A route with a test point is not electrically identical to one without, and if the group contains a mixture the matching has to account for it — either by treating those routes separately or by applying a compensating correction.

The same applies to any deliberate non-uniformity: a route that must be routed around an obstacle, a section at a different width to escape a fine-pitch package, or a section on a different layer. Each of them is a known deviation, and the design is sound when the deviation is accounted for rather than ignored.

byte lane routing between a controller and memory devices

Verifying the Result

Verification is a batch process rather than a route-by-route one. Once the routing is complete, every group is measured against its rule, and the deviations are listed. That report is more useful than a repeat of the rule because it shows the distribution: a group whose members are all slightly over is a different situation from a group with one route far out, and they call for different corrections.

The final check is electrical rather than geometric. A simulation of the interface with the actual routing, including the layer changes and the tolerances of the materials, shows whether the timing margin is what the matching was intended to produce. Where the budget is tight, that simulation is what distinguishes a design that will work from one that merely measures correctly on paper.

The same margin concerns the signal quality at the receiver rather than only its timing, and the reasons a reflection or a reference discontinuity damages a fast bus are described in the note on the reflection coefficient and impedance. The routing arrangements that make matching practical on a memory bus are covered in the article on DDR routing topology, and the review items that belong with the routing are listed in the layout quality checklist.

FAQ

Why not match by length alone? Because two routes of the same length on different layers take different times. Where the routing changes layers, the matching has to be expressed as delay.

How close should the turns of a serpentine be? Far enough apart that the loops do not couple into each other. Tight spacing makes the added section behave differently from the rest of the trace, which is the opposite of the intent.

What should the reference trace be? A representative route in the group, often one of the middle lengths, so the tuning is distributed across the group rather than concentrated on a few routes.

Leave A Comment