Skip to content

High-speed PCB · DDR4 · DDR5 · SI/PI

How to Route DDR Memory on a PCB: A Practical DDR4 and DDR5 Layout Guide

Stack-up, placement, fly-by routing, byte-lane length matching, return paths and the SI/PI checks that catch problems before fabrication, with real routing from our own boards.

By (Elecmore UK Ltd)  ·  27 October 2026  ·  11 min read

Altium Designer screenshots from an Elecmore board: two length-matched LPDDR byte lanes routed on an inner layer, and the assembled board in 3D view
From one of our boards in Altium Designer: LPDDR byte lanes with length tuning, and the board in 3D

How do you route DDR memory on a PCB?

To route DDR memory on a PCB, plan a controlled-impedance stack-up first, place the memory close to the controller, then route each data byte lane as a matched group on one layer with its strobe. Route address, command and clock in a fly-by chain, keep solid reference planes under every signal, and verify with SI/PI simulation before fabrication.

Key takeaways

  • Most DDR problems are decided before routing starts: stack-up, placement and topology.
  • Match lengths inside each group (byte lane, address/command), not across the whole interface.
  • Every DDR signal needs an unbroken return path. Plane splits under DDR traces are a common cause of failures.
  • Follow the memory and controller vendor design guides. JEDEC sets the standard, but the exact tolerances come from the vendors.
  • DDR5 has less margin than DDR4, so simulation and an independent design review matter more.

Why DDR routing causes so many board respins

DDR is often the fastest and most timing-sensitive interface on an embedded or FPGA board. A layout that looks clean in the CAD tool can still fail memory training, pass on the bench and fail in the field, or only work at a lower speed grade.

The frustrating part is that DDR faults are rarely obvious. An unbroken-looking trace can sit over a plane split, a byte lane can drift out of its timing window after a late component move, or the power delivery network can sag under load. By the time the board is on the bench, fixing any of these usually means another spin.

This guide walks through how experienced high-speed PCB designers approach DDR4 PCB layout and DDR5 PCB layout, from stack-up planning to final verification. It is written for UK and European hardware teams, but the principles apply to any DDR routing job.

DDR basics for PCB layout

Every DDR interface splits into a few signal groups, and each group has its own routing rules. Getting the grouping right is the foundation of good DDR layout guidelines.

  • Data (DQ) and data mask (DM/DBI): grouped into byte lanes of 8 bits, each with its own strobe.
  • Data strobes (DQS): differential pairs that clock the data in each byte lane.
  • Address, command and control: shared across all memory devices, usually routed fly-by on DDR3 and later.
  • Clock (CK): a differential pair that times the address and command bus.

The memory standards are set by JEDEC, while the exact routing tolerances come from your memory and controller vendor design guides. The table below gives a high-level comparison of the main generations. Data rates are typical published ranges.

DDR3DDR4DDR5
Core voltage1.5 V (1.35 V for DDR3L)1.2 V1.1 V
Typical data rates800 to 2133 MT/s1600 to 3200 MT/s4800 MT/s and above
Address/command topologyFly-byFly-byFly-by
Power on moduleRegulated on motherboardRegulated on motherboardPMIC on DIMM
Key layout differenceWrite levelling introducedTighter timing, more pins, bank groupsTwo sub-channels per DIMM, much smaller SI margins

LPDDR4 and LPDDR5 follow similar principles but use point-to-point connections, lower voltages and very short routes, which suits compact embedded and mobile designs.

Before you route: planning the DDR layout

The best DDR routing decisions happen before the first trace is drawn. Rushing this stage is the most common reason a layout ends up fighting itself later.

Plan the PCB stack-up for DDR

Start with a controlled-impedance stack-up agreed with your board house. Typical starting targets are around 40 to 50 ohms single-ended and 80 to 100 ohms differential, but always use the values in your controller's design guide. Make sure every DDR signal layer sits next to a solid ground or power reference plane.

