USB Port in Papilio Duo (Technical Question)


Haider

Recommended Posts

Hi everyone

i have question about Papilio Duo?
before i ask the question

i read FPGA tutorial written by Hamster about sending data between two FPGA board (i think the model was Papilio One 250k) with speed up to 400 Mbps

i want to trying do the same thing but between FPGA board and my pc

so my question does the USB port in Papilio Duo support Host Device and Data transfer (maybe that call these things OTG 2.0 PHY)

like this FPGA boards

ZYBO Zynq™-7000 Development Board


https://www.digilentinc.com/Products/Detail.cfm?NavPath=2,400,1198&Prod=ZYBO

if you visit the URL you will read in the description they say that the board have

High-bandwidth peripheral controllers: 1G Ethernet, USB 2.0, SDIO

also support

OTG USB 2.0 PHY (supports host and device)
 

Link to comment
Share on other sites

Why not connect a cypress fx2 board to the gpio? Boards with them are cheap now. They can sample 16 bits and send over usb2. At 30MHz you will saturate the usb2 bus (actually before since the host requests first). You will need to write some 8051 firmware for the fx2 and a driver for the PC.

What are you hoping to do? One way transfers from fpga to PC or something more complex.

  • Like 1
Link to comment
Share on other sites

i want to implement this idea on FPGA i'm trying to send data from PC to FPGA (high bandwidth 20 or 30 MB/s)

 

to process it inside FPGA by specialized Algorithm to minimize the processing time then send it back from FPGA to PC Via FPGA Board to do that there is FPGA Board with PCI Express slot to receive data with high bandwidth

 

but its come with Vertix 6 or 5 or 7 FPGA Chip and its price between 1500 and 5000 us $

so that why i decide to go with USB port to use it instead of PCI Express slot

 

take an example there is some example in the internet about implement file compression algorithm on FPGA to compress the file in faster time but it use to compress stored data inside FPGA limit size of data not used in real-time mode receive data and process it in the same time

 

i know this thing classified in the advanced level in FPGA but i want to ask about it because this is what i love and want to learn.

 

 

my regards

Link to comment
Share on other sites

That should work. The reason I ask about the direction is the way the FX2 works. The 8051 is too slow to transfer the bytes manually, so it must be configured to just forward everything from the USB port to the GPIO. I only ever set this up one and left it since I was doing one way communication (DVB streams). For two way the 8051 would need to reconfigure it to be an input at some point. Anyway its 10 years since I was familiar with this so you'll have to read the FX2 manual to check it will work. From the papilio duo side I think 16-bit @ 12-13MHz is not a problem.

  • Like 1
Link to comment
Share on other sites

I don't think the Papilio Duo has USB. There is a USB serial chip as described here (http://papilio.cc/index.php?n=Papilio.PapilioDUOHardwareGuide#PProUSB). So up to 3MHz via serial.

 

I think you'd need to connect a USB2 chip to the GPIO to achieve this. I've had success with usbhostslave, usb chip + some resistors, but that is only 1.1 speeds.

 

This is not correct, the DUO does have a USB 2.0 chip on board (FTDI 2232H) and it can do up to 30 Mbits/sec in MPSSE mode and up to 12 Mbits/sec in serial mode.

Not as fast as you want but faster than 3 Mb/sec.

 

Magnus

  • Like 1
Link to comment
Share on other sites

This is not correct, the DUO does have a USB 2.0 chip on board (FTDI 2232H) and it can do up to 30 Mbits/sec in MPSSE mode and up to 12 Mbits/sec in serial mode.

Not as fast as you want but faster than 3 Mb/sec.

 

Magnus

 

Just took a quick glance at the datasheet. I see 2 pins connected to the FPGA and the MPSSE needs 4. Am I missing something?

  • Like 1
Link to comment
Share on other sites

i search in the internet and find this thing

 

Basys™2 Spartan-3E FPGA Board have "USB 2 full-speed port for FPGA configuration and data transfers (using Adept 2.0 software available as a free download)"
 
 
 
 
also find this Board
aes220 high speed USB FPGA mini-module
 
its spartan 3 and could use the full speed of USB 2.0 port
what about Duo or Pro with spartan 6
 
if its depend on the USB Controller Chip
 
is it possible to use the same chip in these Board above with Duo or Pro
 
 
 
