I downloaded a symbol from UltraLibrarian for a Zynq SoC, but I didn’t like that they’d jammed all 400 pins into only 4 units. So I set about regrouping the pins into more logical units. My first step was to go into the symbol properties and change the number of units from 4 to 8. To my surprise the pin table then contained 800 pins, with massive numbers of duplicate pins.
Looking more closely I discovered that my four new units (E-H) were duplicates of unit A. Is this really the intended behavior? Do I really have to delete Unit A’s contents every time I create a new unit?
I made sure that I did not have the box checked that would indicate that all units were duplicates of unit A.
This is with a recent installation of KiCad 9.0.6 under Ubuntu Linux. (I’m away from that computer or I’d post the specifics).
I opened a LM324 from a personal library in the Symbol Editor using hotkey E.
I changed the number of units to 7 then later, 8.
The new units were all duplicates of Unit A, no matter which unit was displayed in the Symbol Editor.
I don’t know if this is intended or not. I’ve never tried changing the number of units in an existing symbol before.
As an interesting aside:
If you wish to remove Units from a symbol (eg. make a two opamp, eight pin opamp from a four opamp fourteen pin package), the only units that will delete are the lowest in the list (in this case D & E). You cannot choose, and renaming units doesn’t alter the Unit list. So, the only way to keep the power unit graphics is to copy/paste the graphics from Unit E to Unit C before deleting two units.
It really doesn’t matter what, if anything, is placed in the new units upon their creation, it will be completely wrong, and Kicad has no way of knowing what you want, so I suppose it might as well be the contents of Unit A.
To me, it is just a matter of deleting the Part A symbols in the E to H units, bring up the Pin Table, and go for it. An hour later , create a rectangle and tidy up the pins in each of the E to H units and tidy up the pins and maybe modify the rectangle in the A to D units.
>Is this really the intended behavior? Do I really have to delete Unit A’s contents every time I create a new unit?
Currently yes.
I personally like this behaviour, because mostly it’s easier to modify a unit instead of drawing it completely from scratch.
In the end it’s a zero sum game: Now I’m ok with the situation and you have two keypresses “CTRL+A” and than “Delete” (on every new unit) to get an empty unit, in the other situation there is an empty unit from start and I have to “CTRL+A”, “CTRL+C” and than “CTRL+V” (on every new unit) to paste. I have no real interest in arguing for one or the other, I would only explain that there could be a reason for the current behaviour.
Only one of the checkboxes mentioned in the FAQ is relevant to my issue, and I addressed that in my original post.
Further, the FAQ indicates that it will be necessary to cut-n-paste the contents of Unit A into the other units. This is only true if Unit A was empty when the number of units was changed from 1, so I feel the FAQ is misleading.
To nit-pick your reply: With the current behavior, you have to CTRL-A/DEL for every new unit. If the new units were empty, you would only have to CTRL-A/CTRL-C once on the unit you want to copy, then CTRL-V once per new unit. If you wanted to duplicate a unit other than Unit A, then the current behavior is even more involved.
I do see your point. However, when I created a new unit I expected it would be empty, and it was very confusing until I realized what had happened. I think most users would agree with me.
If I create a new unit, I do find it quite logical that KiCad starts with a copy of another unit (Unit A or the last modified one?) But I also do not completely understand KiCad’s behavior when creating multi-unit symbols. I’m not sure whether it’s just my brain that is playing tricks on me, or whether there are some bugs in the creation of multi-unit symbols.
There are scripts for KiCad that help with extracting lists of pin names from pdf datasheets, organize them in a spreadsheet and then create KiCad symbols from the spreadsheet. See for example this article about uConfig: Creating KiCad Parts From A PDF Automagically | Hackaday
But KiCad’s symbol editor is quite nice. It lets you easily drag / rotate / mirror blocks of pins and delete them. A viable approach is to open two instances of the symbol editor. And then create a completely new symbol in your “real” library, and then you can copy and paste in sections from the old symbol.
When you’re working with symbols that have 400+ pins, it’s pays to put some effort into sorting out a good workflow first. And double checking the data would also be on the “todo” list. For example, copying data from KiCad’s Pin Table into a spreadsheet, and then comparing that with data extracted from a pdf with uConfig. Getting data from PCB_Libraries, UltraLibrarian, SnapEDA, etc can save you some work, but I would not trust such data and always verify it personally.
Misleading? So your use case is that someone decides to create a single-unit symbol and then suddenly has second thoughts? Extremely realistic (not!).
TBH, I think that for 90% of cases, copying unit A to additional units is a service. If you don’t like that, then “select all” and deleting is not an immense effort, it’s two keystrokes. Sure, lots of more check boxes and menus could be added to address your particular need, but would that be an improvement?
I’ve made my point: I believe it is counter-intuitive for KiCad to copy Unit A and always Unit A to newly-added units. This is slightly helpful if you’re creating a symbol like a 7400 where all the units are identical. Otherwise it’s just an annoying and confusing quirk.
I will submit an issue and turn this over to the dev team.
Re your comments on the FAQ, I’ll merely quote from it:
For both variants, proceed as in the main FAQ, but in the Symbol Properties screen set “Number of Units” to 4.
The tick box “Show pin name” defines the difference between U1 and U2.
Variant 1:
Create unit A and add power pins to it. Copy and paste to units B, C, D and finalize by adding the pin numbers using the “Pin Table” function.
You’ll now have a multi-unit symbol as in the Variant 1 screenshot.
Variant 2 is very similar.
Do exactly as with Variant 1, but don’t add the power pins. Do the copy/paste to B, C, D first, and then add the power pins to unit A. Assign the pin numbers.
My only serious attempt for a complex multi unit symbol was for one of the ST-SPIN uC’s. These are uC’s with lot’s of extra stuff to control a BLDC (SMPM) motor. On a single chip it has:
uC
SMPS with 60V put.
MOSFET drivers for a 3-phase H Bridge.
Separate opamps for feedback current measurement
Maybe more (I forgot).
For me, the project stranded because I did not dare to design around such specialized parts during the pandemic. But it did make me feel the muli-unit system was lacking functionality. Having a mechanism to easily create three of the (dual) fet drivers, and the two opamps, and the other units would have made it easier.
From what I remember, copies of the same part would also easily get out of sync. There is a function of “all units are interchangeable” But that already breaks for a 7400 if the power pins are in a separate unit.
I was also missing a function to give (groups of) units a separate name (SMPS, FET-Driver, Opamp, etc). Maybe there are already some feature requests for some of these, but I got distracted after that project stranded.