On Dec 10, 2015, at 10:11 PM, Simon Richter <[email protected]> wrote:
> 
> Hi,
> 
> I'm thinking about adding some support for pin and unit swapping. To
> make it maximally useful, I'd like to generate a list of alternative
> mappings inside the netlist, and add the actual swap functionality
> inside pcbnew -- so if it turns out that the layout becomes easier if
> two pins are swapped, this can be done during layout.
> 
> Use cases so far:
> 
> 1. unit swap for multi-unit ICs
> 
> Fairly straightforward: I have two identical units on the same IC, and
> can exchange them.

In the common case of, say, a quad op-amp or a quad NAND gate, you have to 
consider the issue of power pins. Do you put the power pins on one of the 
units, or do you create a separate unit for them? Doing the latter probably 
makes the most sense, but you will have to create a mechanism to declare the 
unit is not swappable. (Seems straightforward, actually.) Everybody has seen 
the mess created on the schematic when you choose Unit B, without power pins, 
of the quad op-amp for something, and then you swap it with Unit A, which does 
have the power pins.

> 4. I/O pin swap on FPGAs
> 
> Pins can be swapped easily inside the same I/O bank, but:
> - some pins may have optional special functions, and whether swapping
> is allowed depends on whether that function is selected
> - some pins may optionally be part of a differential pair that may only
> be swapped against another differential pair
> - some pins may have bootstrap configuration functions
> 
> 7. bank swap on FPGAs
> 
> - banks can be swapped if the used functions can be replicated on the
> other bank, and the bank's power supply is swapped at the same time
> - banks can optionally have a reference voltage input, which needs to
> be swapped as well (including its special function status)
> - banks that include special function pins (e.g. configuration) may
> have a fixed power supply requirement
> 
> 8. bank merge on FPGAs
> 
> - banks that have the same power supply and reference voltage (if used)
> can be merged, so pins can be exchanged between them

I highlight the FPGA options because this is something I deal with every day. I 
just handed a schematic over to our layout guy, and the design has a couple of 
high-speed octal DDR LVDS serial-out ADCs connected to an Altera Cyclone V 
part. The list of pin-swapping restrictions makes doing that very difficult. 
(You should hear the grumbling …) Some of the pin pairs are differential input 
only, some are differential output only, and you need to mind the I/O bank 
supply as well as the pre-driver supply, and there are banks which share the 
pre-driver supply, and so forth.

In order for the swapping to work, some sort of description language needs to 
be invented which can cover all of the oddball cases. At the very least, signal 
pairs need to be defined in some way (Altium uses a tag and requires the net 
names to be the same except for _P or _N suffix). 

And to further muddy the waters, I’m sure you’ve seen FPGA symbols with the I/O 
pins defined as bidirectional even though in actual designs the pins are either 
input or output. This implies requiring the designer to redefine the I/O pin 
type (input, output, bidirectional, open-drain, part of a differential pair) on 
the symbol in the schematic to match the use in the design.

And while we’re at it: consider a tool which can read a VHDL or Verilog 
top-level entity/module and look at its port list and modify those I/O types in 
the symbol automagically, and then if the FPGA pins are swapped in the PCB 
design, those changes could be back-annotated to the VHDL source and of course 
the constraint file.

If Kicad supported FPGA pin-swapping in some rational manner, a lot of people 
would love it just for that.

-a
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to