this article about how to implement high speed USB 2 on FPGA
Link to comment
Share on other sites

Ok, first a few definitions:

USB High-speed = 480 Mb/s transfer rate -> this is what you want

USB Full-speed = 12 Mb/s transfer rate

USB Low-speed = 1.5 Mb/s transfer rate

 

Most boards (like Arduino, Papilio One, Papilio Pro, Mojo) only has Low-speed or Full-speed USB I/O so not good for your application.

 

The most common way to get USB High-speed device support is to either use an FTDI FT2232H chip or a Cypress FX2 chip.

 

Cypress FX2:

I have very limited experience with the Cypress FX2 chip so others might have to chime in here.  The aes220 board above uses the Cypress FX2 chip so that sounds like a good candidate.  There are many other boards that's uses the FX2 for USB (like Opal Kelly XEM6002, boards from KNJN and many more).  Just do a google search on "FPGA FX2".

 

FT2232H:

To get the max data rate (~28 MB/s) from the FT2232H chip you need to use synchronous FIFO mode which is only available on the A port, but most boards with this chip (like Papilio DUO, Pipistrello, Saturn and miniSpartan6+) uses the A port for JTAG so no Synch FIFO mode.  Pipistrello, Saturn and miniSpartan6+ have the B port hooked up for async FIFO mode, this will get you at most 9 MB/s.  Papilio DUO only has the B port MPSSE signals hooked up to the FPGA so at the most you can get is the 30 Mb/s MPSSE data rate on the DUO.  The only board that I know of that has an FT2232H chip hooked up for Sync FIFO mode is the version 1 of the Pipistrello board, it can do 28 MB/s transfer rate.

 

 

Another alternative is to get a board with USB 3.0 support (a.k.a. USB SuperSpeed) using the Cypress FX3 chip, like Opal Kelly XEM6310, it can do > 340 MB/s...

 

Hope this helps,

Magnus

  • Like 1
Link to comment
Share on other sites

mkarlsson im really grateful from you for this info, thank you very much

 

Pipistrello Rev 2.0 i great board this Hardware Description from its website :-

 

FPGA: Spartan-6 LX45 in 324 BGA package, speed grade -3C

Flash memory: 128 Mbit SPI flash memory (Micron N25Q128A13ESE40G) wired for 1x, 2x or 4x wide data path

On-board DRAM: 64 MBytes (32Mx16) of LPDDR memory (Micron MT46H32M16LFBF-5) clocked at 200 MHz (up to 800 MBytes/s transfer rate) in 60 BGA package

USB device interface: High-speed (480 Mbits/s) interface using a 2-channel FTDI FT2232H chip. Channel A is wired for JTAG. Channel B is wired for serial or async FIFO mode.

DVI/HDMI interface: Full HDMI output interface (including I2C level translators for DDC) using a 19-pin HDMI type A connector

Audio output: Two-channel audio output using 1-bit sigma-delta DAC

Micro-SD card: Socket for micro-SD card, wired for SPI or native (4x wide) SD interface

PMOD interface: Double-row PMOD connector that will allow the use of a wide range of PMOD devices (see below for more info on PMOD devices)

LED indicators: Power (green), config state (yellow), five user-defined

User I/O: Papilio-style wing interface with 48 user-defined I/O signals. The boards have female headers installed on the wing interface.

Form factor: Similar to Papilio One (2.9" x 2.7")

Fully supported by Xilinx tools (iMPACT, Chipscope, SDK etc.) without need for Xilinx JTAG cable.

Assembled and tested in USA

 

------------------------------------------------

 

 

as you say it can reach the 480 mbp/s for USB 2.0 opalkelly offer many options with great spec tech there is spartan 150, vertix 5,7 and Kintex-7, Altera Cyclone IV (but some of them out of my budget till in the future :D )

 

my next step is search and know more about opalkelly boards and Pipistrello, but because you are here, im geek in ask you and i'm filled happiness  :wub:  because of your answer

 

what do you thing about this board

 

fist one

 

Basys™3 Artix-7 FPGA Board

http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,400,1288&Prod=BASYS3

 

 

this three share the same thing

 

ZYBO Zynq™-7000 Development Board
 
 
ZedBoard  Zynq™-7000 Development Board
 
 
Nexys™4 DDR Artix-7 FPGA Board
 
 
the first two have:
  • OTG USB 2.0 PHY (supports host and device)

 

 

