Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

[WIP] Script generating symbols for Xilinx FPGA #293

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

ObKo
Copy link
Contributor

@ObKo ObKo commented Apr 26, 2019

Intro

Xilinx has CSV files describing FPGA pinout (https://www.xilinx.com/support/package-pinout-files.html). This scripts generates symbols from those files, similar to current STM32 generator.

Some background:

  • Xilinx FPGA pins are divided into banks
  • Each bank can be powered separately (from 1.2V to 3.3V)
  • Most of pins are general purpose and bidirectional
  • There are some dedicated pins (like reset, JTAG, config clk, etc). All of them are placed into bank 0
  • Each FPGA has at least 3 power rails - VCCINT, VCCAUX, VCCBRAM each comes from several pins.
  • There is always huge amount of GND pins.
  • Total number of I/O pins >100

This scripts generates multi-unit kicad symbol, each KiCAD unit = FPGA Bank

Example

Here you can see generated symbol for xc7s6 FPGA in ftgb196 package:

Screenshot_20190426_154740

Bank 0 is on top and contains all dedicated pins and common power rails. Other two units - Bank 14 and Bank 34 with 50 I/O and power.

Current progress:

  • CSV parsing and pin extraction (checked for Spartan-7 family).
  • Pin grouping by banks and function
  • Symbol generation and pin layout
  • Electrical types
  • VCC* and GND pin stacking
  • Footprint generation - should be synced to current PRs in KiCAD libraries: [WIP] Xilinix BGA footprints kicad-footprints#1560
  • Adopt for families other than Spartan-7

@herostrat
Copy link
Collaborator

Man this is awesome.
As you correctly saw I try to add all BGA footprints to the library.
I worked with the existing Xilinix symbols in the past and was just about to start figuring out how they were generated and update it with the Spartan-7, as only Spartan-6 were already in the lib.

@evanshultz
Copy link
Collaborator

I'm not that familiar with the symbol generator, but just looking at the symbol above I don't have any reservations. This looks like an incredible contribution!

ObKo and others added 4 commits April 28, 2019 10:51
Some small fixes.
Minor layout improvements.
Support for Kintex-7 and Virtex-7.
@ObKo
Copy link
Contributor Author

ObKo commented Apr 29, 2019

Now that script supports all 7-series FPGA (Spartan-7, Artix-7, Zynq-7000, Kintex-7, Virtex-7).

Resulting libraries can be found in my repo

I'll open PR for symbols after footprints will be done.

@herostrat
Copy link
Collaborator

herostrat commented Apr 29, 2019

Please note that I am no maintainer, so what I suggest might not be the final word.

The naming convention for the footprints will be the official Xilinx name and not a generic descriptive one.
Meaning the string in the footprint filter should not be e.g.:
BGA32415.0x15.0mmLayout18x18P0.8mm*
But instead CSG324

If you want to keep the generic description you can add two filters?

Otherwise what is the plan for the already in place symbols, as they are different in form and connectivity and are not downwards compatible?


Just to keep track, if those symbols are pulled and replace the 7-Series versions, the following issues should also be resolved:

KiCad/kicad-symbols#963
KiCad/kicad-symbols#964
KiCad/kicad-symbols#965
KiCad/kicad-symbols#969

@ObKo
Copy link
Contributor Author

ObKo commented Apr 29, 2019

The naming convention for the footprints will be the official Xilinx name and not a generic descriptive one.
Meaning the string in the footprint filter should not be e.g.:
BGA32415.0x15.0mmLayout18x18P0.8mm*
But instead CSG324

I'm waiting for your PR get merged, so I can use names which will be in footprint library. IMO, it's better to use Xilinx name and add additional common filter.

However, it seems that Xilinx uses different package names for same(?) footprints. For example, there is CSG324 for Artix-7 and CSGA324 for Spartan-7. I can't see any difference in drawings except wider tolerance in thickness for Spartan-7. Moreover, there is some nonsense packages with "+1" numbering like CSG325 which is CSG324 "with transceivers"

I have no idea how to how to handle this without library bloating...

@evanshultz
Copy link
Collaborator

@ObKo
Because there are so many things that could vary, let's only allow Xilinx-specific footprints. So use a single footprint filter like Xilinx*CPG238. The footprints are duplicated for the +1 issue so you can specify the footprint listed for each particular Xilinx part.

If the thickness varies we should have unique footprints. @herostrat and I were discussing that in the first footprint PR but let's go ahead and make that a rule since the 3D model (which contains the height) and the footprints are mapped 1:1.

Does that answer everything?

@herostrat
Copy link
Collaborator

Artix-7 packages are mergerd: KiCad/kicad-footprints#1557


@ObKo you are right in the that regard that the footprint is identical for e.g. FGG484 and FGGA484
The reason we choose to split them into individual footprints is, that they have different 3D models.
If we someday include/generate/merge the 3D models or someone uses the official ones from Xilinx privately there is no sensible way to add them correctly.

CSG325 and CSG324, CPG236 and CPG238, ... have the same footprint and same 3d model but to minimize confusion for designer I choose to add them, as there are not that many instances of dublication.

@ObKo
Copy link
Contributor Author

ObKo commented Apr 30, 2019

I've changed footprints and filters according to convention suggested by @herostrat and @evanshultz

@ObKo
Copy link
Contributor Author

ObKo commented May 15, 2019

I've just regenerated libraries with new footprints - script successfully found correct footprints for all parts!

This and KiCad/kicad-symbols#1799 can be merged now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants