Same pin & connector names in schem, netlist has different names

If this is in the forum, I cannot find it.

I created a schematic with a bunch of connectors that are tied together with busses - an Arduino Mega 2560 shield. One page. Then I created an hierarchical page and put it all in there, because II wanted to incorporate it with another schematic I already had. In the new project, I started with the one that had all of the stuff - uarts, ADC, etc. I want to make it into a shield. So, in that project, I created a hierarchical child page of the name “shield”, and copied my existing child page “shield.sch” over the the just created “shield.sch.”

Time passes. I create a netlist in my schematic. I lay out all the parts on the pcb. Then I goto run the traces. I notice none of the parts in the ratsnest connect to the pins on my shield connectors. I look at the netlist with vim.

Wonder of wonders, I see all of my I2C devices (for example) have SDA connected to each other. I look in the netlist file (.net) and see the name SDA for them. cooll. BUT - I look for the name of the connector. It is “/shield/SDA” All others are just “SDA” Obvious mismatch of the text strings.

So I goto my original schematics with all of the parts (the one I am laying out). I create a new hierarchical page “foo” an save/paste all of the shield page stuff to the new page “foo”.

I expect this to work. It does not. In the netlist, “/shield/SDA” is now “/foo/SDA”.

No, if needed, I can edit the netlist file and eliminate the “/foo/”, but that is a band-aid. But this would be a desperation move, used only in extreme “world will end” cases.

If needed, I can supply example .sch files.

I know I should have started with my shield schematic, but this is silly. This is obviously a problem with one or two minor things which take 3 days of pounding one’s head into the wall.

Thank you for your attention! … bandit

Looking at the net names that you got, you used local labels and then didn’t use hierarchical labels to connect the local labels in your sheet to the parent page.

1 Like

Interesting. I will pay more attention to that next time. Thanks for the answer.

Question: If I have a sub-sheet (hierarchical child sheet) how can I import it into another project? Is there an “approved method”?

I did a search - use “append”. I will play around with that…

Thanks … bandit

So I payed attention. no joy. Tried putting the hierarchical labels on the main page. Some actually connect (LED_SET_1_8A) - most do not. Looked at the .net file - no apparent difference.

Iknow I’m missing something obvious, but not apparent.

Thanks for taking a look at this! …bandit

Using 4.0.7, release build,

bad_test.zip (18.2 KB)

Buses do not work that way in kicad version 4 (nor do they in version 5)

Buses can only connect nets with names that contain consecutive numbers after a common prefix. The hierarchical pin then needs to be named common_prefix[x…y] (common prefix is the prefix used for all signal names. x is the lowest signal suffix index, y the highest)

Oy. - no wonder - told you it was something silly.

Wonder why LED_ … 8A worked.

Appreciate it…

I could not find anything detailed about that in the official documentation (I was sure there was something sometime in the past.)

The only things i could find are (From version 5 docu i am sure version 4 works similarly):

and a blogpost explaining buses with the use of global labels (hierarchical labels/pins should work the same)

1 Like

If you are going to be at KiCon, look for an old hippy-nerd - white long hair, beard, and only a right hand. (I’m the (ahem) one-armed bandit). I will happily buy you a beer. I will also be at PS:1 for the reception (I also happen to be a member…)

The US is a bit far away for me so i sadly must pass on that.

Bummer. But really appreciate it. I knew I was having a brainfart && not a lot of time to figure it out…

And - if you ever lend someone a hand, make sure you get it back - I forgot… once

Works exactly like you said… (not like I wanted it :frowning: )

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