electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

Programming Digilent Nexys 2 from Linux


Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design -> Programming Digilent Nexys 2 from Linux
Author Message
AndyR71



Joined: 25 Mar 2009
Posts: 2


Post31 Mar 2009 0:45   

digilent linux


I recently bought a Digilent Nexys 2 board, and after a few days of research got to the point where I can successfully program it over USB from a Linux host without the use of a separate (and expensive!) JTAG interface. Google told me even before I purchased the board that this is a very common requirement; it seems that I'm not the only one interested in linux-hosted FPGA development. The pieces to make this work were all there, happily (see the README in the download below for details -- the chain of responsibility here is long); it just took work to assemble them correctly.

For those interested, I wrote a quick perl script to automate the process, available at: http://plausible.org/andy/nexys2prog.tar.gz

This wraps the multi-step mess (device detection/configuration, SVF generation, and JTAG download) as fully as possible, most importantly by doing the USB bus enumeration and dynamically reprogramming the Nexys 2 with a patched usb_jtag firmware blob in the script itself. The user just specifies the Xilinx bitstream file as the sole argument.

Installation is as simple as I could make it, requiring only Xilinx ISE, two binary packages (fxload and libftdi -- both available via apt-get on Ubuntu Intrepid) and one source install (UrJTAG -- just a simple "./configure;make;make install" will do).

Hopefully this will help other newbies with the learning curve. Let me know if something doesn't work, or if there are questions.
Back to top
kel8157



Joined: 14 Nov 2007
Posts: 84
Helped: 2


Post31 Mar 2009 5:14   

nexys2 linux


What happened? I remember the datasheet says user can program the FPGA/PROM via the Windows platform through the USB port on the board using Digilent's software? Does it work? Does the script you programmed do the same thing in Linux as Digilent software in Windows?
Back to top
Google
AdSense
Google Adsense




Post31 Mar 2009 5:14   

Ads




Back to top
AndyR71



Joined: 25 Mar 2009
Posts: 2


Post31 Mar 2009 16:26   

nexys 2 linux


kel8157 wrote:
[...] the datasheet says user can program the FPGA/PROM via the Windows platform [...] Does the script [...] do the same thing in Linux


Not exactly. It's complicated; you need to download custom firmware to the FX2 chip on the board that makes it act like another kind of USB/JTAG cable. My script is only the "integration" work; the original firmware and patches are available elsewhere, but the process is very complicated (borderline insane, actually). As I mentioned, I tried to document all the people's work I'm relying on in the README.

And yes, I'm sure the Digilent software works when run in windows, but I haven't tried it. The screenshots look just awful, frankly. GUIs can't be automated.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design -> Programming Digilent Nexys 2 from Linux
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
work on linux from winxp by connecting to linux system (5)
Linux programming (6)
C-linux programming (7)
pic programming in linux (2)
how to do C/C++ programming in Linux (13)
Beginning Linux Programming (2)
programming avr microcontroller in linux (2)
Digilent FPGA board (12)
ARM Linux Programming for Beginner (5)
Linux kernel module programming error (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS