Pins-swap and Gate-swap

Bug #593944 reported by nobody on 2007-09-08
This bug affects 35 people
Affects Status Importance Assigned to Milestone

Bug Description

Please add pins-swap and gate-swap functions. For instance, on a 7400 quad NAND gate chip, there are 4 separate gates, all identical. It may ease routing to use gate C instead of gate A, but that's not how the schematic is drawn. pcbnew already has the concept of separate gates, but doesn't have a simple way of swapping them; you have to change the schematic and re-import it to pcbnew. This should be a one-click operation.

Stephen Eaton (seaton) on 2010-07-05
Changed in kicad:
status: New → Triaged
Paul "LeoNerd" Evans (leonerd) wrote :

Verymuch so also for pinswapping the ends of discrete components like resistors/caps/inductors. While it may not make much of a difference, it adds to the aesthetic neatness of a layout if all the resistors in an area are lined up neatly, with the references all on the same side. Without the ability to pinswap you often end up with some resistors around the wrong way, so their references are on the other side.

robotarmy (ry-white) wrote :

This would be SO awesome. Especially if pin classes could be set up, and back annotation to schematic and open-source EDA tools like icestorm or any of the ARM stuff.

Simon Richter (sjr) wrote :

Additional use case just came up: I have a circuit I need three copies of, and these should use different sub-units of one IC. I.e.

Copy 1: U1, U2, U3A
Copy 2: U4, U5, U3B
Copy 3: U6, U7, U3C

Abdullah Kahraman (cebrax) wrote :

This is also needed when working with AC signals.. I would like to swap pins AC1 and AC2 of a diode bridge rectifier..

Johann Glaser (johann-glaser) wrote :

In my circuit I have four SPST relais. I need the pin swap function to easily exchange the coil connections as well as the switch connections.

Eldar Khayrullin (eldar) on 2018-01-07
Changed in kicad:
status: Triaged → Won't Fix
status: Won't Fix → Triaged
tags: added: libedit
eelik (eelik) wrote :

I have seen some developer discussion about back-annotation which could enable swapping. There are of course may obvious and simple needs for swapping, like choosing between programmable pins of a MCU while routing, or choosing between two internally connected pins of a physically four-pin simple switch which electrically has only two pins.

PCB Wiz (1-pcb-wiz) wrote :

You can kludge pinswap now, with a long-hand workaround :
Select PADa -> Properties.Copy NetNameToB
Select PADb -> Properties.paste(as prefix) NetNameToB Select to end of line, Cut
Select PADa -> Properties.paste/replace NetNameToA

and reroute/route as needed...
Be much nicer to save all those mouse clicks and keyboard, with a Swap Pin Connection command.

Franck78 (fbourdonnec) wrote :

-use legs of components such a switches to do convenient bridges
-insert zero ohm resistors (cms and wires)

-hey rastnet, just connect this set of 32 FPGA ports to this component as you want, just give me the mapping header file to include in my app.

In this plan should:
1) Exist some shortcut (key that pressed and drawing a track) that highlight the not direct connection (that connections that can be made in the case of swap the parts/pins);
2) Other easy way to change it on the fly (when we are drawing the track, shifting between the options);
3) Take in account the pins already connected to tracks (show just the pins without tracks in step 2?);
4) Do the bi-directional annotation at the end;

MattEvinger (mattevinger) wrote :

I am new to Kicad, however I have been designing PCBs on dozens of packages or the last 35+ years. 'PIN SWAPPING' and 'GATE SWAPPING' are more important and more necessary with denser boards. Yes, in most cases in help improve the overall appearance of the board, but it's real objective to make the routing of the board easier, and in some cases, POSSIBLE. as long as the signal integraty is maintained, the netlist can change easily. For the Schematic to keep up, however, it can be challenging. Is signals are all named and assigned directly to component pins, without connection lines, then backannotating is just a matter of updating the signal names. That creates schematics that can be difficult to read. It is easier to move PIN NAMES, PIN NUMBERS and REFERENCE DESIGNATORS. If the Symbols permit Pin names & numbers to be exchanged between swappable gates and pins, and the Reference designators moved as needed. This allows unnamed signals and connecting lines. Making the schematics more readable. Also SETS of pins should be treated like gates, like input & output pins in an octal buffer or latch.

eelik (eelik) wrote :

This comes up quite often in the forum in different forms. This is the latest example:

To be as flexible as needed, this feature should allow selecting either one OR many pads to be connected to one net from the board editor. Think about a micro-usb connector through hole component where e.g. 4 shield pins can be connected to GND. Not all of them need to have GND contact and it could be decided when laying out the board.

tags: added: eeschema feature.request pcbnew
removed: libedit
eelik (eelik) wrote :

For reference, if someone is reading this but hasn't read the roadmap for 6.0, pin swapping and gate swapping is there:

Referring to comment #1 - could pin swapping at least for non-polarized two-pin components be completely automatic? Because direction doesn't matter at least two things could be automatic, namely ratsnest and possibility to connect tracks.

The ratsnest could find the nearest possible pad.

Connecting a track could be possible to each of the possible pads if they are both free. After one pad is connected the connection would be fixed and only the other pad would be available for the second net. But it should be possible to rotate a symmetric two-pin footprint 180 degrees and the connections would be automatically swapped, too.

There is good reason for this to be automatic. Positioning footprints in a new layout takes much time and rotating resistors and capacitors just to clean up the ratsnest is completely needless and time consuming step.

Also changing the positions of components in partial layout is needlessly difficult, often footprints have to be rotated even though logically there should be no need for that.


I wonder if it would even be possible, when the new symbol and shcematic formats come, to have pins with no numbers so that the component would automatically be understood to be non-polarized and swappable.

Changed in kicad:
milestone: none → 6.0.0-rc1
Wayne Stambaugh (stambaughw) wrote :

@eelik, I am opposed to automatically making changes to users designs. As an EE, I would be highly upset if an EDA changed my design without my express decision to do so. I doubt we could ever make KiCad more clever than an experienced board designer. I think what you want is footprint place tool that minimizes crossing nets.

Symbols must have pin numbers. How would you assign nets to the pads of a footprint?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers