-------- Message transféré -------- Sujet : Re: [Kicad-developers] Eeschema ERC should detect unmatched local labels Date : Mon, 28 Sep 2015 12:55:59 +0200 De : jp charras <[email protected]> Pour : Joseph Chen <[email protected]> Le 28/09/2015 09:40, Joseph Chen a écrit : > On 09/25/2015 10:25 AM, jp charras wrote: >> Le 25/09/2015 07:36, Joseph Chen a écrit : >>> Hi @JP, >>> >>> Have you got a chance to review this submitted patch? >>> >>> --JC >> Yes, I had a look at the patch. >> >> Currently, it creates to many false detections: >> - It does not see the fact a local label is connected to a global or a >> hierarchical label. >> - It does not see the fact a local label is connected toa bus label >> member. >> >> Try for instance some demos like video or kit-dev-coldfire-xilinx_5213. >> Most of warnings are false detection (80% of warnings are false >> detections) >> >> Detecting really unconnected local labels is not so easy. >> >> Thanks for your work on Kicad. > > Hi @JP, > > Using your recommended instance file of "kit-dev-colfire-xilinx_5213", I > just finished verifying the ERC results reported by the "check unmatched > local labesl" code patch. My conclusion is that it is 100% accurate. > > Here is my verification method I used to check and verify the schematic > file: > > 1. Start kicad that has the ERC "check unmatche local labels" patch > compiled in. > 2. Open the demo schematic file "kit-dev-colfire-xilinx_5213" > 3. Generated ERC file when doing ERC. > 4. Open the generated ERC file to check every one of the reported > unmatched local labels, and using "Find" command inside kicad to search > the reported local label. > > With this method, I found that every reported error is *true and > accurate*, based on the definition that *a local label's visibility is > only within its own sheet*. > > For your review, attached you can find the result file that I have added > my verifications and explanations for each one the reported entries. > > > The bus label member that you mentioned does not resolve the reported > error because the desiner seems to mis-used a local label as a global > label. > > I'd like to say this patch works as accurate as expexted based upon the > local label definition. As I previously said, there are too many false detections. The local label definition is absolutely right, but your criteria to decide if a local label is connected to an other label is wrong. The code only compare a local label string to all other local label strings. This is really and fully incorrect. - It misses hierarchical labels, which are also local labels, and which are connected to local labels. - It misses global labels, which are also connected to local labels, as long the global label is inside the sheet. And especially important: - It misses all bus labels members. A bus label line like mybus[n..m] is equivalent to m-n local labels, from mybusn to mybusm - and (but this is a corner case) it misses 2 labels connected by wires because the code does not take in account physical connections. For instance: The first error in your erc file is: ***** Sheet / ErrType(9): Local label not connected to any other local label of the same sheet @ (10.300 in,2.850 in): Local label GPT3 is not connected to any other local label of the same sheet. JYC: TRUE, because one is in sheet 1/3. This is false: in sheet 1/3 there are 2 local labels: the local GPT3 label and the hierarchical label GPT[0..3], which contains the bus member GPT3. I previously wrote detecting unmatched local labels is not easy. Believe me, it is not so easy. You wrote: "the designer seems to mis-used a local label as a global label". There is no global label in "kit-dev-colfire-xilinx_5213. I am thinking you are talking about hierarchical labels. Be sure there is no mis-usage of labels in this demo, the demo is perfectly valid. > > --JC > -- Jean-Pierre CHARRAS _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

