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/02/05 23:41] – Bring some updates and add one successful contributor 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 181: | Line 191: | ||
| In order to let you to work with Xilinx command line tools, you can use preprepared | In order to let you to work with Xilinx command line tools, you can use preprepared | ||
| shell scripts '' | shell scripts '' | ||
| - | living in '' | + | living in '' |
| + | to find the tools from: | ||
| + | |||
| + | < | ||
| + | set INSTALL_LOC="/ | ||
| + | </ | ||
| + | |||
| + | to | ||
| + | |||
| + | < | ||
| + | set INSTALL_LOC="/ | ||
| + | </ | ||
| + | |||
| + | I've put: | ||
| < | < | ||
| Line 208: | Line 231: | ||
| a bitstream targeted against Spartan 3e500 (fg320 variant) and you stream | a bitstream targeted against Spartan 3e500 (fg320 variant) and you stream | ||
| it through the programming application, | it through the programming application, | ||
| - | |||
| //Option B will be documented in the future// | //Option B will be documented in the future// | ||
| - | ==== Programming | + | Anyway, in order to start programming, |
| + | cable.. | ||
| + | |||
| + | ==== Xilinx | ||
| Xilinx based its programming functionality on FX2 chip (also known as EZ-USB), | Xilinx based its programming functionality on FX2 chip (also known as EZ-USB), | ||
| Line 219: | Line 244: | ||
| to program microcontroller. Once done, it detaches from the USB bus and | to program microcontroller. Once done, it detaches from the USB bus and | ||
| attaches back as a different, ' | attaches back as a different, ' | ||
| - | some problems exist. You have to have a software | + | some problems exist. You have to have a software |
| + | to the chip. | ||
| - | Even though BSD native tools existed ('' | + | I brought a support for '' |
| - | "New USB" convertion. However, there exists | + | Testing confirmed that I can program it on GNU/Linux and %%FreeBSD%% after |
| - | deploys | + | my changes. Here's a Git command that will let you to synchronize with |
| - | changed and compiled without problems on %%FreeBSD%%. **commit to ports/...** | + | a code: |
| + | |||
| + | < | ||
| + | |||
| + | git clone http:// | ||
| + | |||
| + | </ | ||
| + | |||
| + | You must have '' | ||
| + | forward: | ||
| + | |||
| + | < | ||
| + | gmake | ||
| + | </ | ||
| + | |||
| + | 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:/compat/linux/ | ||
| + | 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 in common with following line from | ||
| + | '' | ||
| + | |||
| + | < | ||
| + | BUS==" | ||
| + | </code> | ||
| + | |||
| + | 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 | ||
| + | </ | ||
| - | Once you have '' | + | If you want to check '' |
| - | a correct function. It can be done with: | + | yet, you have sample firmware for Spartan 3e Starter Kit here: |
| < | < | ||
| - | .....command.... <file.hex> | + | http:// |
| </ | </ | ||
| - | '' | + | Green LED should blink first and get permanently turned |
| - | you'll have to pick the firmware provided by Xilinx. For non-proprietary | + | that. If something else happens, mail me. LED is basically a sign |
| - | programming | + | of correct |
| - | as well. | + | |
| - | ==== Programming from Impact ==== | + | ==== Programming from Impact |
| Starting from 9.2i Alpha release, Xilinx ISE brings native userspace, | Starting from 9.2i Alpha release, Xilinx ISE brings native userspace, | ||
| Line 265: | Line 343: | ||
| * [2] Andrew Rogers' | * [2] Andrew Rogers' | ||
| - | * [3] Above projects has been consolidated into one big program by Uwe Bonnes. The project is hosted on [[/SourceForge|SourceForge]]: http:// | + | * [3] Above projects has been consolidated into one big program by Uwe Bonnes. The project is hosted on %%SourceForge%%: http:// |
| + | |||
| + | **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 ==== | ==== Success stories ==== | ||
| + | |||
| Programmers: | Programmers: | ||
| + | |||
| * PCIII -- parallel cable III | * PCIII -- parallel cable III | ||
| + | * XUSB_EMB -- Startan 3E Starter Kit embedded USB JTAG cable | ||
| ^ Board ^ Cable ^ Program ^ Command line ^ Contributor ^ Additional notes ^ | ^ Board ^ Cable ^ Program ^ Command line ^ Contributor ^ Additional notes ^ | ||
| | [[http:// | | [[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 ==== | ==== Ideas ==== | ||
| - | * Explore possibilities of [[/CableServer|CableServer]] | + | * Explore possibilities of %%CableServer%% |
| ---- | ---- | ||
| Line 282: | 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> | ||