It looks like you're new here. If you want to get involved, click one of these buttons!
I am attempting to develop a ruby script to isolate where shorts are occurring between nets by probing the initial net locations
until the tracer.net results in a different net name ( i.e. the location of the short )
The initial prototype code worked correctly
However after adding support for buried/blind vias and other code cleanup it no longer works
In the latest version it's reporting the short on the incorrect layer and I can't see why that is happening...
the attached zip file contains the simple test-case design, the .lym script and the Klayout log file showing
the shorts being reported on layer 2 while the short is actually on layer 1
Your assistance is greatly appreciated
Comments
Hi @mtnhomecad,
I tried your script and can see the effect you mention.
But it is hard to understand what you're trying to do and where the actual bug is.
I'd start with structuring the code with functions - there are too many loops nested into one flat piece of code.
One basic issue of your code is that you confuse database units with micrometer units.
Like here:
"Point" is a class that holds - by convention - database-unit coordinates.
By multiplying with the DBU value you convert to micrometers which violates this convention.
Later you pass this object to "trace":
which expected database-unit points, not micrometer ones, and the trace fails.
So you should replace the code above by simply:
But I don't know if that already fixes all issues.
The approach you're using is based on the net name, but that is not made from all labels - just from one. It is not specified which label is used for the net name, hence you may not see the foreign label that indicates the short. As a solution, you could analyze all labels (texts) in the net elements to collect all labels along the net.
Matthias
Thank you for your feedback, after updating the the code per your feedback the label locations are probed correctly
I added the following code to help isolate where the short is occurring: