6 Replies Latest reply on Aug 21, 2014 1:18 PM by peter.kurlak

# Find the compliment Differential Pairs Segment

OK I am writing a script to support StubbyLines in DDR4 Differential Pairs.  I have a Diff Pair Segement and I want to find it's compliments segment.  I figured it out the brute force way but have any of you found an eliquent way to find other segment?

Here is the reference document I am working from:

• ###### 1. Re: Find the compliment Differential Pairs Segment

If no tuning segments and arcs exist, it's easy to find it. However, if the differatial got tunned, seems there is no simple way to find it~.

Yanfeng

• ###### 2. Re: Find the compliment Differential Pairs Segment

What's your current "brute force" method? Perhaps theres a way to optimize that.

Are you using DifferentialPair.SecondNet?

• ###### 3. Re: Find the compliment Differential Pairs Segment

Brute force method for finding the compliment segment of a differential pair:

I have the first segment diff pair net

I get the second net as you mentioned

I find the center of the first segment

I do a pick conductor layer gfx at that location with a +/- that will catch the pair

Pick returns a bunch of stuff and I compare the stuff to the second net if it matches Bingo (I actually have msgbox "Bingo" in the code)

If it is the second net it just doesn't give me that segment, it gives me the whole collection of traces like I did a double click on it.

I walk though the traces and see if the start or end XY is within range of my first segments X1 Y1

If it is I see if the other side is within range of my first segments X2 Y2

If it is I have the compliment.

It works pretty good, just slow.  I was hoping the pick would return the segment but, segments arn't really database items,

• ###### 4. Re: Find the compliment Differential Pairs Segment

At the (unfortunate) risk of having you remove the "bingo" code, why do you Pick conductor layer gfx? Why not just start iterating through SecondNet.Traces?

• ###### 5. Re: Find the compliment Differential Pairs Segment

The pick limits the scope of the traces on the other net.  If I just start iterating and it goes through 5 rules areas on that layer I have a lot of segments to deal with.

Oh and I thought the pick would do exactly what a LMB drag does and just select that one segment and not the entire traces collections of that segment.

• ###### 6. Re: Find the compliment Differential Pairs Segment

Are you sure the Pick is actually increasing your efficiency? From your description, it seems like it could be worse than just looking at all the traces. Have you tried profiling each section by measuring time elapsed?

kendall_hiles wrote:

Pick returns a bunch of stuff and I compare the stuff to the second net if it matches Bingo (I actually have msgbox "Bingo" in the code)

If it is the second net it just doesn't give me that segment, it gives me the whole collection of traces like I did a double click on it.

Frankly, I'm surprised you see any noticeable delay using VBScript (I assume) with either method unless you're interating through huge collections (at which point, perhaps something else is wrong).