Defining and verifying design rules for trace widths, clearances, differential pairs, and length matching
Routing rules and constraints are the DNA of a well-designed PCB. They translate electrical requirements (impedance, timing, voltage isolation) into physical parameters (trace width, spacing, length) that the designer and DRC engine enforce during layout. A design without properly configured constraints is relying solely on the designer's memory and discipline - both of which fail under schedule pressure.
Every net class has an appropriate minimum trace width defined based on current capacity, impedance requirements, and manufacturer capabilities. No trace is narrower than the fabricator's minimum capability.
| Net Class | Min Width | Preferred Width | Basis |
|---|---|---|---|
| Default Signal | 4 mil (0.1mm) | 5 mil (0.127mm) | Manufacturing minimum |
| Power (1A) | 10 mil (0.25mm) | 15 mil (0.38mm) | IPC-2152 current capacity |
| Power (2A) | 20 mil (0.5mm) | 30 mil (0.76mm) | IPC-2152 current capacity |
| Power (5A) | 50 mil (1.27mm) | 80 mil (2.0mm) | IPC-2152 current capacity |
| 50 ohm Controlled | Calculated | 6.5 mil typ | Field solver (stackup dependent) |
| 100 ohm Diff Pair | Calculated | 4/5 mil W/S typ | Field solver (stackup dependent) |
| USB 2.0 (90 ohm) | Calculated | 5/7 mil W/S typ | USB-IF specification |
| Parameter | JLCPCB Standard | JLCPCB Advanced | PCBWay Standard | Advanced Circuits |
|---|---|---|---|---|
| Min trace width | 5 mil (0.127mm) | 3.5 mil (0.09mm) | 4 mil (0.1mm) | 4 mil (0.1mm) |
| Min trace space | 5 mil (0.127mm) | 3.5 mil (0.09mm) | 4 mil (0.1mm) | 4 mil (0.1mm) |
| Width tolerance | +/- 1 mil | +/- 0.5 mil | +/- 0.8 mil | +/- 0.5 mil |
Navigate to Design > Net Classes. Create classes by selecting nets from the net list or using pattern matching (e.g., VCC* for all VCC nets). Set width rules in Design > Rules > Routing > Width. Create a rule for each net class: min/preferred/max width. Priority: higher number = higher priority.
Open Board Setup > Net Classes. Define classes and assign nets using regex patterns. Set track width, clearance, and via size per class. In the schematic, you can assign net classes using "Net Class Directive" symbols attached to wires or buses.
Open Setup > Constraints > Constraint Manager. Navigate to Physical tab. Define "Net Class" constraints with min/max/preferred widths. Use "Bus" objects to group related nets. The constraint hierarchy allows region-specific overrides for areas like BGA breakout zones.
Clearance between conductors is set based on the maximum voltage difference between adjacent nets. High-voltage nets have increased clearance per IPC-2221 requirements. Creepage and clearance distances meet safety standards.
| Voltage (DC or AC peak) | Internal Clearance | External Clearance (Uncoated) | External (Conformal Coated) |
|---|---|---|---|
| 0-15V | 0.05mm (2 mil) | 0.1mm (4 mil) | 0.05mm (2 mil) |
| 16-30V | 0.05mm (2 mil) | 0.1mm (4 mil) | 0.05mm (2 mil) |
| 31-50V | 0.1mm (4 mil) | 0.6mm (24 mil) | 0.13mm (5 mil) |
| 51-100V | 0.1mm (4 mil) | 0.6mm (24 mil) | 0.13mm (5 mil) |
| 101-150V | 0.2mm (8 mil) | 1.25mm (50 mil) | 0.4mm (16 mil) |
| 151-170V | 0.2mm (8 mil) | 1.25mm (50 mil) | 0.4mm (16 mil) |
| 171-250V | 0.2mm (8 mil) | 1.25mm (50 mil) | 0.4mm (16 mil) |
| 251-300V | 0.2mm (8 mil) | 1.5mm (60 mil) | 0.8mm (32 mil) |
| 301-500V | 0.25mm (10 mil) | 2.5mm (100 mil) | 0.8mm (32 mil) |
For mains-connected equipment, additional safety clearances apply:
| Insulation Type | Working Voltage 240VAC | Clearance | Creepage (Pollution Degree 2) |
|---|---|---|---|
| Basic | 240 Vrms | 2.5mm | 4.0mm |
| Supplementary | 240 Vrms | 2.5mm | 4.0mm |
| Reinforced | 240 Vrms | 5.0mm | 8.0mm |
Design has 5 clearance classes: Low-Voltage (5 mil), Mid-Voltage-48V (25 mil), High-Voltage-400V (100 mil), Mains-Basic (100 mil), Mains-Reinforced (200 mil). Each net is assigned to the correct class. Net-to-net clearance rules enforce the larger of the two classes involved.
Entire design uses default 6 mil clearance. 48V power traces pass within 6 mil of 3.3V logic. Mains input traces have the same clearance as low-voltage signal traces. No safety clearance rules defined. Board will fail safety certification.
Differential pairs maintain consistent spacing throughout their length. Pairs are tightly coupled (spacing 1-2x trace width). Length matching between P and N is within specification. Pairs route symmetrically through vias and around obstacles.
| Interface | Target Z_diff | Typical W/S (microstrip) | Max Intra-Pair Skew | Max Length |
|---|---|---|---|---|
| USB 2.0 HS | 90 ohm | 5mil / 7mil | 2.5 mil (0.15mm) | 150mm |
| USB 3.2 Gen1 | 85 ohm | 4.5mil / 6mil | 2 mil (0.05mm) | 100mm (PCB only) |
| PCIe Gen3 | 85 ohm | 4.5mil / 6mil | 5 mil | 200mm (PCB total) |
| PCIe Gen4 | 85 ohm | 4mil / 5mil | 2 mil | 150mm (PCB total) |
| HDMI 2.0 | 100 ohm | 4mil / 6.5mil | 2 mil | 100mm |
| SATA III | 85 ohm | 4.5mil / 6mil | 5 mil | 200mm |
| DDR4 DQS | 100 ohm | 4mil / 5mil | 1 mil | Per byte-lane matching |
| LVDS | 100 ohm | 4mil / 6.5mil | 5 mil | 500mm |
| Ethernet (SGMII) | 100 ohm | 4mil / 6.5mil | 5 mil | 200mm |
When differential pairs exit a BGA, the P and N pads are often on different rows, creating unavoidable length mismatch in the breakout zone. This is acceptable IF: (1) You minimize the uncoupled length, (2) You compensate with serpentine on the shorter trace immediately after the breakout, and (3) The total skew budget accounts for this. Never leave uncoupled breakout length uncomprensated - even 2mm can exceed USB 3.x skew budget.
All nets requiring length matching have been identified, grouped correctly, and assigned appropriate matching tolerances. Length tuning serpentines are properly constructed with adequate amplitude and spacing.
| Interface | Matching Group | Tolerance | Reference Net |
|---|---|---|---|
| DDR4 Data | Per byte lane (DQ0-7 + DQS) | +/- 2.5mm within group | DQS of each byte lane |
| DDR4 Address/CMD | All ADDR/CMD together | +/- 5mm within group | Clock (CK/CK#) |
| DDR4 Clock | CK to CK# (intra-pair) | +/- 0.5mm | N/A (self-referenced) |
| RGMII TX | TXD[0:3] + TX_CTL | +/- 2.5mm | TX_CLK |
| RGMII RX | RXD[0:3] + RX_CTL | +/- 2.5mm | RX_CLK |
| PCIe Lane | TX+/TX- (intra-pair) | +/- 0.13mm (5 mil) | N/A (self-referenced) |
| HDMI | D0+/-, D1+/-, D2+/-, CLK+/- | +/- 2mm inter-pair | CLK pair |
| SPI (high-speed) | CLK, MOSI, MISO, CS | +/- 5mm | CLK |
Serpentine Quality Guidelines:
================================
Amplitude (A): 1x to 3x trace width (typically 3W max)
Spacing (S): >= 3x trace width (to avoid self-coupling)
Gap (G): >= 4x trace width (between adjacent serpentines)
Example for 5-mil trace:
Amplitude: 5-15 mil
Spacing: >= 15 mil
Gap: >= 20 mil
GOOD serpentine: BAD serpentine:
_ _ _ __ __ __
| | | | | | | | | | | |
| | | | | | | | | | | |
|_| |_| |_| |__| |__| |__|
S=3W, A=2W S=1W, A=5W
Low self-coupling High self-coupling
Minimal impedance Significant Z change
impact and crosstalk
Use Design > Rules > High Speed > Matched Net Lengths. Define "Match Group" rules with tolerance. During interactive routing, use Interactive Length Tuning tool (shortcut: select trace, then press "T" for tuning). Altium shows real-time length difference overlay. Use "Accordion" style for tight spaces or "Trombone" for wider areas.
Select a routed trace, then use Route > Tune Track Length (shortcut key depends on version). KiCad shows the target length and current length in real-time. Set target length in Board Setup > Design Rules > Net Classes or via custom rules. The interactive tuning creates meander patterns with adjustable amplitude and spacing.
Define match groups in Constraint Manager > Electrical > Relative Propagation Delay. Set tolerance per group. During routing, enable Timing Vision to see real-time length status with color coding (green=matched, red=violation). Use Route > Delay Tune to add serpentines interactively.
All trace routing uses 45-degree angles or arcs. No 90-degree corners on signal traces (acceptable on power fills). No acute angles (<90 degrees) that create acid traps during etching. BGA fan-out uses 45-degree breakout patterns.
| Angle Type | Acceptable? | Impact | When Allowed |
|---|---|---|---|
| 45-degree | Best practice | Minimal impedance discontinuity | Always - standard routing mode |
| Arc/Curve | Best for high-speed | Smoothest impedance transition | High-speed differential pairs, RF traces |
| 90-degree | Acceptable (non-critical) | Small impedance bump at corner | Power traces, low-speed signals, power polygons |
| Acute (<45 deg) | Never | Acid trap in manufacturing, impedance spike | Never - always a DRC violation |
While frequently cited as a major signal integrity issue, 90-degree corners have negligible electrical impact below 10 GHz. The actual impedance change at a 90-degree corner is approximately 15% over a distance of the trace width - typically less than 0.1 ps of timing impact. However, 90-degree corners are avoided because:
Acid traps occur where traces meet at acute angles (less than 90 degrees), creating small triangular pockets where etchant can pool and over-etch copper. This is most common at T-junctions where a branch trace meets the main trace at a shallow angle. Always ensure T-junctions meet at 90 degrees or greater, and use teardrop fillets at pad entries to prevent acid traps at trace-to-pad transitions.
Traces enter pads at the center axis or with adequate copper on both sides. Off-center pad entries create asymmetric solder joints during reflow. Teardrops added at critical pad entries for manufacturing reliability.
Altium: Tools > Teardrops - apply to all vias and/or SMD pads with configurable teardrop size.
KiCad: Edit > Apply Teardrops (KiCad 7+) - global teardrop application with radius control.
Allegro: Route > Gloss > Parameters > Fillet - configure automatic fillets during routing or as post-process.
BGA breakout routing uses defined neck-down rules where traces transition from the pad field to full-width routing. The neck-down region has specific reduced width and spacing rules that maintain manufacturability while enabling escape from tight-pitch BGAs.
| BGA Pitch | Pad Diameter | Escape Trace Width | Escape Space | Channels Between Pads |
|---|---|---|---|---|
| 1.27mm (50mil) | 0.6mm | 6mil | 6mil | 2 traces |
| 1.0mm (40mil) | 0.5mm | 4mil | 4mil | 1-2 traces |
| 0.8mm (31mil) | 0.4mm | 3.5mil | 3.5mil | 1 trace |
| 0.65mm (25mil) | 0.3mm | 3mil | 3mil | 1 trace (advanced) |
| 0.5mm (20mil) | 0.25mm | 2.5mil | 2.5mil | 0 (via-in-pad, HDI) |
1.0mm Pitch BGA - Dog-Bone Fan-Out:
O O O O O O = BGA Pad
| | | | | | = Short trace to via
v v v v v v = Via (dog-bone)
Row 1: All pads escape directly down to via on same layer or adjacent layer
Row 2: Route between Row 1 pads (1 trace channel)
Row 3: Route through via field (requires inner signal layers)
Row 4+: Must use inner layers (blind/buried vias or through-hole vias)
Via-in-Pad (0.8mm and below):
No dog-bone needed - via is IN the pad
Requires via fill + planarization (adds cost)
Enables escape from any row on inner layers directly
BGA breakout region defined with 3.5mil/3.5mil rules. Traces neck down for maximum 2mm before transitioning to full 5-mil controlled-impedance width. Via fan-out uses consistent dog-bone pattern. All inner-row signals escape on dedicated signal layers with short uncoupled segments.
No breakout region defined. Some traces at 3 mil (below fab minimum), others at 8 mil. Inconsistent via placement. Some traces remain at neck-down width for 20mm (severe impedance mismatch). DRC shows violations but they are waived without engineering justification.
A well-configured design should have the following constraint categories defined:
| Rule Category | What It Controls | Priority |
|---|---|---|
| Default Clearance | Minimum spacing for all copper | Lowest (baseline) |
| Net Class Width | Trace width per functional group | Medium |
| Net Class Clearance | Spacing per voltage/function group | Medium |
| Differential Pair | Width, spacing, max uncoupled length | High |
| Length Matching | Matching tolerance per group | High |
| Net-Specific | Override for individual critical nets | Higher |
| Region Override | BGA breakout, connector area rules | Highest |
Strategy 1: Dog-Bone (Standard Through-Via)
=============================================
Pitch: 1.0mm | Pad: 0.5mm | Via: 0.3mm drill / 0.6mm pad
Outer 2 rows: Escape on surface layer via dog-bone
Inner rows: Via down, escape on inner signal layers
Pros: Simple, standard process, low cost
Cons: Uses signal layer area below BGA
Strategy 2: Via-in-Pad (HDI)
============================
Pitch: 0.8mm or less | Pad: 0.35-0.4mm | Via: 0.1mm laser drill
All rows: Via directly in BGA pad (microvia to next layer)
Escape on layer 2 (immediately below)
Pros: Enables fine-pitch escape, no surface routing needed
Cons: Higher cost (laser drill + fill + plate)
Strategy 3: Dog-Bone with Channel Routing
==========================================
Pitch: 1.0mm | 1-2 traces between pads
Row 1: Direct escape (no via, route to perimeter on top layer)
Row 2: Dog-bone via, escape between Row 1 pads
Row 3-4: Route down to inner layer, channel between vias
Rows 5+: Must use dedicated inner signal layers
Channel Capacity:
1.0mm pitch, 0.5mm pad: gap = 0.5mm
Trace+Space: 4+4 mil = 8mil = 0.2mm per channel
Channels between pads: 2 (with 0.1mm margin)
Many designers start a new project and never update the default design rules from the EDA tool's factory settings. These defaults are often extremely conservative (10mil/10mil) or extremely permissive (no clearance checks), neither of which matches the actual fabricator's capabilities or the design's requirements. The FIRST step after creating a new PCB project should be configuring ALL design rules to match the selected fabricator's capabilities and the design's electrical requirements.