Nexys from Digilent... aka, binge hacking

Recently I ordered a Nexys Spartan3-1000 / Cypress FX2 USB board from Digilent for work. It's been fun and I may well buy one personally, but like aways there are the suprises, the silly mistakes, and the 3 am still-doesn't-work-yets.

First impression is consistent with what I saw on the web site - it's a nifty little board. The stock version has a smaller FPGA, but the S3-1000 is only $20 more (of course that meant I spent all night downloading a new Webpack)

The new high density I/O connector finally has enough grounds (though confusingly the connector family is referred to as fx2 - not to be confused with the usb chip!)

The mini-USB jack broke off the board within the first hour, and on examination is seems that the metal shield tabs never really soldered to the board. Not too hard to fix, though it took a ton of heat to get it soldered down, and even then it is more the solder I added to the board "encapsulating" the lugs than wetting them.

It turns out the USB chip only has the 8 bits of port B connected to the FPGA, so FIFO transfers will have to be 8 bit. Probably not a problem, but one could wish for 16 bit.

The other 8 bits include the JTAG signals, some control bits, and some unused bits. Digilent's Adept software can download .bit files using these. I was also able to program the board using an old digilent budget parallel cable from an s3kit.

The expansion boards that plug in are spacious and worth getting more than one of. Unfortunately, plutting them in killed the jtag. Seeing the jtag is extended onto the expansion board I suspected long trace lengths and - it being Firday afternoon - simply chiseled them at the connector. That worked (wondering why there were 5 traces instead of

4) but turned out to be silly - turns out that plugging in the expansion board over-rides (via the 5th trace) a resistor controlling a gate shunting the expansion connector in other words, with the expansion connector plugged in, the jtag needs to have a shunt on the expansion board. Oh well, I can fix the expansion cards easily enough in the unlikely event I ever need JTAG out there.

I then embarked on a hacking binge trying to download Cypress firmware and/or program the FPGA by using libusb on windows. 24 hours later, both work, via modified versions of the XUP & XC3SProg projects.

Some discoveries:

- at least under windows, must call usb_set_configuration() before usb_claim_interface(), had to modify the programs accordingly

- for some reason, even building with MinGW g++ I get a reliance on cygwin1.dll

- Digilent put a VID/PID eeprom on the board. Can modify the software to look for that VID/PID, or I finally just chiseled the trace across JP2 and am back to talking to cypress default VID/PID. I plan to install the jumper pins so I can quickly switch between compatability with the Digilent ADEPT software vs. homegrown efforts, and leverage the difference in identity to avoid any conflicts in having both digilent and libusb drivers installed on the computer.

- I modified XUP and it's X3SProg ioxusb.cpp to use the Nexys jtag pin assignments to port PD instead of those of the s3ekit or usb programming cable it was written for.

- PD6 controls a gate which puts the USB chip in the JTAG path.

- PD7 controls the voltage regulator for the rest of the board. HOWEVER, the FPGA will run (via the protection diodes I assume) off the JTAG signals if you leave them driven with this shut down. I added a new command (0xff) to the xup firmware interface that tristates all of the jtag signals when configuration is done to avoid this. This also re-enables the jtag header on the board for other programming methods.

My hacked up xup and XC3Sprog are a bit messy right now, but I may see about trying to contribute at least a description of the changes back to their authors.

Of course I'm still not doing anything _useful_ with the board... but that may wait for Monday.

Reply to
cs_posting
Loading thread data ...

Hi,

I have one of these with the S3-1000 aswell as the FX2 breadboard. Great little board.

If you hadn't noticed, Digilent updated their MemUtil to V2.2. in the last few days. Now handles the flash roms on the Nexys board.

Cheers, Red

.......

Reply to
RedskullDC

Wow, your chisel gets a workout. I have a Nexys-1000 which seems to program correctly with an FX2 expansion board plugged in (using the Digilent software with the onboard USB JTAG) - did you have JTAG problems with the parallel cable or the onboard programmer (or both)?

Your custom firmware and > Recently I ordered a Nexys Spartan3-1000 / Cypress FX2 USB board from

Reply to
S Matthews

This was with the parallel cable that came with the old spartan 3 kit. IFIRC looking at the schematics that there's a gate which opens when the expansion board is plugged in, meaning you need to jumper it's tdi-tdo, which i didn't have set. Yes, chiselling it was stupid, but I'm unlikely to use the jtag out there anyway.

Not yet, will have to look back over what I did, how much is necessary and how much was just stuff that got put in there during debugging. I don't have a place to put it right now, considered contributing it back, but as that's a linux-oriented project I'm not sure how much they will like the windows compatability insertions (not that those should break the linux build - it seems more like linux libusb tolerating the violation of some this-before-that requirements which the windows version enforced). I'd also like to get it faster... mean to put a scope on it as see if I can figure out if the bottleneck is the USB proxifying of XC3Sprog, or the actual clock rate of the jtag output.

Let me try to sort out some of what was important, and what was fluff.

Reply to
cs_posting

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.