Mailing list archives : pcb-rnd

ID:3897
From:ge...@igor2.repo.hu
Date:Thu, 2 Apr 2020 17:04:59 +0200 (CEST)
Subject:Re: [pcb-rnd] drc: Antenna detection
in-reply-to:
Hi Vuokko,
 
On Thu, 2 Apr 2020, Hannu Vuolasaho wrote:
 
> Hello!
>
> Now that DRC ideas are open, I'll send my ideas.
>
> This feature is in features which doesn't increase productability but may save
> a lot of time.
>
> When there is single connection to routed signal it can cause major ugliness
> and work effort to rest of the routing when going around it. Detecting trace
> which doesn't begin from terminal, polygon or via but which is net should be
> warned.
>
> Most of the time it is misclick or forgotten part of trace. Sometimes it really
> is antenna.
 
In pcb-rnd terminology this is basically trying to identify a "branch" of 
a segment^2 of a network^1 that "leads nowhere", being useless for the 
board (not connecting anything to anything else) and potentially being 
dangerous (acting as an antenna).
 
Normally this is something easy to do with human brain but not very easy 
to do with algorithms. 
 
My first ideas are these, please think over if it would work correctly for 
all positive and negative cases.
 
(I think polygons don't need to be handled specially, only terminals.)
 
Method I.
 
- if a copper object is reachable from exactly one other copper object, it 
is surely the end of such an antenna -> violation
 
- else it may be accessible from zero other objects (stand alone object 
in the middle of the desert) -> no problem
 
- else it is accessible from multiple other _directly connected_ copper 
objects; in this case, we need to make an (expensive) map:
 
1. remove our target object for a moment
 
2. take all directly connected copper objects and do a search from them, 
listing all terminals they reach
 
3. compare the terminal lists: if we find at least 2 directly connected 
objects that yield different lists, we are okay; if all directly connected 
objects yield the same terminal list, that means they all connect our 
target object to the same things. Alternative wording: our object may have 
multiple direct connections, but they all lead to the same terminals, so 
it's the same as we had only one connection.
 
Method 2:
 
I think in a very indirect way the above really says: if we deleted our 
target object, it wouldn't break the current network segment in two or 
more new segment. So this other method tries to capture that property more 
directly:
 
1. take a network segment, map all terminals on it and save this as the 
master list
 
2. map all objects of the network segment and iterate over them
 
3. in each iteration remove one object, while keeping every other object 
in place and do the segment mapping from scratch from the first terminal 
of the master list
 
3. if the result of this new mapping is the same as the master map from 
step 1, that means removing our current iteration object wouldn't break 
the segment, which means (in a sense) the object is useless. It's probably 
an antenna.
 
... unless you have two alternative, parallel paths between 2 terminals! 
In that case both paths are violations because removing any object from 
either of them will not break the net because the other path is still 
there!
 
Unfortunately I think method I suffers from the same error.
 
Saying something like "the antenne case has a final object that has only 
one copper object connected" is not good either: what if I end my net in a 
loop of lines? Then I have an undetected antenna.
 
So, this problem is harder than it first seems! I will keep pondering, but 
I can't promise we can really do it. (Note: whether we can do it or not 
doesn't depend on the new drc engine, it depends on whether we can come up 
with a formal definition on what we are trying to find in our data.)
 
 
 
Footnotes on our internal code terminology:
 
^1: a network is a abstract/logical thing, determined by the list of 
terminals from the netlist
 
^2: in the context of the actual geometry of your board (current state) a 
network segment is a portion of a network that is already galvincally 
connected (with copper objects, not with rats). When you start, 
subcircuits placed but no trace drawn, a network has as many segments as 
many terminals; when you finish routing, every network is a single 
segment. In other words, a segment is what {c f} highlights if you don't 
have rats at all.
 
 
Best regards,
 
Igor2
 
 

Reply subtree:
3897 Re: [pcb-rnd] drc: Antenna detection from ge...@igor2.repo.hu