so my question will this board offer high speed USB data transfer  like the two you suggested to me.

 

 

 

 

 

 

Link to comment
Share on other sites

Well, I'm somewhat biased about the Pipistrello board since I'm the designer of that board but as I said Pipistrello v2 can at the most do 9 MB/s since the A port on the FT2232H is used for JTAG.

 

Both the Digilent Basys3 and Nexys4 boards use a Microchip PIC24FJ128GB micro controller for USB and it can only do full-speed and low-speed but not high-speed so they can not be used for this project.

 

The ZYBO and ZedBoard are based on the Xilinx Zynq FPGA + ARM chip, with a USB 2.0 PHY chip directly connected to the Zynq so you either have to use the ARM CPU for USB I/O or design your own USB controller using the FPGA.  I don't think you want to go that route.

 

 

Suggestions:

 

If you already have an FPGA board (like a Papilio One, Pro or Duo) then I would get a FT2232H or FX2 breakout board and connect it to the FPGA board, this will get you to 25 - 30 MB/s transfer rate between the CPU and the FPGA without too much effort.

 

If you need to buy an FPGA board and don't want to use a breakout board then I would look into boards using the FX2 chip for USB since non of the FT2232H-based boards that I know of (besides Pipistrello v1) can do sync FIFO mode needed if you want to go faster than 9 MB/s.

 

BTW, if you are interested in Pipistrello then I can offer you a used v1 board with an LX9 chip and 166 MHz LPDDR memory for $45.  It can do up to 28 MB/s transfer rate between the computer and the FPGA, and I have code for both the computer and the FPGA that can be used as a starting point for your project.  Email me (magnus at saanlima dot com) if you need more info.

 

Magnus

  • Like 1
Link to comment
Share on other sites

Q1/about FT223H chip you say

"Papilio DUO only has the B port MPSSE signals hooked up to the FPGA so at the most you can get is the 30 Mb/s MPSSE data rate on the DUO"

so is that mean Papilio Duo will be enough because you say "30 Mb/s MPSSE data rate on the DUO"

 

 

Well, that's up to you if it's enough.  30 Mbits/s = 3.25 MB/s which is much lower than the 20 - 30 MB/s you said you needed.

 

 

Q2/what about aes220 high speed USB FPGA mini-module
http://www.aessent.c...minimodule.html

 

I have no experience with this board.  It uses a Spartan 3AN, not a Spartan 6.  The FX2 chip should do high-speed USB but I don't know how the FX2 chip and the FPGA is connected together.

 

 

Last Question/ sir you say you are the designer of Pipistrello

i visit http://saanlima.com/store and i only find Pipistrello LX45


there is Pipistrello v1 and Pipistrello Rev 2.0 idont now what is the difference
you say Pipistrello v1 $45, but i only found Pipistrello LX45 in the store cost $154.95


v1 is not for sale anymore, I only sell the v2 version populated with Spartan 6 LX45.  However, I do have a used v1 Pipistrello with an LX9 chip that I can sell at cost ($45).  It has 64 MB of 166 MHz LPDDR memory (i.e. up to 666 MB/s peak read/write speed), not 200 MHz like v2, For a while I was thinking of selling this version as a lower cost Pipistrello but the manufacturing cost is so high that it didn't make sense.

 

my question is:

the Hardware Description for Pipistrello v1 say

USB device interface: High-speed (480 Mbits/s) interface using a 2-channel FTDI FT2232H chip. Channel A is wired for serial or sync/async FIFO mode. Channel B is wired for JTAG.


and the the Hardware Description for Pipistrello Rev 2.0 (i dont know what is rev 2 is it mean Pipistrello LX45) say

USB device interface: High-speed (480 Mbits/s) interface using a 2-channel FTDI FT2232H chip. Channel A is wired for JTAG. Channel B is wired for serial or async FIFO mode.


so both V1 and Rev 2 support high speed and Rev 2 come with Spartan Lx45 and  DRAM: 64 MBytes with only $154.95

 

