Based on kernel version 4.3. Page generated on 2015-11-02 12:49 EST.
1 2 FMC (FPGA Mezzanine Card) is the standard we use for our I/O devices, 3 in the context of White Rabbit and related hardware. 4 5 In our I/O environments we need to write drivers for each mezzanine 6 card, and such drivers must work regardless of the carrier being used. 7 To achieve this, we abstract the FMC interface. 8 9 We have a carrier for PCI-E called SPEC and one for VME called SVEC, 10 but more are planned. Also, we support stand-alone devices (usually 11 plugged on a SPEC card), controlled through Etherbone, developed by GSI. 12 13 Code and documentation for the FMC bus was born as part of the spec-sw 14 project, but now it lives in its own project. Other projects, i.e. 15 software support for the various carriers, should include this as a 16 submodule. 17 18 The most up to date version of code and documentation is always 19 available from the repository you can clone from: 20 21 git://ohwr.org/fmc-projects/fmc-bus.git (read-only) 22 firstname.lastname@example.org:fmc-projects/fmc-bus.git (read-write for developers) 23 24 Selected versions of the documentation, as well as complete tar 25 archives for selected revisions are placed to the Files section of the 26 project: `http://www.ohwr.org/projects/fmc-bus/files' 27 28 29 What is FMC 30 *********** 31 32 FMC, as said, stands for "FPGA Mezzanine Card". It is a standard 33 developed by the VME consortium called VITA (VMEbus International Trade 34 Association and ratified by ANSI, the American National Standard 35 Institute. The official documentation is called "ANSI-VITA 57.1". 36 37 The FMC card is an almost square PCB, around 70x75 millimeters, that is 38 called mezzanine in this document. It usually lives plugged into 39 another PCB for power supply and control; such bigger circuit board is 40 called carrier from now on, and a single carrier may host more than one 41 mezzanine. 42 43 In the typical application the mezzanine is mostly analog while the 44 carrier is mostly digital, and hosts an FPGA that must be configured to 45 match the specific mezzanine and the desired application. Thus, you may 46 need to load different FPGA images to drive different instances of the 47 same mezzanine. 48 49 FMC, as such, is not a bus in the usual meaning of the term, because 50 most carriers have only one connector, and carriers with several 51 connectors have completely separate electrical connections to them. 52 This package, however, implements a bus as a software abstraction. 53 54 55 What is SDB 56 *********** 57 58 SDB (Self Describing Bus) is a set of data structures that we use for 59 enumerating the internal structure of an FPGA image. We also use it as 60 a filesystem inside the FMC EEPROM. 61 62 SDB is not mandatory for use of this FMC kernel bus, but if you have SDB 63 this package can make good use of it. SDB itself is developed in the 64 fpga-config-space OHWR project. The link to the repository is 65 `git://ohwr.org/hdl-core-lib/fpga-config-space.git' and what is used in 66 this project lives in the sdbfs subdirectory in there. 67 68 SDB support for FMC is described in *note FMC Identification:: and 69 *note SDB Support:: 70 71 72 SDB Support 73 *********** 74 75 The fmc.ko bus driver exports a few functions to help drivers taking 76 advantage of the SDB information that may be present in your own FPGA 77 memory image. 78 79 The module exports the following functions, in the special header 80 <linux/fmc-sdb.h>. The linux/ prefix in the name is there because we 81 plan to submit it upstream in the future, and don't want to force 82 changes on our drivers if that happens. 83 84 int fmc_scan_sdb_tree(struct fmc_device *fmc, unsigned long address); 85 void fmc_show_sdb_tree(struct fmc_device *fmc); 86 signed long fmc_find_sdb_device(struct sdb_array *tree, uint64_t vendor, 87 uint32_t device, unsigned long *sz); 88 int fmc_free_sdb_tree(struct fmc_device *fmc);