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
| item | where |
|---|---|
| STM32 U11 | centre (158, 99), body x 150-166, y 91-107, 0.8 mm ball pitch |
| FPGA U100 | body x 109.5-134.5, y 79.5-104.5, 1.0 mm ball pitch |
| corridor between them | x 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
| bundle | colour | nets | STM32 side | FPGA balls | suggested route |
|---|---|---|---|---|---|
| FMC data D0-D15 | cyan | 16 | 14 west, 2 east | x 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-A18 | orange | 19 | 9 west, 6 north, 4 south | x 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-D31 | green | 16 | 5 west, 7 east, 2 north, 2 south | x 123.5-128.5, y 93.5-102.5 | In5, 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 control | red | 9 (NOE, NWE, NE1, NWAIT, NBL0-3, CLK) | all 9 on the east edge | x 125.5-132.5, y 93.5-100.5 | In5, 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 |
| ULPI | purple | 12 | spread, x 151.6-164, y 93-103 | to U13 on the bottom, about 20 mm south | In5 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 |
| QSPI | pink | 10 | x 154-164, y 93-104 | to U18, just south of the STM32 | F or In2, south: short and direct. Both flash chips share CLK and NCS, so keep those two tidy |
| STM32-FPGA config and misc | yellow | 11 | various | various | low 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
- 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).
- Router settings: shove mode, free angle off, "smooth dragged segments" on.
- Route the outermost net of the bundle first, carefully: it is the guide.
- 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.
- Clean up with
D(drag a segment and its neighbours re-flow) and Edit > Cleanup Tracks & Vias. - 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.
- Lengths last:
9tunes 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.