Netclass members check/manage

Since K7, there’re two ways to add Netclass members.
One is using wildcards or regex to match net in Schematic setup. That’s handy.


The other way is to place netclass directive labels directly on schematics. That’s also good. But it looks this is not combined with the netclass setting in schematic setup.

So the problem is if I use both methods to add members to Netclass(pwr in above examples), how can I check all the members of certain netclass(including the one defined with netclass directive label)? Or if I only use netclass directive labels, is there a place to check the netclass member?
In v6, there’s a netclass filter but it’s gone in v7.

There is even a third option to add a netclass: you can add the netclass directly to every local/global label (in the label properties dialog).
My recommendation is also to not mix the different netclass-options, instead stay with one workflow.

is there a place to check the netclass member?

The search-panel in the board-editor (View–>Show Search panel) shows a summary of all used nets and the assigned netclasses.
Sadly this search panel is not sorted in v7, so this is only partly useful.
For v8 the sorting-feature was added, you can sort for netnames and for netclasses. This gives a good overview over all used/assigned netclasses. It allows also to select all tracks in a given netclass.

There is no way to have automated checks for netclass assignment such as ERC. KiCad can’t know which nets should be in which net class. I do not know of a better method then to just do manual checks, but there are a few things that can help.

You can use alternate colors and line widths for net classes in the schematic. (Click on the checkerboard area in the net classes dialog) You can give you netclasses a temporary color to make it stand out from the rest, and then go though the schematic to check for missing (or extra) nets in that net class. Including the “Default” net class.

What is your interpretation of this:

The “BLUE_IN” net is not listed in any of the Netclass assignments, because it does not match the any of the patterns, but that does not mean it is not in the pwr net class. (Temporarily) assigning another color to the pwr net class also helps here to verify this.

You can also assign colors to net classes in the PCB editor. Here I made the “power” net bright green:

I have not designed a PCB in KiCad V7 yet, but did a bit of searching and I could not find a method to simple list all nets in a netclass.

ERC does catch it if two net class directive labels with different names are attached to a wire:

ERC does not complain about conflicting net class assignment (for example a filter pattern and a netclass directive label).
ERC does not complain about net class directive labels for a not existing (misspelled) net class.

These might be valid feature request for gitlab.

I also seem to be bumping into things I don’t understand. First a bug (I think it’s a bug) that colors regular label in the color of a netclass. See the cyan datalines.

In addition. I set up D4 to be orange, but it does not work.

Are these bugs, or did I miss something?
2023-10-19_asdf_netclass.zip (8.3 KB)

Application: KiCad x86_64 on x86_64

Version: 7.0.8-7.0.8~ubuntu20.04.1, release build

Libraries:
	wxWidgets 3.2.2
	FreeType 2.10.1
	HarfBuzz 6.0.0
	FontConfig 2.13.1
	libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3

Platform: Linux Mint 20.3, 64 bit, Little endian, wxGTK, xfce, x11

Build Info:
	Date: Sep 30 2023 13:54:09
	wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.71.0
	OCC: 7.5.2
	Curl: 7.88.1
	ngspice: 38
	Compiler: GCC 9.4.0 with C++ ABI 1013

Build settings:
	KICAD_SPICE=ON

I set up D4 to be orange, but it does not work.

you need to write /D4
If you use the right-click context-menu–>Assign netclass command kicad will add the correct netname (including slash) for you, without opening the schematic Setup->netclass dialog.

ERC does not complain about conflicting net class assignment (for example a filter pattern and a netclass directive label).

yes, this is missing (also in v7.99) and should be opened as ERC feature request.

ERC does not complain about net class directive labels for a not existing (misspelled) net class.

This is already tracked in ERC: recognize undefined netclasses (#12442) · Issues · KiCad / KiCad Source Code / kicad · GitLab but got not much attention.

Aha, I didn’t realize there’s a show search panel in pcbnew. Just try the latest nightly, the sorting feature is already added, so problem solved.
Now I can check if the class members are correct before defining a custom design rule. Thanks for help.

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