Help: Strange ERC sub-sheet bus behavior

I’m trying to split buses, and I was getting ERC errors. So I made a test schematic to understand the behavior. I’ve attached pictures and the files. I think the ERC might have a bug. I’m using KiCad 6.0.8.

On the left, I have an IC with 16 outputs that I make into a bus. I also have two instances of a sub-sheet that takes a 4 bit bus as input. I split the bus two different ways to connect the 16 bit bus to the 4 bit buses and they both work, albeit with some ERC warnings (“Both and are attached to the same items”).

On the right, I have the same thing, except that I replace the IC with a sub-sheet that has the IC in it. I connect it to 4 bit buses the same way I did above, and I get ERC errors (Label not connected to anything):

Despite the errors, the PCB has a correct rats nest, and the rats nest is the same on the left and right sides:

So it looks like this is a problem with ERC only. When a bus is connected to an IC, it knows that the wires are connected to something. When it’s connected to a sub-sheet, ERC thinks they’re unconnected. They are, in fact, connected to the IC in the sub-sheet:

Am I understanding this right? Is it a bug? Other than ignoring the error, is there a way to get this working right?

Thank you.

BusTest.zip (99.0 KB)

first ERC-warning: “Both and are attached to the same items”:
this warning is correct. It tells you that you have two labels/names for the same net. In your case this is intentionally, so you could either ignore this warning or completely disable this particular ERC-check. (most checks can be enabled/disabled with File–>schematic setup–>electrical rules–>violation severity).

second ERC-warning: “label not connected to anything”
this is a bug, I think I have seen this already as gitlab issue. Maybe already fixed, there was some ongoing work on the label/ERC theme in the last weeks. Could be that the upcoming v6.0.9 (1…2weeks) fixes this.

1 Like

I upgraded to 6.0.9 and instead of the “Label not connected to anything” errors going away, they got worse! My error count jumped from 16 to 216!

All the labels look connected just fine.

I opened your project and not sure there is any bug here.

For example there is an error message “Label T12 not connected to anything”

The wording of the label could maybe be changed to “Label T12 not connected to anything else” – the label is only connected to pin 2Q6 of U1A, and doesn’t go anywhere else.

But look at some of the other “not connected” labels. Like Rdest0 is connected to T8 on one side, and goes into the subsheet Instance 4 on the other side, where it’s connected to a 7432 chip.

I’m not very proficient in the working of buses in KiCad, but I did find something that I do not understand.

The message:

Warning: Net /RegIndexIn0 is graphically connected to bus /RB[0…3] but is not a member of that bus.

KiCad not recognizing the wire as a bus member will explain some of the other errors. I did remove the wires, and then used the [Right Mouse Button] / Unfold from Bus to recreate that part, but then I still get the same warning.

A grep gives me:

paul@cezanne:~/downloads/BusTest$ grep “RB” *
BusTest.kicad_sch: (label “RB3” (at 243.84 87.63 0)
BusTest.kicad_sch: (label “RB0” (at 243.84 95.25 0)
BusTest.kicad_sch: (label “RB[0…3]” (at 250.19 86.36 0)
BusTest.kicad_sch: (label “RB1” (at 243.84 92.71 0)
BusTest.kicad_sch: (label “RB2” (at 243.84 90.17 0)

Which is one of the instances on the bus on the main sheet.
If I delete that whole instance, then I get a similar warning, but it changes to the /Q bus:

So there is something missing in the bus definition, but I do not know what.

Another small thing:
You used a hierarchical label to name a bus, but I think you wanted to use a local label for the T[0…15] bus:

Networks with different names are connected to each other, especially when they go into a subsheet. KiCad seems not to handle that well.

I’d been experimenting a bit with the buses, some time ago, but I could not find the project.
Now I searched a bit harder.

2022-07-09_asdf_hierarchical.zip (26.3 KB)

From what I can remember, there is a difference between a hierarchical label name on a bus, and a local label on the bus. I assume that local labels have the priority in naming the bus, because the hierarchical labels are used to connect between sheets. I think you have to give the bus a local name on each sheet.

With the attached example I get only a lot of:

Error: Label not connected to anything.

I think this example passed ERC two months ago.
Weird thing is, when using the Highlight Tool from the right toolbar, It does highlight the nets. It seems there is a discrepancy between this highlight tool and the ERC.

For example, BUZZY_2 on the screw connector on the main sheet, is connected to Truck_1 on the left sheet, and to BUS_0 on the right sheet according to the highlight, but ERC shows them as Error: Label not connected to anything.

Note that this example is not only a schematic. The PCB is routed too.

I meet this error without bus. But my design has sub sheets, :frowning_face:


And I try to use a v6.0.9 to open this project, I get this dialog as below:

Is there any way to downgrade this design?

For the false-positive “label not connected to anything”: the v6.0.9-testing already has a fix - you could install and try that version. (edit: at least valid for the windows-version - your screenshot looks like another OS.)

For the second picture: The file was most probably saved with kicad v6.99 (nightly development version) - there is no way back to normal v6.0.9. (Using the nightly v6.99 is on your own risk.)

If this project has been edited by a 6.99 Nightly, all you can do is update to the latest Nightly. If the error is gone great, if still there please raise a bug report. 6.99 should be entering “RC” stability levels in December for a January release plan

I found this issue tracker ERC “Label not connected to anything” in basic bus usage . And I rebuild the source code with commit head 5fb191e, I test on my project with newer kicad is ok.Thanks. :grinning:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.