05-25-2011 05:01 PM
The device /product which I am designing with Spartan 6 FPGA is powered from USB cable connected to a HOST PC.
Is it possible to directly load the FPGA configuration thru USB interface via some 8051 microcontroller or equivalent (e.g.. Cypress EZUSB device which has 8051 core) and communicate to FPGA thru serial bit bang?
I would greatly appreciate any guidance and valuable feedbacks
05-25-2011 05:43 PM - edited 05-25-2011 10:14 PM
Yes it is possible. In addition to the straightforward approach of adding an 8-bit uP to the board (e.g. 8051, ARM), you could add a 'less intelligent' interface which places all of the 'intelligence' for bit-banging in the host PC. There are several devices which can be used to implement such a capability.
I use an FTDI USB-serial converter, a device I selected largely on the basis of cost and the very high quality of the Mac/Windows drivers provided by FTDI. This device also has a 'bit-bang' mode which should be able to provide the function you desire. I have not personally used or tried this bit-bang mode (also called 'cbus').
I would suggest that you contact the FTDI folks and ask them for guidance. You should be prepared with details of what you need or want, details which are missing from your opening post.
Do you want the FPGA to self-configure from SPI (SPI master serial mode), as well as configure from the host PC (slave serial mode)? This will complicate the interface, and require tri-state outputs.
You will need to drive or monitor the following FPGA signals in slave serial config mode:
PROG_B (FPGA input)
INIT_B (FPGA output)
CCLK (FPGA input)
DIN (FPGA input)
When you have completed your design, I'm sure there are others (including myself) who would be very interested in your work This would be a very interesting application example.
Another suggestion: An 8-bit micro with internal USB device controller, memory, and IO. Such as this one. These are dirt cheap, but the software development hurdle will be greater than developing the 'dumb-as-a-post' FTDI device described above.
-- Bob Elkind
05-25-2011 08:14 PM
For the FPGA side of the fence, I would start here if you haven't seen it already:
http://www.xilinx.com/support/documentation/application_notes/xapp502.pdf (Using a Microprocessor to Configure Xilinx FPGAs via Slave Serial or SelectMAP Mode)
05-26-2011 06:47 AM - edited 05-27-2011 09:34 PM
Avnet uses a Cypress PSoC 3 (with 8051) to transfer a bitstream over USB to the FPGA via the Slave Serial Spartan-6 configuration port. This is on the Spartan-6 LX16 Evaluation board -- www.em.avnet.com/spartan6lx16-evl . The schematics are available online, as well as a User Guide which explains in more detail what the PSoC is doing on that board besides FPGA configuration. The PSoC 3 source code is available from your local Avnet FAE.
05-26-2011 01:14 PM - edited 05-26-2011 01:41 PM
Bryan, your link to the Avnet S6LX16 development board did not work (for me). Here's an alternate link, which some might find handy.
Access to the reference files mentioned by Bryan will require registration and approval at the Avnet website, much the same as for accessing reference design files from the Xilinx website.
Also: The Cypress PSoC device used in the Avnet embedded USB interface is not cheap, around $15 US.
-- Bob Elkind
05-27-2011 09:37 PM
Thanks, Bob. My link had an errant period attached at the end, but it is fixed now.
We used the largest PSoC 3 available as we had a lot of different functions we needed to accomplish with it. The specific part we used was the CY8C3866AXI-040. There are less expensive and smaller versions available, plus I expect the price would come down significantly in volume.
05-27-2011 09:44 PM
There are less expensive and smaller versions available, plus I expect the price would come down significantly in volume.
Between you and me, Bryan, Cypress has never been known as a low-cost supplier in the marketplace, even in huge volumes.
-- Bob Elkind