Altium Designer Layer Stack Manager showing an 8-layer 1.2 mm stack-up in TU768: TOP, L2 GND, L3 inner signal, L4 GND, L5 and L6 power, L7 GND and BOTTOM
An 8-layer, 1.2 mm stack-up from one of our boards: the inner signal layer L3 sits between two ground planes

The laminate matters as well as the layer order. The stack-up above uses a high-Tg FR-4 grade; our guide to FR-4 material and PCB lifespan explains why Tg and Z-axis expansion matter for the dense via fields under a DDR controller.

How many layers do you need for DDR4?

A single DDR4 device next to a small SoC can sometimes be done on 6 layers. Most DDR4 designs with several devices, or a wide interface, end up on 8 to 10 layers so that each signal layer has a clean reference plane. DDR5 and dense BGA breakouts often push designs to more layers or HDI.

Choose the topology

Modern DDR uses fly-by topology for address, command, control and clock: the bus daisy-chains from the controller through each memory device in turn and ends in termination. Data and strobes are routed point-to-point. Older T-branch topologies are rarely used for DDR3 and later because they are harder to balance at speed.

Place the controller and memory

Keep memory devices as close to the controller as the layout allows, and orient them to keep byte lanes short and untangled. Placement drives everything else, so review it with routing in mind before you lock it.

Plan breakout and escape routing

Work out how each BGA ball escapes before committing to the placement. Decide which byte lanes go on which layers, where the vias will sit, and how the decoupling capacitors will fit underneath.

How to route DDR4 on a PCB: step by step

The steps below apply to DDR4 and DDR5, with DDR5 needing tighter control at every stage. Treat the numbers as typical starting points and confirm them against your vendor design guides.

1. Route each data byte lane as a matched group

Route the 8 DQ lines, the data mask and the DQS pair of each byte lane together, on the same layer where possible. Keeping a byte lane on one layer means every signal sees the same dielectric and propagation delay, which makes matching far easier.

DDR byte lane routing: DQ0 to DQ7, DM and the DQS differential pair routed together on one PCB layer and length-matched to the strobeCTRLDRAMDQ0DQ1DQ2DQ3DQ4DQ5DQ6DQ7DMDQS+DQS−BYTE LANE 0 · ONE LAYER (L3) · MATCHED TO ITS OWN DQSLENGTH TUNINGDQS± = TIGHT DIFF PAIRMatch DQ and DM to their own strobe. Each byte lane is its own group;lanes do not have to match each other.
One byte lane, one layer, one match group · Elecmore diagram
Use this diagram on your site

Free to use in articles, course notes and forum posts, with the credit link below.

Two LPDDR byte lanes routed together on inner layer L3 in Altium Designer, with serpentine length tuning on the shorter traces
Two LPDDR byte lanes on inner layer L3 of one of our boards. The same grouping rules apply to DDR4 and DDR5

2. Match lengths inside each group

DDR length matching is done within groups, not across the whole interface. Match DQ to its own DQS within a byte lane, and match the address, command and control signals to the clock. Your controller guide gives the allowed skew, often stated in picoseconds rather than millimetres, so include via delay and layer differences where your tool supports it.

Altium Designer PCB panel listing LPDDR data and DMI net lengths for one net class, beside the length-tuned routing
Checking a data group in Altium's PCB panel: every net's routed length, side by side with the tuned traces

3. Route address, command and clock as fly-by

What is fly-by topology in DDR routing? It is a daisy chain: the address, command, control and clock signals leave the controller and pass each memory device in turn, with short stubs to each ball. The chain ends at VTT termination resistors placed close to the last device. Write levelling in the controller then compensates for the arrival-time difference at each device.

