EEVblog Electronics Community Forum

Electronics => Microcontrollers => Topic started by: legacy on April 10, 2018, 11:21:04 am

Title: usb to fpga
Post by: legacy on April 10, 2018, 11:21:04 am
I need to develop a fast-usb-link (10Mbyte/sec at least, 20Mbyte/sec would be better) from a linux-host to a fpga-target (3.3V)

what do you suggest?
Title: Re: usb to fpga
Post by: legacy on April 10, 2018, 11:55:47 am
FT232H? umm, what about the host-side, I mean I need to write a kernel-module for a MIPS-LE machine
Title: Re: usb to fpga
Post by: SiliconWizard on April 10, 2018, 12:02:51 pm
You don't need to develop any module, use libusb. It's available on pretty much any Linux distribution. FTDI's own drivers for Linux are based on libusb. I don't think they have drivers for MIPS targets, but you can use libftdi which is open source and also uses libusb.


Title: Re: usb to fpga
Post by: legacy on April 10, 2018, 01:30:33 pm
Code: [Select]
dev-libs/libusb
      Homepage:      http://libusb.info/ https://github.com/libusb/libusb
      Description:   Userspace access to USB devices
Title: Re: usb to fpga
Post by: rhb on April 10, 2018, 11:38:16 pm
FT232H? umm, what about the host-side, I mean I need to write a kernel-module for a MIPS-LE machine

A MIPS-LE machine?  Are you running a DECstation?
Title: Re: usb to fpga
Post by: lucazader on April 11, 2018, 01:18:12 am
Not sure what the linux driver situation is, but these cypress chips are aftern used as the USB frontend to an FPGA device.
http://www.cypress.com/products/ez-usb-fx2lp (http://www.cypress.com/products/ez-usb-fx2lp)
Title: Re: usb to fpga
Post by: xaxaxa on April 11, 2018, 06:05:21 am
I've always used a usb3343 plus the open source usb-serial vhdl core at http://jorisvr.nl/article/usb-serial, (http://jorisvr.nl/article/usb-serial,) which can easily do 30MB/s transfer. It shows up as a usb CDC (communications device class) device which most OS's have built in drivers for (it works out of the box on linux and mac os, but needs a special .inf file on windows). This is probably the cheapest solution.

I wouldn't use anything from ftdi in my products because of the attitude they have shown towards customers (look up "ftdi gate"), but there is also a usb3 to fifo ftdi chip that can do much higher transfer rates (only limited by usb3).
Title: Re: usb to fpga
Post by: legacy on April 11, 2018, 07:27:38 am
A MIPS-LE machine?  Are you running a DECstation?

modern RISCs made in China are MIPS64-LE
Title: Re: usb to fpga
Post by: legacy on April 11, 2018, 07:33:38 am
thanks guys  :D
Title: Re: usb to fpga
Post by: legacy on April 11, 2018, 01:38:44 pm
any low-cost (<200Euro) fpga (Xilinx is my choice) with usb3343 onboard?
Title: Re: usb to fpga
Post by: rhb on April 11, 2018, 02:16:09 pm
A MIPS-LE machine?  Are you running a DECstation?

modern RISCs made in China are MIPS64-LE

The R2000 was  pin selectable for byte sex.  DEC chose LE and SGI chose BE.
Title: Re: usb to fpga
Post by: legacy on April 11, 2018, 03:19:15 pm
The R2000

Umm, the SONY Playstation1's CPU is a good example of MIPS design where you can set the endianness. SONY went for LE, the firmware is LE, and every game ever developed is LE.

I am more interested in MIPS32r2 and MIPS64r2. Although nowadays MIPS are usually used for router products, a few companies located in China have already designed ATX motherboards for daily computing needs, and usually, you can't set its endianness by setting a bit during the early bootstrapping. It's hardcoded, thus you have to consider their products as LE machines.

Concerning linux, there is kernel support for LE<--> BE. Even if some kernel-driver are still bugged due to the endianness
Title: Re: usb to fpga
Post by: legacy on April 11, 2018, 03:21:20 pm
anyway, my application is byte-oriented, thus not prone to endianness-issue  :D