by adom
adom-lbr — the EDA library translator. Bring a component in from any supported EDA tool and convert it to any other (KiCad ⇄ Altium ⇄ EAGLE/Fusion) through one canonical adom-lbr JSON — symbol + footprint + 3D + pin↔pad map. Altium is written natively (no Altium needed). Includes the adom-lbr Manager: browse wiki components and view symbol/footprint/3D + the per-EDA layer stackup.
EAGLE export strips a prime from pin names, so QH' becomes QH@2
What happens
adom-lbr generate passes every pin name through eagle_safe_name (src/main.rs, around line 879). That function keeps only ASCII letters, digits and _ + - . / ! @ $ #. A prime (ASCII ', U+02BC ʼ, U+2032 ′) becomes _, and the trailing _ is then trimmed. So QH' becomes QH. When another pin is already called QH, dedup_pin_names (around line 917) renames the second one QH@2. EAGLE and Fusion read @n as "another pad of the same pin", so the schematic shows two pins labelled QH. The netlist is still right, because each connect names its own pad. Only the labels are wrong.
Example: Panasonic EVQ-P7A01P (adom/evq-p7a01p)
Pins are 1, 1', 2, 2', with names 1, 1ʼ, 2, 2ʼ (U+02BC, as Panasonic prints them). The .lbr connects read:
- pin
1on pad1 - pin
1@2on pad1' - pin
2on pad2' - pin
2@2on pad2
So in Fusion the pin labelled "2" is on pad 2'. This is harmless on this part, because 1/1' and 2/2' are each one internal node. It is not harmless on the parts below.
Where it matters: different signals that differ only by the prime
- 74HC595 family: QH (pad 7, last parallel output) and QH' (pad 9, serial output to the next chip) come out as
QHandQH@2. The serial output is labelled QH. - CD4521B: VDD/VSS and VDD'/VSS' are separate supply pins, and come out as
VDD@2andVSS@2. - 74HC4094: QS' comes out as
QS@2.
Count
Factory-built component pages (factory page folders on two hosts): 111 have a prime in a pin name or number. On 40 of them the stripped name collides with another pin, which gives the mislabel above. These are 36 x 74xx594/595/596 (QH'), 2 x CD4521B (VDD', VSS'), 1 x M74HC4094 (QS') and EVQ-P7A01P (1ʼ, 2ʼ). On the other 71 there is no collision, and the name only loses the prime: X'tal becomes X_tal on crystals, and Q1' becomes Q1 on CD74HC4024/4040.
Repro (adom-lbr 2.47.9, source 2509eb6)
adom-wiki repo clone adom/sn74hc595n && adom-lbr generate --sym sn74hc595n/sn74hc595n.kicad_sym --fp sn74hc595n/sn74hc595n.kicad_mod -o /tmp/595.lbr && grep -o 'pin="QH[^"]*" pad="[0-9]*"' /tmp/595.lbr
Result: pin="QH" pad="7" and pin="QH@2" pad="9". Lint passes, so nothing flags it.
Suggested fix
In eagle_safe_name, map a prime to a visible, EAGLE-legal mark before the charset pass, instead of dropping it. For example, ', ʼ and ′ could map to _P (QH' to QH_P, 1ʼ to 1_P), or to ! overbar notation if the prime means "complement" in that datasheet (it does not for QH'). A trailing _ that came from a prime should not be trimmed. Then dedup_pin_names never sees a false duplicate. It would also help if lint flagged a pin whose @n name came from a stripped character rather than a real repeated name.