Netclass asignment not working due to '/'

The layout editor is not using the propper wire withs, since it can’t recognize the net class.
The reason seems to be, that for whatever reason KiCad uses a ‘/’ in front of the net names of this non-hierarical(!) design.

This shows an example of the two nets “AmpR-” and “R7+”, but all nets have the same problem:

The PCB-Editor netclass show the same net names with the ‘/’, but the editor itself uses without the ‘/’

The automatic trace width does not work either.

What am I doing wrong?
Marko

Cant see from your screen shots, what width is this track ?

image

Looks like it’s meant to be 0.3mm ?

image

The track is 0.2mm (In2), even after 0.3mm is defined for the net class.
It’s completely ignoring the net class assignments.

I also tried to rename the net “R7+” to “/R7+”, but if I do so, I see in the PCB-Editor the name “//R7+”, so I changed it back.

What is also funny:
The ratsnet of V_{BatSW} is shown as “default” as well as “Power”.

I’m getting the feeling, that this might be a bug in KiCad 9.0.3

Marko

I’m not.
KiCad assigns these automatically.

Marko

I got one step further:
If I unselect “default”, then the ratsnest are shown correctly. And if I then route them, the width is correct.

So the question is: Why is “default” still assigned to every net, even if a netclass is specified?

Marko

KiCad always uses a slash in front of local net names. It doesn’t matter whether or not your design has multiple sheets.

The slash (and in fact, any hierarchical sheet path) is removed whenever the result is unambiguous for the net labels shown in the PCB editor on top of tracks/pads in order to make the display less cluttered.

Nets can be in multiple net classes in modern versions of KiCad. You will see this result if your custom netclass does not define values for all possible rules; it is normal.

Net classes don’t have an impact on ratsnest. As to width, it is impossible to tell just from the screenshots you have provided so far. Can you share the project?

I could life with the ratsnets thing, but if I have chosen “Track: use netclass width” and it is using the width default, then this simply is not working.

I used it last week for another project and it was working fine.

Marko

There is no need for this, but without being able to see your project it is hard for people to guess at what is wrong. Perhaps try selecting a track in the netclass and using the Inspect > Constraints Resolution tool to get more information.

You are right: The signal is assign to “analog” and to “default”:

It says:
Checking netclass ‘analogSignal’ track width: opt 0.3000 mm.
Constraint applied.

So why is it ignoring this?

Marko

The issue is that the net you are looking at is a differential pair (because it ends with a -). Differential pairs use separate width settings than other nets. You need to either rename the net to not be a differential pair (if this was not intended) or set a differential pair track width in the analogSignal class.

1 Like

Give me a sec - I change names.
This indeed could be the solution.

Marko

Ok, I changed the signal names and prevented any ‘+’ and ‘-’.
This way the width for the netclass is correctly used.

This is a real trap within KiCad!
It would be way better, if the name could be choosen freely and assigning a netclass ending 'DiffPair" would classify it as a differential pair.

Thanks a lot - you saved my day!
Marko

2 Likes