Fly-by topology for DDR4 address and command routing with VTT termination: the bus daisy-chains past four DRAM devices while data byte lanes run point-to-pointSoC / FPGAMEMORY CONTROLLERDRAM 1x8 / x16t1DRAM 2x8 / x16t2DRAM 3x8 / x16t3DRAM 4x8 / x16t4VTTTERMADDR · CMD · CTRL · CK → FLY-BY CHAINDQ / DQS BYTE LANES → POINT-TO-POINTWrite levelling in the controller absorbs the t1 → t4 arrival times.
Fly-by address and command, point-to-point data · Elecmore diagram
Use this diagram on your site

Free to use in articles, course notes and forum posts, with the credit link below.

4. Route clocks and strobes as tight differential pairs

Route CK and DQS as tightly coupled differential pairs at the target differential impedance. Keep the two halves of each pair matched closely, avoid splitting them around obstacles, and keep pair-to-pair spacing generous.

5. Control spacing and crosstalk

The 3W rule (centre-to-centre spacing of three times the trace width) is a reasonable starting point between DDR signals, with more space between groups and from clocks. When you add serpentine tuning, keep the meander spacing wide and the segments short, so the tuning does not couple back into itself.

6. Keep the return path unbroken

Never route DDR signals over a split in their reference plane. When a signal changes layer, place a ground stitching via next to the signal via so the return current can follow. Many intermittent DDR faults trace back to a broken return path.

Left: a DDR signal changing layer with a ground stitching via beside it keeps the return path short. Right: a trace crossing a plane split forces the return current on a long detour.✓ LAYER CHANGE WITH A STITCHING VIAL2 GNDL4 GNDL5 PWRL7 GNDSIGNAL ON L3SIGNAL ON L6GND STITCHReturn current hopsplanes right beside it✕ TRACE OVER A PLANE SPLITGNDVDDQDQ TRACE (TOP VIEW)Return current detours around the gap:a big loop, crosstalk and failed trainingSmall loop, clean signal
Return path at a layer change, and across a plane split · Elecmore diagram

7. Use as few vias as possible

Every via adds delay, a discontinuity and a possible stub. Aim for the same via count on all signals in a group. On thicker boards or faster DDR5 designs, consider back-drilling stubs or using HDI microvias.

8. Design the power delivery network

DDR needs clean VDD, VDDQ, VPP (on DDR4) and VTT rails. Place decoupling close to the power balls, use wide planes or pours, and design the PDN to a target impedance across the frequency range. A weak PDN shows up as data errors that look like signal integrity problems.

DDR4 vs DDR5 layout differences

DDR5 uses the same basic routing approach as DDR4, but with much less room for error. The main changes for layout are:

  • Higher data rates: DDR5 starts where DDR4 tops out, so losses, reflections and crosstalk matter more.
  • Power moves onto the module: DDR5 DIMMs carry their own PMIC, which changes how power is delivered and decoupled on the motherboard side.
  • Two sub-channels per DIMM: each DIMM splits into two independent 32-bit channels (plus ECC), which changes byte lane grouping and breakout.
  • Decision feedback equalisation (DFE): the memory can compensate for some channel loss, but it does not rescue a poor layout.
  • Tighter SI margins: small via stubs, plane gaps and impedance steps that DDR4 tolerated can close the eye on DDR5.

For most DDR5 designs, pre-layout simulation and careful stack-up selection are no longer optional.

Verify the DDR layout before fabrication

A DDR layout is only finished when it has been checked against the design guide and simulated. The checks that catch the most problems are:

  • Pre-layout SI simulation: confirm the stack-up, topology and termination will work before routing.
  • Post-layout SI simulation: extract the routed channels and check eye diagrams, timing and crosstalk.
  • PDN analysis: check DC voltage drop and AC impedance on VDD, VDDQ and VTT. For KiCad boards, our free PDN Analyzer maps the DC drop directly on your layout.
  • Length and delay reports: confirm every group is inside its skew budget, including via delay.
  • Reference plane check: confirm no DDR trace crosses a plane split or void.
  • Independent design review: a second experienced engineer will often spot what the original designer has stopped seeing.

