Remove "All units are interchangeable" from the Symbol Editor?

Well, I do. And the “kludge” is not the copy/paste solution, but the current one. Who says all units in a multi-unit symbol are the same? There are transistor arrays with PNP and NPN transistors, or N-ch and P-ch FETs, or amplifiers with a built-in reference and, and, and.

The transparent way would be to treat all such devices in the same way,

Please don’t mix things up.
Gate swapping works wonderfully in KiCad, “Pin swapping” is a different issue that a thread hijacker introduced. Don’t take that up again.
My original question was concise and to the point.

Well, I say 44 multi-unit symbols have the same units; in the entire Kicad supplied libraries. :grin:

We are playing in a very marginal area here.

The reason to implement interchangeable unit groups properly is not just the data sharing. It could also improve error detection. Currently if I change the unit from a NOT gate to a power unit, the error is discovered only when the graphics changes and connections break. If KiCad knows the unit I want to change to is not compatible, then it could intervene.

The reason I’m uncomfortable with getting rid of the interchangeable unit feature is you are throwing away information. Admittedly most of it was thrown away in the past due to power units.

Did you really go through the full library? You need a hobby. A garage and a vintage car is my thing :slight_smile:

It was too bloody hot outside to do anything much yesterday, even in the shed, and is is easy to check through the libraries now days.
I’m off to play shortly, just decided to look in here first, to see if there was any action.

Does gate swapping work in symbols (such as opamps) in which the graphics is copied?

Yes, indeed, agree completely. A good implementation would be some method for KiCad to create (and maintain) such symbols in a concise way. It is not just about the “All Units are interchangeable” checkbox. It’s about a proper method for defining multiple units which share graphics. That checkbox is mostly a historic relic. KiCad has never had a method for complex symbols.

some time ago I started on a project with an STspin. It’s an STM32, but with built in extra hardware that is commonly used in BLDC motor controllers. It has:

  • STM32 uC.
  • SMPS.
  • 3x Low side gate driver circuit.
  • 3x High side gate driver circuit.
  • Several Opamps for current sense amplification.
  • Maybe more (The project never got very far for various reasons).

However, this IC is an excellent example for the need for being able to design a complex schematic symbol with a lot of units. When designing such a symbol, it’s also likely to get a bunch of revisions, and the graphics for the different gate drivers getting out of sync would be an extra headache that should be avoided by a proper implementation for such symbols in KiCad.

Interesting objection. But actually you’re not.
The only difference is the storage format in the symbol library file.
The “interchangeable” symbol is stored as one graphic and four instances of the unit pins.
The “non-intechangeable” is stored as four graphics with pins listed for each one.
There is no information loss anywhere. Look into a symbol library file yourself. It’s plain text.

Yes, certainly. There is no difference between the different “types” of symbols there.
It’s just a question of choosing “unit A” or “unit B” and the pin numbers change accordingly.
This discussion is purely related to the symbol editor, not the schematic editor.

So, all this discussion seems to break down to “All units are interchangeable” needs to go, and a more versatile button is needed to replace it: one that includes “All units are interchangeable” but will also cater for “All units are not interchangeable”?

Perhaps something like “Unit interchangeability” where you tick the unit boxes you wish to be interchangeable? The rest you create as you see fit?

1 Like

I already pointed out a situation where the equivalence information can be used.

As for “bureaucracy” KiCad asks for a lot of settings everywhere. Fortunately most of it can be ignored and defaults accepted until you need to use it. This one just happened to annoy you. It can be de-emphasised or made more general and powerful and kept away from beginners.

Nooooo!
Just remove it. Period.

Not really. That was years ago. But I see new users being uncertain about what to do with this, and I raised a flag here.
That’s all. I know myself that the function is useless, but am trying to improve things a bit.
Perhaps I’m wrong. I should leave it to the Committee.

Well you could raise an issue on Gitlab. You certainly have enough discussion here to reference.

@ML9104

I’ll give it a thumbs up. As it currently is, that function is useless apart from a very few marginal cases.

I’ve seen the split Pot symbol used in audio, split Qs very occasionally and (I’d forgotten to mention way up) split double Diode packs used as rectifiers in SMPSs.

I’ve never seen split R arrays and signal diode arrays were often used as mickey mouse logic back in the days of VCRs, but never split.

I will give it a thumbs down.
It’s not the right feature request. the “All units are interchangeable” is a bit of a silly checkbox, I agree with that part. But it’s also pretty harmless. The real issue here is how to define a robust way to define several (but not all) units as the same / interchangeable.

2 Likes

Yeah, well getting rid of the “all interchangeable” will give a perfect excuse to introduce something better as a feature request. :slightly_smiling_face:

I’m sure there just has to be something better than this:

What about “select interchangeable units”, and if ticked, a chart pops up with the number of units shown in the package. Tick the appropriate boxes (which copies one symbol into all the ticked units) and manually create the other symbols for the unticked units.

This allows Kicad to know the complete symbol, gets rid of confusion for the user, saves copy/paste and works for all units the same, some different or all different.

So, how does this work then?

I started on the wrong end, and cobbled together a simple test project for this (Both schematic and PCB).

2024-03-17_asdf_gate_swap.7z (26.2 KB)

So assume I now want to swap U1A with U1C.
Sure, I can go to the schematic, and then manually change U1A to U1C and U1C to U1A, but that is not what is meant with gate swapping. The “classical” meaning of a gate swap is that you select two gates in the PCB Editor (during routing) and tell the software to swap those two. This also implies there is a method to port that info back to the schematic.

Pin & Gate swapping is an open issue since 2007.

“Pin swapping” is not intended as a hijack. They are both mentioned in the title of that Gitlab issue from 2007.

A part of the problem here is that KiCad would have to know that the opamps can be swapped. And that is a part that is still missing in KiCad. The “All Units are Interchangeable” checkbox was (likely) a (half hearted) attempt to implement this, but it never got finished.

Or when filling out the unit have the option to select “interchangeable with”. That’s way as many equivalence groups as needed can be created.