KiCad / kicad-library-utils

Some scripts for helping with library development
GNU General Public License v3.0
128 stars 95 forks source link

[WIP] Script generating symbols for Xilinx FPGA #293

Open ObKo opened 5 years ago

ObKo commented 5 years ago

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:

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:

herostrat commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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:

https://github.com/KiCad/kicad-symbols/issues/963 https://github.com/KiCad/kicad-symbols/issues/964 https://github.com/KiCad/kicad-symbols/issues/965 https://github.com/KiCad/kicad-symbols/issues/969

ObKo commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

Artix-7 packages are mergerd: https://github.com/KiCad/kicad-footprints/pull/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 commented 5 years ago

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

ObKo commented 5 years ago

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

This and https://github.com/KiCad/kicad-symbols/pull/1799 can be merged now.