At Elecmore we run SI/PI analysis and PDN analysis, pre- and post-layout, and independent PCB design reviews before fabrication for UK and European hardware teams.

Common DDR layout mistakes that cause failures

Why does my DDR interface fail memory training? In most cases it comes back to one of these:

  • Routing DDR signals across a split or gap in the reference plane
  • Splitting a byte lane across layers with different propagation delays
  • Matching lengths across the whole bus instead of within each group
  • Ignoring via delay and package delay in timing budgets
  • Long, unbalanced stubs on the fly-by chain, or VTT termination placed too far away
  • Tight serpentine tuning that couples into itself
  • Decoupling capacitors placed too far from the power balls, or a weak PDN
  • Last-minute component moves that break carefully matched routes
  • Skipping simulation because “the last board worked”

When to bring in a high-speed PCB design specialist

Many UK hardware teams handle DDR routing in-house most of the time, then need specialist help at a particular point. Good moments to bring in outside support are:

  • Your first DDR4 or DDR5 design, or a move to a faster speed grade
  • A board that fails memory training or only runs at reduced speed
  • A tight deadline where your layout engineer is already fully loaded
  • When nobody on the team has SI/PI simulation tools or experience

Elecmore is a UK electronics design consultancy offering high-speed PCB layout for DDR3, DDR4, DDR5 and LPDDR, multilayer and HDI stack-up design, and PCIe and other high-speed interfaces. We also help with board bring-up and debugging failed memory training. If your team is stretched, we can run a 2-week electronics overflow sprint on one defined board or subsystem. See our high-speed PCB design UK services and boards we have built.

Altium Designer 3D view of an Elecmore embedded board with a large BGA processor, eMMC storage, a power management IC and an RF connector
One of our embedded boards in Altium Designer's 3D view

Conclusion

Good DDR routing comes from good planning: the right stack-up, sensible placement, fly-by address and command routing, matched byte lanes and unbroken return paths. Follow your vendor design guides, simulate before you build, and get a second pair of eyes on the layout.

If you would like a DDR layout review or SI/PI review before your next board goes to fabrication, or want to talk through a new design, book a DDR layout review or contact our UK team at ahzam@elecmore.co.uk.

Before your board goes to fab

Get your DDR4, DDR5 or LPDDR layout reviewed by our SI/PI team

Frequently asked questions

How do you route DDR4 on a PCB?

Plan a controlled-impedance stack-up, place the memory close to the controller, and route each byte lane with its strobe as a matched group on one layer. Route address, command and clock in a fly-by chain with VTT termination at the end, and verify with SI/PI simulation.

What is fly-by topology in DDR routing?

Fly-by topology daisy-chains the address, command, control and clock signals from the controller past each memory device in turn, ending in termination. The controller uses write levelling to compensate for the different arrival times at each device.

How much length matching does DDR need?

DDR needs matching within each signal group, such as DQ to DQS inside a byte lane and address/command to clock. The allowed skew comes from your memory and controller vendor design guides and is usually given as a time budget, so include via and package delay.

How many layers do you need for DDR4?

Simple DDR4 designs with one device can sometimes fit on 6 layers. Most DDR4 boards use 8 to 10 layers so that every signal layer has a solid reference plane, and DDR5 designs often need more layers or HDI.

What are the main DDR4 vs DDR5 layout differences?

DDR5 runs at higher data rates, moves power regulation onto the DIMM with a PMIC, and splits each DIMM into two sub-channels. The routing approach is similar, but DDR5 has much smaller signal integrity margins, so simulation and stack-up choice matter more.

Why does my DDR interface fail memory training?

Common causes are signals crossing reference plane splits, byte lanes split across layers, timing budgets that ignore via delay, poor termination and a weak power delivery network. A post-layout SI/PI review usually finds the root cause.