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