6502.org
http://forum.6502.org/

HOWTO: Programming Nexys2 boards from Linux
http://forum.6502.org/viewtopic.php?f=10&t=1736
Page 1 of 1

Author:  kc5tja [ Sun Jan 09, 2011 7:46 am ]
Post subject:  HOWTO: Programming Nexys2 boards from Linux

Formerly titled: NEXYS2 surprise for Linux users... Changed on request.

Well, this is quite the surprise.

Of all the things I expected to fail outright on Linux, I thought for sure Xilinx's tools would be it.

Nope. To my utter surprise, Xilinx tools all seems to work as expected (except for PlanAhead, which is a total piece of shite. One should use it as little as possible, and just edit the UCF files by hand in a plain-vanilla text editor instead).

Turns out, it's Digilent's tools which seem to not work under Linux. Besides the dependency on libusb-1.0 and custom udev rules (editing udev's configuration always puts the fear of god in me; WAY too many Linux boxes have been rendered utterly unusable by udev configuration syntax sensitivities), it turns out that Adept provides a GUI only for Windows; the Linux version comes only as a command-line tool, and with absolutely no documentation what-so-ever.

As I write this, I'm still trying to figure this stuff out. Google is of little help.

Author:  kc5tja [ Sun Jan 09, 2011 8:12 am ]
Post subject: 

OK, I think I figured it out. The operating sequence is:

1) Create your bit file from Xilinx ISE as you would normally.
2) Open a shell window to your project's directory containing the bit file.
3) Execute the following, in order:
Code:
] sudo djtgcfg enum
    -- on my system, the FPGA board will have the "user name" of "Nexys2"

] sudo djtgcfg init -d Nexys2
    -- on my system, the FPGA is at JTAG index 0, and the flash for it on index 1.

] sudo djtgcfg prog -d Nexys2 -i 0 -f toplevel.bit
    -- If the board is set for JTAG clocking, this will program the FPGA immediately, without affecting the flash.  This is a great way to try out changes to your design without overwriting a known-good flash configuration.  Useful for public demos!


Well now, that was easier than I expected. Digilent could have saved me three hours of Google research if they'd just written this up in a text file somewhere.

Knowing this, I can now confirm unequivocally that the Nexys2 does in fact work quite well with Linux!

Author:  BigEd [ Sun Jan 09, 2011 8:29 am ]
Post subject: 

That's great - so, you can download a bitstream which is persistent until the next powercycle, and you can also save a bitstream which will persist until the next time you program the device?

Author:  kc5tja [ Sun Jan 09, 2011 7:02 pm ]
Post subject: 

Yes!

I like this feature, of course, because it saves write cycles to the flash. Which, of course, is hard-soldered to the board in a stupifyingly small pin pitch.

Author:  kc5tja [ Sun Nov 20, 2011 11:07 pm ]
Post subject: 

If, upon synthesizing and programming a core, you realize that it doesn't work but simulation says it should, odds are likely you're synthesizing to a design that violates hardware timing constraints.

You'll want to read the following series of blog articles to refresh yourself on how to explicitly specify these constraints.

Part 1 -- http://forums.xilinx.com/t5/PLD-Blog/Ti ... ba-p/57594

Part 2 -- http://forums.xilinx.com/t5/PLD-Blog/Ti ... ba-p/59595

Part 3 -- http://forums.xilinx.com/t5/PLD-Blog/Ti ... ba-p/61885

Part 4 -- http://forums.xilinx.com/t5/PLD-Blog/Ti ... ba-p/66696

Part 5 -- http://forums.xilinx.com/t5/PLD-Blog/Ti ... ba-p/69044

Author:  billium [ Thu Jan 12, 2012 6:53 pm ]
Post subject: 

Hello kc5tja

Thanks for your info, found you on Google. Created account just to thank you.

It is strange they go to the trouble of writing the prog .. then absolutely no help!!

I programmed 6502 along time ago, had no idea anybody would have interest in it now. I do repair industrial equipment that has a dual 6502 motherboard!

:)

Author:  Dr Jefyll [ Thu Jan 12, 2012 8:39 pm ]
Post subject: 

billium wrote:
I programmed 6502 along time ago, had no idea anybody would have interest in it now. I do repair industrial equipment that has a dual 6502 motherboard!

Welcome to the forum, billium. :)

I bet I'm not the only one whose curiosity you've aroused. Where are you located? What's your interest in programmable logic? And, most of all, what sort of industrial equipment uses a dual 6502 motherboard ??! If you have time and are comfortable doing so, feel free to fill us in (either here or more formally in the Introduce Yourself topic under General Discussions).

regards,

Jeff

Author:  GARTHWILSON [ Thu Jan 12, 2012 9:31 pm ]
Post subject: 

Quote:
had no idea anybody would have interest in it now.

Hi billium, 6502's are going into products at a rate of hundreds of millions of units per year now, but they're all the processor core in custom controller ICs and the customer doesn't even know they own a 6502. Western Design Center makes most of their money licensing 6502 IP, not selling hardware. One of their client companies is running it over 200MHz. It is definitely not dead.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/