kicad-skew: making sure memory signals arrive together

Memory chips need their signals to arrive together, so the wires have to match in length. kicad-skew checks that on a KiCad board with KiCad's own measurements.

FirePod’s processor talks to its memory over dozens of wires at once. The signals on those wires have to arrive together, within a tiny fraction of a nanosecond. On a circuit board that means matching wire lengths to within fractions of a millimetre.

That memory holds the music the processor is listening to while it finds the beat, so whatever goes in has to come back out exactly right, every time.

KiCad, the free circuit design software we use, checks some of these rules but not all of them, so we wrote our own checker. Its first version guessed how much length each jump between the board’s layers adds, and it got that wrong by up to about a millimetre per jump. It said four pairs of wires were out. KiCad’s own measurements said they were fine.

Then a review found something no length check would: four pairs of wires matched in length but ran on different layers of the board. Signals travel at slightly different speeds on different layers, so those pairs matched in millimetres but not in time.

kicad-skew

kicad-skew checks length matching on a KiCad board, the way KiCad itself measures it.

  • KiCad’s own lengths: it asks KiCad for each wire’s length, including the jumps between layers, instead of guessing.
  • Your rules: a short file says which wires must match which, and by how much. An example for LPDDR4 memory is included.
  • Unrouted wires fail: a wire that isn’t finished counts as a problem, not a pass.
  • Layer check: it reports pairs whose two wires run on different layers.

It’s free under the Apache 2.0 license.

View kicad-skew on GitHub

Tried on open source boards

We ran it on two memory boards from Antmicro, a company that publishes its hardware designs. Their DDR4 memory tester passes all 116 checks we wrote for it: no memory signal is more than 0.06 mm out from its timing signal. Every wire in the picture is green, which means it’s inside half its limit.

All 136 memory wires on the Antmicro DDR4 tester, every one inside half its length limit

One detail stood out. Antmicro recorded how long each wire is inside the chip’s own package, and KiCad counts that in its measurements, so kicad-skew does too. Matching only the copper on the board would have been off by up to 16 mm.

Running it on their board also turned up two bugs in our checker. Signals with a backslash in their name weren’t being found, and a pair whose two wires were simply different lengths on the same layer was being reported as running on different layers. Both are fixed in the release.

More this month

One more release to go before Halloween. Keep an eye on GitHub, or sign up for updates.

More from Firedance

Get updatesGet the early-bird price

Firedance isn't available yet. Leave your email and we'll let you know when it launches.

Leave your email and you'll hear first when Firedance launches, so you can get the early-bird price.