]>
Commit | Line | Data |
---|---|---|
e7185c69 IS |
1 | ============================================================================== |
2 | Linux Driver Source for Xilinx FPGA firmware download | |
3 | ============================================================================== | |
4 | ||
5 | ||
6 | TABLE OF CONTENTS. | |
7 | ||
8 | 1. SUMMARY | |
9 | 2. BACKGROUND | |
10 | 3. DESIGN | |
11 | 4. HOW TO USE | |
12 | 5. REFERENCE | |
13 | ||
14 | 1. SUMMARY | |
15 | ||
16 | - Download Xilinx FPGA firmware | |
17 | - This module downloads Xilinx FPGA firmware using gpio pins. | |
18 | ||
19 | 2. BACKGROUND | |
20 | ||
21 | An FPGA (Field Programmable Gate Array) is a programmable hardware that is | |
22 | used in various applications. Hardware design needs to programmed through | |
23 | a dedicated device or CPU assisted way (serial or parallel). | |
24 | This driver provides a way to download FPGA firmware. | |
25 | ||
26 | 3. DESIGN | |
27 | ||
05fd349b | 28 | - load Xilinx FPGA bitstream format[1] firmware image file using |
e7185c69 IS |
29 | kernel firmware framework, request_firmware() |
30 | - program the Xilinx FPGA using SelectMAP (parallel) mode [2] | |
31 | - FPGA prgram is done by gpio based bit-banging, as an example | |
32 | - platform independent file: gs_fpgaboot.c | |
33 | - platform dependent file: io.c | |
e7185c69 IS |
34 | |
35 | 4. HOW TO USE | |
36 | ||
37 | $ insmod gs_fpga.ko file="xlinx_fpga_top_bitstream.bit" | |
38 | $ rmmod gs_fpga | |
39 | ||
40 | 5. USE CASE (from a mailing list discussion with Greg) | |
41 | ||
42 | a. As a FPGA development support tool, | |
43 | During FPGA firmware development, you need to download a new FPGA | |
44 | image frequently. | |
45 | You would do that with a dedicated JTAG, which usually a limited | |
46 | resource in the lab. | |
47 | However, if you use my driver, you don't have to have a dedicated JTAG. | |
48 | This is a real gain :) | |
49 | ||
50 | b. For the FPGA that runs without config after the download, which | |
51 | doesn't talk to any of Linux interfaces (such as PCIE). | |
52 | ||
53 | We download FPGA firmware from user triggered or some other way, and that's it. | |
54 | Since that FPGA runs on its own, it doesn't require a linux driver | |
55 | after the download. | |
56 | ||
57 | c. For the FPGA that requires config after the download, which talk to | |
58 | any of linux interfaces (such as PCIE) | |
59 | ||
60 | Then, this type of FPGA config can be put into device tree and have a | |
61 | separate driver (pcie or others), then THAT driver calls my driver to | |
62 | download FPGA firmware during the Linux boot, the take over the device | |
63 | through the interface. | |
64 | ||
65 | 6. REFERENCE | |
66 | ||
67 | 1. Xilinx APP NOTE XAPP583: | |
68 | http://www.xilinx.com/support/documentation/application_notes/xapp583-fpga-configuration.pdf | |
69 | 2. bitstream file info: | |
70 | http://home.earthlink.net/~davesullins/software/bitinfo.html |