Custom DRC Error for length of Diff pair

Hello all,

I am trying to setup a custom DRC to check the length matching of my diff pairs and to flag the nets whose lengths are not matched. I just want to check that I have everything correct. I run the DRC and nothing is flagged. I am not sure if it is because none of my lengths are out of spec (hard to believe) or if my DRC rule is not correct. Could I get a second pair of eyes?

(version 1)
(rule "Diff_90R intra-pair length matching"
    (constraint skew ((max 0.127mm))
    (condition "A.Netclass == 'Diff_90R' && A.inDiffPair('x') && AB.isCoupledDiffPair()"))

(rule "Diff_100R intra-pair length matching"
    (constraint skew (max 0.127mm))
    (condition "A.Netclass == 'Diff_100R' && A.inDiffPair('x') && AB.isCoupledDiffPair()"))

If you’re literally using A.inDiffPair('x'), that won’t work as the 'x' is there to replace with a net name matching calues. There’s also an extra opening brace on the first max condition.

For your rule, I’d simplify it and use the within_diff_pairs option:

(rule "Diff_90R intra-pair length matching"
    (constraint skew (within_diff_pairs) (max 0.127mm))
    (condition "A.Netclass == 'Diff_90R'")
)

That will calculate the skew constraint for any diff pairs which have the Diff_90R net class.

2 Likes

Thank you kind sir. That was able to mark the nets correctly!

So for doing the skew, if the most different that I want is 0.127mm, the should the min/max values be -/+ 0.0634mm?

I’d set min to 0mm and max to 0.127 - the skew is always calculated with respect of the longest net in the matching group, so a negative min value will never apply.

Ok thanks, I did notice that some of the nets, their skews are - values but I guess I need to adjust my length for that net

Confusingly, the DRC will report the skew as negative, but the test internally is against the absolute value of the skew (hence negative skews are not really supported). I’m not sure that’s particularly clear; will have a think about the documentation for skew tuning / checks.