Bus routing plan (8-layer board)

How to route the STM32 <-> FPGA buses, ULPI and QSPI by hand so they come out as tidy, side-by-side bundles. The board is prepared for it: these 93 nets have only their BGA dogbones left, the FPGA end of the FMC bus has been re-ordered so each bundle leaves both chips in the same order, and every bundle has its own net colour.

Geometry

itemwhere
STM32 U11centre (158, 99), body x 150-166, y 91-107, 0.8 mm ball pitch
FPGA U100body x 109.5-134.5, y 79.5-104.5, 1.0 mm ball pitch
corridor between themx 134.5-150 (about 15 mm wide)
USB PHY U13(155.3, 120.1), bottom side
QSPI flash U18(160.0, 110.5), just south of the STM32

Signal layers: F, In2 (GND above and below), In5 (power above, GND below), B. In2 and In5 are the bus layers; F and B are best kept for short escapes and local links.

Bundles

bundlecolournetsSTM32 sideFPGA ballssuggested route
FMC data D0-D15cyan1614 west, 2 eastx 129.5-132.5, y 94.5-102.5 (east edge of the FPGA)In2, south band (y about 95-105): straight across the corridor. Order is fixed: these balls are also the FPGA configuration (SelectMAP) data pins
FMC address A0-A18orange199 west, 6 north, 4 southx 123.5-132.5, y 87.5-90.5 (north-east of the FPGA)In2, north band (y about 86-92): west-side balls go straight north-west, north-side balls leave north and turn west. The 4 south-side ones wrap round the west edge on In5
FMC data D16-D31green165 west, 7 east, 2 north, 2 southx 123.5-128.5, y 93.5-102.5In5, middle band (y about 93-102) for the west ones; the east-edge ones wrap round the north side on In5 above the control bundle
FMC controlred9 (NOE, NWE, NE1, NWAIT, NBL0-3, CLK)all 9 on the east edgex 125.5-132.5, y 93.5-100.5In5, north wrap: leave the east edge, run north round the STM32 (y about 88-90), then west across the corridor. FMC_CLK is a clock: keep it short and away from the data bundles
ULPIpurple12spread, x 151.6-164, y 93-103to U13 on the bottom, about 20 mm southIn5 then B: run south down the STM32's west side, drop to B.Cu near U13. 60 MHz: keep the 12 within a few mm of each other
QSPIpink10x 154-164, y 93-104to U18, just south of the STM32F or In2, south: short and direct. Both flash chips share CLK and NCS, so keep those two tidy
STM32-FPGA config and miscyellow11variousvariouslow speed: route last, in whatever space is left

The bands are suggestions: if a bundle fits better elsewhere once you start, move it. The rule that matters is one bundle, one layer through the corridor, with layer changes only at the chips.

Routing a bundle in KiCad

  1. In the Appearance panel, Nets tab: hide the ratsnest for everything except the bundle you are on (the bundle colours make it easy to pick out).
  2. Router settings: shove mode, free angle off, "smooth dragged segments" on.
  3. Route the outermost net of the bundle first, carefully: it is the guide.
  4. Route the next net beside it. In shove mode the router holds the clearance, so tracks line up at an even pitch. Work inwards across the bundle.
  5. Clean up with D (drag a segment and its neighbours re-flow) and Edit > Cleanup Tracks & Vias.
  6. If two nets in a bundle must cross, tell me which: the FPGA end can be swapped (I update the generator, schematic and constraint file to match). D0-D15 cannot be swapped.
  7. Lengths last: 9 tunes a single track. Nothing here needs tight matching except keeping each bundle roughly even.

After the buses: the remaining low-speed nets (see the routing guide), then GND fill on F and B with stitching vias, then DDR3 and LA P/N length matching.