Correct way to have different track/separation for differential pairs on external and internal layers

Hello

I am unable to find the ‘correct’ way to assign differential pairs to have different track width and separation when they are routed on either the top or inner layers.

At the moment I have a 100R differential net class for the top and another for the internal. I have assigned the track to both and when I swap layers, I change the priority of them however this feels like the wrong way to achieve this.

Also is it possible to use different net classes in different areas? I need to route out from the connector with the pairs closer than their configured separation.

Thank you for your replies/ time.

Application: KiCad PCB Editor x64 on x64

Version: 9.0.5, release build

I’m working on a nice UI for this for version 10 as part of expending the time-domain tuning work. For now, you need to declare a couple of DRC rules, with different layer conditions, such as:

(version 1)

(rule DIFF_PAIR_OUTER
    (condition "A.hasNetclass('MY_NETCLASS') && A.Layer == 'F.Cu' && A.inDiffPair('*')")
    (constraint track_width (opt 10 mil))
    (constraint diff_pair_gap (opt 5 mil))
)

(rule DIFF_PAIR_INNER
    (condition "A.hasNetclass('MY_NETCLASS') && A.Layer == 'In1.Cu' && A.inDiffPair('*')")
    (constraint track_width (opt 5 mil))
    (constraint diff_pair_gap (opt 8 mil))
)

These will be evaluated after the implicit net class rules, so will be selected first by the DRC engine, overriding the standard net class configuration.

6 Likes

Awesome! I’m looking so forward to that

1 Like

Thank you very much for both the solution which works and for working on a ‘nice’ easy way to do this.

1 Like

There ya go!

2 Likes