Labels for inverted signals

Hello!

I would like to point out something about inverting labels. I know it’s possible by putting the part you want to invert between ~~, but there is one problem as shown below. The labels are enlarged and step
on each other.

It becomes a real mess, and I aways end up naming the signals with a N, without the upper line symbol.

That said, it’s not a crucial issue, but I thought it’s worth mentioning. By shifting the string inside of the label, I think it would be possible to draw the bar over the inverted signal. Or even without shifting.
In the picture below, I have just added a line copied from the label frame. There is a tiny space on
both side, so it can just be drawn even without enlarging the label. I don’t claim it’s beautiful and balanced, but at least it looks less messy,

What about decreasing the label size to 0.040 or less?

1 Like

I’ve never liked the box around the global labels much.
I do appreciate they made a the box a bit bigger to accept inverted text but that indeed makes it overlap with other nearby labels.
In the screenshot below I’ve made an overview of some possibilities.
Making the text itself smaller as pedro suggests works, I did this in the 0.04" size example.
I do not particularly like those two options. Text is of course perfectly readable when zoomed in enough (and it’s searchable, highlight tool, etc) but when zooming out KiCad (still) has some issues in keeping text readable. Even on the screenshot below text is already unreadable (on my normally 0.24mm pitched monitor)
image

I do not see your option (Keeping same box & font size, but shifting the text) as a good option. You also have to consider schematics get printed on paper, low res pictures are made as screengrabs and used as documentation, shared on forums and lots of other uses. Your inverting bar is visible, but just barely and it’s hard to distinguish from the box itself. You really need a decent amount of space between the box and the inverting bar or else it all just gets to crowded. It is the combination of the box around the whole label combined with the inverting bar itself that just does not work very well.
Both the local labels and the Hierarchical labels do not have this box problem and are perfectly distinguishable in the last screenshot below.

Two other options are the “Global Fanout” which works relatively nice for up to around 10 labels and is also quite easy.
“Global Staggered” can be made in any height, but needs more paper.

On top of that. A global label here and there is a good tool for the toolbox, but making lots of connections with long rows of global labels is a bad practice in itself. In KiCad-nightly V5.99 the capabilities of buses are extended considerably, and you can use local labels, put them in a named bus and route that bus to other sheets.

1 Like

I have not tried it with KiCAD but in Eagle I used “/name” for not_name. (inverted)

In KiCad is ~name for inverted signals.

I tried using the leading slash in version 5.99. There are issues WRT “find” function and I am not sure what else.

For inverted signals…I have a radical idea. What about turning the text upside down? (I am half serious.) Right now KiCad does not allow that.

1 Like

This would not work well with external tools that work with the netlist, and would also be a headache for writing documentation.

No problem! Just stand on your head while doing that! :slight_smile: Seriously yes I guess that text functions would not recognize the inverted position as significant.

Like a pull-up to GND and a pull-down to +VCC ? :grin:

What about a pull sideways?

1 Like

Damn, I should have though of that. The best I did was telling two of my students that you can mount components on all 6 sides of a PCB… and I proved it :))

EDIT: Also, a nice thing that the reply by email finally works ! Kudos !

Hello!

What about decreasing the label size to 0.040 or less?

I just tried, and yes, it’s an option.

Hello!

Thanks for this exhaustive review of the different methods.
I tried setting the label to 0.9mm which sounds a good option. Anyway, I never print my schematics, so they are all zoomable. Beside this, printing a 484 pin FPGA on a A4 wouldn’t result in a very informative document. And I may even use more pins in the future. It would be good to have the possibility to automatically resize the inverted signals so that they don’t overlap, just as in your screen copy. You apparently resized only ~TW11_NRES.
Local labels are not an option because I never know what line it applies to. Well, that may be only me… I know, it’s the closest one, but I’ve seen case where it’s not obvious. And especially if they are inverted, it’s not easy to judge which one is the closest one.

I thank you for personally saving the rain forests.

Also:
If you’re working with 400+ pin FPGA’s, then working with graphical schematics is probably not the best way to enter your netlist.

Have a look at the Skidl project. I have not used Skidl myself, (it does not fit my sort of projects) but it looks as something that fits working with big FPGA’s very well. In it’s essence, Skidl is a python library that helps in using Python to create a netlist and assign footprints. I see it as a sort of VHDL for generating a netlist.

You can use all the properties of python itself such as arrays and loops. Generating a bunch of decoupling capacitors and their GND+Vcc connections for example is just a for loop. I assume it is also relatively easy to extract lists of pin names from your FPGA tools (either by a (separate?) python script or just a simple text editor) and then modify it further with Skidl before putting it in Pcbnew.

I assume it’s also easy to combine a KiCad schematic with Skidl. Worst case you have to write a netlist from Eeschema and then import it in Skidl. This way you can use the best of both worlds, and use the schematic for example for a power supply section or other stuff for which graphical schematics are better suited than text.

I think that in KiCAD 5.x, the overbar option has one problem: The differential-trace routing does not recognize it. The differential trace router wants to see a trailing ‘N’ or ‘P’ in the names of the differential pair. Am I wrong?

I once had a boss who would draw his ground symbols in all four directions. Seriously, I think that makes the schematic more difficult to read; I was not the only one who did not like that.

Of course if you live in the basement, maybe grounding up makes sense.

1 Like

Nope, you’re correct.
I already knew this, but verified it anyway.
I made a Diff and a ~Diff and it’s not accepted as a differential pair.


I do find it weird, but do not find it a very pressing issue. Differential pairs tend to be point to point connections, so there are not many of those labels, and differential pairs are not very important for me in the first place.
I also wonder if this was just an oversight, or if it’s done on purpose. You’ll have to wade through all of Gitlabs issues to get to know that.

But it’s not the only problem.
A more serious problem (in my opinion) is that these two labels:

~Labbel
~Labbel~

Are visually exactly the same:
image

However, they are two different nets in KiCad. Which becomes clear if you use the highlight function:
image

For the inverted differential pair there is a partial solution
~LABEL~_P and ~LABEL~_N. Althoug a bit ugly because the _P and _N are not covered by the bar.

This is not a solution, nor a viable workaround.

First: ~LABEL~_P has both a positive and inverted part which is at least confusing.

Second: ~LABEL~_N has a double negation in different formats, and inverted twice you get the normal signal back. Yuck.

This makes a small limitation of KiCad and turns it into a source for confusion and may lead to errors.

From the cflin’s post I thought he wanted barred signals in a differential pair. As +/- or P/N are mandatory, it is a solution. Maybe LABEL_P and ~LABEL~_N is more suitable and they can ignore the _P and the _N, but I do not know what kind of signals they need.

For me the bar is not a negation of a signal. It means the signal is asserted low.