Yes, both version support high-speed USB (i.e. the communication between the PC and the FT2232H chip) but the connection between the FT2232H and the FPGA is different - v1 uses Port B for JTAG and Port A for I/O so it can do sync FIFO mode (i.e. up to 28 MB/s) while v2 uses Port A for JTAG and Port B for I/O so it can only do async FIFO mode (i.e. up to 9 MB/s) since sync FIFO mode is only available on Port A.  Again, we are talking about the way the FT2232H and the FPGA is communicating, not the PC to FT2232H communication.  What matters is the speed between the PC and the FPGA, not the PC and the USB chip.

 

 

is this the best choice between all these board in this thread or you have another opinion.

 

If you need 20 - 30 MB/s transfer rate between the PC and the FPGA then your options are limited.  One option is to use Pipistrello v1, another option is to use any FPGA board together with a FT2232H or FX2 breakout board attached, a third option is to use an FPGA board with an FX2 chip but you have to make sure the wiring between the FX2 chip and the FPGA allows byte read and write, not just serial communication.  There might be opther options too, like USB 3.0.

 

Magnus

  • Like 1
Link to comment
Share on other sites

Hi Dove

 

i send magnus email about this:-

 

"BTW, if you are interested in Pipistrello then I can offer you a used v1 board with an LX9 chip and 166 MHz LPDDR memory for $45. It can do up to 28 MB/s transfer rate between the computer and the FPGA, and I have code for both the computer and the FPGA that can be used as a starting point for your project. Email me (magnus at saanlima dot com) if you need more info."

 

 

and if there is any question or something have information about FPGA, MCU, Chip I'll post it in this thread.

 

 

my regards

Link to comment
Share on other sites

hi again

 

this time i have general guestions about fpga but before i start asking i want to post what i found in my search about FPGA with USB

 

 

USB-FPGA Module 2.16: Artix 7 XC7A200T FPGA Board with USB 2.0

http://www.ztex.de/usb-fpga-2/usb-fpga-2.16.e.html

 

this borad come with the higest chip in artix 7 family

also with usb2 port and they say in spec tech:

  • High-Speed (480 MBit/s) USB interface via Mini-USB connector (B-type)

price little high about 550 $ or 525 $

 

 

but this board does not contain anytime of RAM i read the spec tech and download the resources info for this board but didn't find any thing refer to ram(SRAM, DRAM ,DDR, etc...)

 

Q/ how this will going to work ?

 

Q2/till now the perfect board have USB 3  with powerfull FPGA spartan LX150T is opil kelly xem6310 but it's expensive

cost about 800 $

 

i now this question is too far for someone newbie like me, but i want to learn more about hardware and FPGA

 

digikey and other website is like wikipedia for electircal and electronic engineer

i visit it to read and disconver what is the type of chip and how many cassification can we make for the digital and analog chip

 

by the way  lets try to pick some chip form digikey

 

USB3 Controller : Cypress Semiconductor Corp CYUSB3014-BZXI

Cost : $37.44

 

 

 

FPGA Chip :  Xilinx Artix-7 XC7A200T-1FBG484I (this more powerfull than Spartan 6 LX150T)

Cost: $213.75

 

 

RAM : Alliance Memory, Inc. AS4C512M8D3L-12BIN (while XEM6310-LX150 have DDR2 128 MiB)

and this LDDR3 RAM 800 Mhz

Cost: $12.15

 

by the way in the spect tech table in digikey what is that mean

 

Memory Size4G (512M x 8)

 

sometimes 256x16

is that mean they will sell you 8 or 16 chip and every chip is 512 or 256 or what

 

 

 

 

Total Cost for this three chip is : $251.19

 

all this chip is more power than XEM6310-LX150 expect usb3 controller

 

i now we still need resistor and other component like ROM so we can say the other component will not cost more than 100 $

lets say it will be 100$

 

the total cost for all items will be

 

362 $

 

with this budget can we design FPGA board more powerfull and less cost than XEM6310-LX150

 

how much the print PCB and asselmbly part (with SMD chip) will cost

 

will 500 be enough to order one board only

i dont ask this question because i want to do that but just i want to have an idea about PCB Design and production cost

thats all

i know order 1 board will cost to high than many board

 

 

 

 

 

 

Link to comment
Share on other sites

hmmm.. there is many newbie in this form want to learn how things works (not every thing just about FPGA) and I'm the first newbie :D .

 

i think there is some peoples in this forum have the experience in PCB design and electronic Chip, i wish they give us some answers about my questions.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.