Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| electronics:fpga:freebsd_xilinx [2010/01/16 13:58] – Add tables for images WojciechKoszek | electronics:fpga:freebsd_xilinx [2022/10/03 07:59] (current) – Remove name/email from opening, add HomePage link in intro KubilayKocak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Working with Xilinx FPGAs on FreeBSD ====== | ====== Working with Xilinx FPGAs on FreeBSD ====== | ||
| - | //Wojciech A. Koszek// \\ | ||
| - | '' | ||
| - | '' | ||
| This page documents steps necessary to get Xilinx ISE 11.1 | This page documents steps necessary to get Xilinx ISE 11.1 | ||
| - | IDE running on %%FreeBSD%% 9 system. Please contact | + | IDE running on %%FreeBSD%% 9 system. Please contact |
| if information found here didn't let you to get Xilinx FPGA | if information found here didn't let you to get Xilinx FPGA | ||
| toolkit working, are inappropriate or obsolete. | toolkit working, are inappropriate or obsolete. | ||
| + | |||
| + | Note that the newer Xilinx Vivado Design Suite uses Java, including the xsetup installer. | ||
| + | Unfortunately I ([[/ | ||
| ===== Introduction to free Xilinx ISE environment ===== | ===== Introduction to free Xilinx ISE environment ===== | ||
| - | ISE [[/WebPack|WebPack]] | + | ISE %%WebPack%% is a free variant of ISE Design Suite supporting |
| most popular FPGA chips manufactured by Xilinx. This version | most popular FPGA chips manufactured by Xilinx. This version | ||
| should be enough for you in most of the cases and its use will | should be enough for you in most of the cases and its use will | ||
| Line 74: | Line 74: | ||
| running next to me. Apart from X11 and %%ViM%%, nothing has been installed. | running next to me. Apart from X11 and %%ViM%%, nothing has been installed. | ||
| Installer and command-line utilities as well as " | Installer and command-line utilities as well as " | ||
| - | require couple of packages | + | require couple of ports installed: |
| + | |||
| + | < | ||
| + | (cd / | ||
| + | (cd / | ||
| + | (cd / | ||
| + | (cd / | ||
| + | (cd / | ||
| + | </ | ||
| + | |||
| + | After installation, | ||
| < | < | ||
| Line 86: | Line 96: | ||
| You can see full list of packages installed at a time of writing this tutorial here | You can see full list of packages installed at a time of writing this tutorial here | ||
| - | (while most of ports has been installed as a part of [[/ImageMagic|ImageMagic]] | + | (while most of ports has been installed as a part of %%ImageMagic%% installation, |
| that obtaining screenshots could be possible): | that obtaining screenshots could be possible): | ||
| Line 105: | Line 115: | ||
| ===== Obtaining Xilinx ISE environment ===== | ===== Obtaining Xilinx ISE environment ===== | ||
| - | In order to obtain Xilinx ISE [[/WebPack|WebPack]], you must visit this site: | + | In order to obtain Xilinx ISE %%WebPack%%, you must visit this site: |
| - | [[http:// | + | [[http:// |
| In order to proceed, one needs to have an account on the Xilinx | In order to proceed, one needs to have an account on the Xilinx | ||
| page. After successful account creation, you have to log in and | page. After successful account creation, you have to log in and | ||
| - | download | + | download |
| having '' | having '' | ||
| < | < | ||
| - | wkoszek@laptop:/ | + | wkoszek@laptop:/ |
| - | -rw-r--r-- | + | -rw-r--r-- |
| </ | </ | ||
| Line 127: | Line 137: | ||
| < | < | ||
| - | # md5 / | + | # md5 / |
| - | MD5 (/ | + | MD5 (/ |
| - | # sha1 / | + | # sha1 / |
| - | SHA1 (/ | + | SHA1 (/ |
| </ | </ | ||
| Line 144: | Line 154: | ||
| < | < | ||
| - | # tar xf Xilinx_11.1_WebPack_SFD.tar | + | # tar xf Xilinx_11.1_!WebPack_SFD.tar |
| - | # cd Xilinx_11.1_WebPack_SFD | + | # cd Xilinx_11.1_!WebPack_SFD |
| </ | </ | ||
| Line 169: | Line 179: | ||
| | {{electronics/ | | {{electronics/ | ||
| - | |||
| | {{electronics/ | | {{electronics/ | ||
| - | |||
| | {{electronics/ | | {{electronics/ | ||
| - | |||
| | {{electronics/ | | {{electronics/ | ||
| - | |||
| | {{electronics/ | | {{electronics/ | ||
| + | | {{electronics/ | ||
| - | | {{electronics/ | + | And basically, ISE installation should be ready. |
| - | As a result, you should have following message displayed at the end. | + | | On reference system..: \\ {{electronics/ |
| - | | {{electronics/fpga/freebsd_xilinx/12_success.jpg? | + | In order to let you to work with Xilinx command line tools, you can use preprepared |
| + | shell scripts '' | ||
| + | living in '' | ||
| + | to find the tools from: | ||
| - | And basically, ISE should be ready to start. This is the result of what | + | < |
| - | I see on my reference system: | + | set INSTALL_LOC="/ |
| + | </ | ||
| + | |||
| + | to | ||
| + | |||
| + | < | ||
| + | set INSTALL_LOC="/ | ||
| + | </ | ||
| + | |||
| + | I've put: | ||
| + | |||
| + | < | ||
| + | source / | ||
| + | </ | ||
| - | | {{electronics/fpga/ | + | Into my '' |
| ===== FPGA processor programming ===== | ===== FPGA processor programming ===== | ||
| Once you have software tools working it would be quite nice to | Once you have software tools working it would be quite nice to | ||
| - | see that you can actually upload something to your FPGA board and see | + | see that you can actually upload something to your FPGA board and have |
| - | that it actually works. | + | a proof that it actually works. |
| - | **A**. You're Spartan 3e Starter Kit (S3ESK) user | + | Due to the popularity of the FPGA development boards we can distinguish |
| + | two cases here: | ||
| + | |||
| + | **A**. You' | ||
| **B**. You're other FPGA board user | **B**. You're other FPGA board user | ||
| - | //B isn't documented here, because author doesn' | + | //B isn't documented here (yet), because author doesn' |
| Option A is quite comfortable, | Option A is quite comfortable, | ||
| - | of people has been dealing with it in UNIXish systems. | + | of people has been dealing with it in UNIXish systems. |
| - | has JTAG cable embedded in itself. It is based on Cypress FX2 chip (also known | + | a bitstream targeted against Spartan 3e500 (fg320 variant) and you stream |
| - | as EZ-USB). This is 8051 microcontroller dealing | + | it through the programming application, |
| - | It supports reenumeration -- processor implements special kind of protocol, | + | //Option B will be documented in the future// |
| - | letting a user to submit a code which is being used later to program | + | |
| - | Once it's finished, it detaches from USB bus and attaches back as a different, | + | |
| - | target device. Together with modularity, some problems exist. You have to | + | |
| - | have a software dealing with reenumeration. In order to save you some time, here is a brief background behind tools: | + | |
| - | * Xilinx ISE brings native '' | + | Anyway, in order to start programming, |
| + | cable.. | ||
| - | * before | + | ==== Xilinx |
| - | * Probably first tool to program S3ESK out-of-IDE was http://www.rogerstech.force9.co.uk/ | + | Xilinx based its programming functionality on FX2 chip (also known as EZ-USB), |
| + | nowadays made by Cypress. This chip is a 8051 microcontroller with USB support. | ||
| + | It supports reenumeration -- processor implements special kind of | ||
| + | protocol that lets a user to submit '51 machine code which is being used to | ||
| + | to program microcontroller. Once done, it detaches from the USB bus and | ||
| + | attaches back as a different, ' | ||
| + | some problems exist. You have to have a software for uploading firmware | ||
| + | to the chip. | ||
| - | * Andrew Rogers' | + | I brought a support for '' |
| + | Testing confirmed that I can program it on GNU/Linux and %%FreeBSD%% after | ||
| + | my changes. Here's a Git command that will let you to synchronize with | ||
| + | a code: | ||
| - | * Newest '' | + | < |
| - | * There exists '' | + | git clone http://freebsd.czest.pl/~wkoszek/ |
| - | * There' | + | </code> |
| - | ==== Ideas ==== | + | You must have '' |
| + | forward: | ||
| - | * take information on the page '' | + | < |
| - | TCP/IP enabled wrapper library for Linux; copy it on %%FreeBSD%% and implement %%FreeBSD%%-based | + | gmake |
| - | '' | + | </code> |
| - | This will result | + | It should compile cleanly on %%FreeBSD%% 8/9. Mail me otherwise. |
| + | Once you have '' | ||
| + | correct firmware. File: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Has enough information for particular cases. You simply look at '' | ||
| + | output: | ||
| + | |||
| + | < | ||
| + | wkoszek@laptop:/ | ||
| + | ugen0.1: <OHCI root HUB nVidia> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON | ||
| + | ugen1.1: <EHCI root HUB nVidia> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON | ||
| + | ugen1.2: <USB2.0 Syntek> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON | ||
| + | ugen0.2: <Optical USB Mouse Logitech> | ||
| + | ugen1.3: <product 0x000d vendor 0x03fd> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON | ||
| + | </ | ||
| + | |||
| + | As you see, the last line has something | ||
| + | '' | ||
| + | |||
| + | < | ||
| + | BUS==" | ||
| + | </ | ||
| + | |||
| + | Finally, we craft a set of command line options: | ||
| + | |||
| + | < | ||
| + | ./fxload -v -t fx2 -I / | ||
| + | </ | ||
| + | |||
| + | After successful programming, | ||
| + | different device should reappear as: | ||
| + | |||
| + | < | ||
| + | ugen1.3: <XILINX XILINX> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON | ||
| + | </ | ||
| + | |||
| + | If you want to check '' | ||
| + | yet, you have sample firmware for Spartan 3e Starter Kit here: | ||
| + | |||
| + | < | ||
| + | http:// | ||
| + | </ | ||
| + | |||
| + | Green LED should blink first and get permanently turned on after | ||
| + | that. If something else happens, mail me. LED is basically a sign | ||
| + | of correct programming. | ||
| + | |||
| + | ==== Programming from Impact (2010-02-x, WIP: skip for now, please) ==== | ||
| + | |||
| + | Starting from 9.2i Alpha release, Xilinx ISE brings native userspace, | ||
| + | libusb-based driver for their cables. | ||
| + | |||
| + | //it has been proven to be possible to get it to work in %%FreeBSD%% 9-CURRENT. We simply compile our '' | ||
| + | |||
| + | | {{electronics/ | ||
| + | |||
| + | //note about finding out a firmware for FX2 programmer// | ||
| + | //note about searching through the udev configuration to see which file is the right one// | ||
| + | |||
| + | **So basically -- not yet.** | ||
| + | |||
| + | Before Xilinx started to ship , where was a kernel driver that never worked for anyone, until a reverse engineered driver for GNU/Linux for '' | ||
| + | //for people with parallel cables// | ||
| + | |||
| + | ==== Programming without proprietary tools ==== | ||
| + | |||
| + | Number of " | ||
| + | some time, I enlist tools known to me with functionality provided | ||
| + | by them: | ||
| + | |||
| + | * [1] Probably first tool to program S3ESK out-of-IDE was: http:// | ||
| + | |||
| + | * [2] Andrew Rogers' | ||
| + | |||
| + | * [3] Above projects has been consolidated into one big program by Uwe Bonnes. The project is hosted on %%SourceForge%%: | ||
| + | |||
| + | **WARNING: as you see, name " | ||
| + | **refers to the [3] project by Uwe Bonnes. The other two aren't supported, as I believe no further** | ||
| + | **development happens there.** | ||
| + | |||
| + | So, in order to have '' | ||
| + | Subversion: | ||
| + | |||
| + | < | ||
| + | svn co https:// | ||
| + | </ | ||
| + | |||
| + | And build it: | ||
| + | |||
| + | < | ||
| + | cd xc3sprog/ | ||
| + | mkdir build ; cd build ; cmake .. ; gmake | ||
| + | </ | ||
| + | |||
| + | === Quick start with xc3sprog === | ||
| + | |||
| + | Default behavior of '' | ||
| + | and perform JTAG scan. | ||
| + | |||
| + | **Report to Uwe that it's actually wrong nowadays** | ||
| + | |||
| + | Anyway, for Xilinx cables, you can do a JTAG boundary scan | ||
| + | with: | ||
| + | |||
| + | < | ||
| + | ./xc3sprog -c xpc | ||
| + | </ | ||
| + | |||
| + | Programming: | ||
| + | |||
| + | < | ||
| + | ./xc3sprog -c xpc < | ||
| + | </ | ||
| + | |||
| + | For those without Xilinx ISE yet, but willing to test whether everything | ||
| + | works, I have provided sample bitstream for Spartan 3E Starter Kit implementing | ||
| + | LED ruler | ||
| + | |||
| + | < | ||
| + | http:// | ||
| + | </ | ||
| + | |||
| + | Checksums, just in case: | ||
| + | |||
| + | * MD5: 1b58146048ede072c9bca9815587974f | ||
| + | * SHA1: c675f524ade7bc729772b4850274a10192f95b23 | ||
| + | |||
| + | Let me know if something doesn' | ||
| + | to explicitly agree to put your name in a " | ||
| + | |||
| + | ==== Success stories ==== | ||
| + | |||
| + | Programmers: | ||
| + | |||
| + | * PCIII -- parallel cable III | ||
| + | * XUSB_EMB -- Startan 3E Starter Kit embedded USB JTAG cable | ||
| + | |||
| + | ^ Board ^ Cable ^ Program ^ Command line ^ Contributor ^ Additional notes ^ | ||
| + | | [[http:// | ||
| + | | S3ESK | XUSB_EMB | [[http:// | ||
| + | |||
| + | ===== Before publishing announcement ===== | ||
| + | |||
| + | * bring fxload to mainstream development branch | ||
| + | * prepare a port | ||
| + | * check if ezload provides some more functionality for FX2 | ||
| + | * '' | ||
| + | * mark " | ||
| + | * prepare command line options for ise | ||
| + | * prepare tar.gzs for cross-checking | ||
| + | * prepare scripts | ||
| + | * prepare PROM programming example | ||
| + | |||
| + | ==== Ideas ==== | ||
| + | |||
| + | * Explore possibilities of %%CableServer%% | ||
| ---- | ---- | ||
| Line 237: | Line 430: | ||
| Script for Wiki link generation {{electronics/ | Script for Wiki link generation {{electronics/ | ||
| Script for thumbnail generation {{electronics/ | Script for thumbnail generation {{electronics/ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | {{tag> | ||