Skip to content

Net class directive labels don't work when used in hierarchical sub-sheet

Summary

When net class directive labels are used inside a hierarchical sub-sheet, the net class assignment does not work.

Example:

Top-level schematic

grafik

Sub-sheet

grafik

Behaviour

This results in two nets 'X' and 'Y'. Net 'Y' has the netclass 'MY_NETCLASS' asssigned as expected, net 'X' however does not (still 'Default' net class).

Expected behaviour

I would expect the net class directive label to work across hierarchies. I.e. when I assign a net class to a net, it should not matter if I place the net class directive label on the top level or another hierarchy level.

Steps to reproduce

  1. Open attached minimum example project
  2. Check the netclass of the nets 'X' and 'Y' in the pcb and schematic.

KiCad Version

Application: KiCad x86_64 on x86_64

Version: 7.0.1-3b83917a11~172~ubuntu20.04.1, release build

Libraries:
	wxWidgets 3.2.1
	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: Ubuntu 20.04.6 LTS, 64 bit, Little endian, wxGTK, plasma, x11

Build Info:
	Date: Mar 15 2023 03:29:26
	wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.71.0
	OCC: 7.5.2
	Curl: 7.87.0
	ngspice: 38
	Compiler: GCC 9.4.0 with C++ ABI 1013

Build settings:
	KICAD_SPICE=ON
Edited by Marcel MG