Author Topic: Simplest / Cheapest FPGA for bulk SPI to USB  (Read 2517 times)

0 Members and 1 Guest are viewing this topic.

Offline RerouterTopic starter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Simplest / Cheapest FPGA for bulk SPI to USB
« on: August 17, 2020, 08:29:31 am »
Hello, a project I am working on needs to shunt 4x 20MHz SPI buses from ADC's in, and 1x 20MHz DAC SPI bus out via USB, I really do not need any fancy processing in the FPGA, just a nice way to interface it, Any recommendations?

Sadly the end point devices cannot operate faster than 20MHz, the ADC data would be a block of 64x24 bit readings, and the DAC data would be 24x16 bit outputs, all SPI interfaces would be about 70% utilization.
 

Online Ice-Tea

  • Super Contributor
  • ***
  • Posts: 3170
  • Country: be
    • Freelance Hardware Engineer
Re: Simplest / Cheapest FPGA for bulk SPI to USB
« Reply #1 on: August 17, 2020, 08:54:51 am »
What's your target? One-off proof of concept? Production run? Of how many pieces? Something off the shelf? Will you design your own board?
 

Offline RerouterTopic starter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Simplest / Cheapest FPGA for bulk SPI to USB
« Reply #2 on: August 17, 2020, 08:56:21 am »
one off / less than 15 units, hand assembled (am quite good at SMD, prefer not to play with BGA), and yes I am designing the PCB
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 5026
  • Country: si
Re: Simplest / Cheapest FPGA for bulk SPI to USB
« Reply #3 on: August 17, 2020, 09:14:46 am »
Just pick the biggest FPGA that you can get for a low price from whatever vendors tools you know the most(Altera Xilinx Lattice..) and use a FTDI parallel to USB chip to get the data out. Plenty are available in soldering friendly TQFP or QFN packages.

When you don't need any special features like high speed DDR IO or serdes or need some special IP then pretty much any FPGA will work. Tho you may want to go for the more integrated kinds that only need 1 or 2 supply rails and have internal flash.
 
The following users thanked this post: Rerouter

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8094
  • Country: ca
Re: Simplest / Cheapest FPGA for bulk SPI to USB
« Reply #4 on: August 18, 2020, 02:46:53 am »
If you do not want to deal with multiple supply voltages or a bootprom, take a look at Intel's Max10 series, basically an all in 1 chip solution, single 3.3v supply with a programming port, (it has a built in PLL and you still want an FTDI 480mb USB-parallel interface for development simplicity sake):

https://www.digikey.com/products/en/integrated-circuits-ics/embedded-fpgas-field-programmable-gate-array/696?FV=-8%7C696&quantity=0&ColumnSort=1000011&page=1&stock=1&nstock=1&k=max10&pageSize=100&pkeyword=max10

(Careful, some are low voltage variants.)
Also, you will need to look at FTDI's throughput latency handshaking response to see how much on-chip cache you might need to keep a perfectly smooth stream running if it is one of your requirements.
« Last Edit: August 18, 2020, 07:37:03 am by BrianHG »
 
The following users thanked this post: Rerouter

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9222
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Simplest / Cheapest FPGA for bulk SPI to USB
« Reply #5 on: August 22, 2020, 06:51:22 pm »
ICE40 + Cypress FX2.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3246
  • Country: ca
Re: Simplest / Cheapest FPGA for bulk SPI to USB
« Reply #6 on: August 22, 2020, 07:44:07 pm »
It's only 100 Mb/s traffic. You should be able to do this with an MCU with HS USB module. You only need to find one with 5 SPI modules. You might be able to find one in $3-5 range. This is certainly cheaper than FPGA. Otherwise, practically any FPGA will do.
 

Offline RerouterTopic starter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Simplest / Cheapest FPGA for bulk SPI to USB
« Reply #7 on: August 22, 2020, 10:35:01 pm »
Currently leaning towards a FT600q and a lattice Machx02, but if you can recommend such a micro I'm all ears, STM32 my first though seems to have so many subtle hardware bugs that the SPI cannot be relied on

The FT600q is overkill, but it also does not have as long FIFO timeouts as the USB2.0 tranceivers, e.g. the HS modules tend to need a full 4K transfer to send to the host, while this one will send immediatly,
 

Offline EverydayMuffin

  • Regular Contributor
  • *
  • Posts: 70
  • Country: ie
Re: Simplest / Cheapest FPGA for bulk SPI to USB
« Reply #8 on: August 22, 2020, 11:07:09 pm »
The cheapest FPGA would probably be GOWIN's GW1NS-2. This FPGA has an internal ADC and USB 2.0 PHY, it also has the option of an Arm Cortex-M3 (similar architecture to Microchip SmartFusion2).
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8094
  • Country: ca
Re: Simplest / Cheapest FPGA for bulk SPI to USB
« Reply #9 on: August 23, 2020, 01:07:15 am »
e.g. the HS modules tend to need a full 4K transfer to send to the host, while this one will send immediatly,

Not true.  At least with the work my app developer has done with FTDI.  You can set a 'Latency' timeout timer in FTDI's drivers when opening the port and withing that refresh cycle, even if the buffer is partially full, you will receive the current size contents of that buffer.

This may be different in newer drivers, however, the feature has been there since the mid 2000's.

Even in their USB-RS232 modules, they have the feature in 2 places.  Either in the control panel, see here:
https://www.eevblog.com/forum/fpga/verilog-rs232-uart-and-rs232-debugger-source-code-and-educational-tutorial/msg2801424/#msg2801424
With the default setting of 16, you either need to fill FTDI's 4K receive buffer before your app even knows that a single character was sent, or, once sending a few characters, you need to wait that 16ms before your app would know only a few characters were sent.

The other way is a parameter built into FTDI's drivers when you directly interface with their hardware.
 
The following users thanked this post: Rerouter

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 4489
  • Country: nz
Re: Simplest / Cheapest FPGA for bulk SPI to USB
« Reply #10 on: August 23, 2020, 02:05:27 am »
5 SPI and one USB seems well within what many Cortex M4 microcontrollers can handle.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Simplest / Cheapest FPGA for bulk SPI to USB
« Reply #11 on: August 23, 2020, 05:15:04 am »
It's only 100 Mb/s traffic. You should be able to do this with an MCU with HS USB module. You only need to find one with 5 SPI modules. You might be able to find one in $3-5 range. This is certainly cheaper than FPGA. Otherwise, practically any FPGA will do.

NXP LPC55S28 should be able to do this.
 

Offline RerouterTopic starter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Simplest / Cheapest FPGA for bulk SPI to USB
« Reply #12 on: August 23, 2020, 10:14:20 am »
I think the micros get ruled out by generally only having 2 DMA channels, I cannot run the SPI buses any faster, which leaves me feeling I would be left juggling grabbing bytes,

E.g. the NXP chip has a 16 bit x 8 entry fifo that I would need to keep cleared, when I have 24x10 bits coming in, and 24x8 going out.
 

Offline up8051

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: pl
Re: Simplest / Cheapest FPGA for bulk SPI to USB
« Reply #13 on: August 23, 2020, 10:10:52 pm »
LPC55S28 have to DMA blocks: DMA0 with 23 channels and DMA1 with 10 channels.
Each SPI (Flexcomm) have own DMA channel.
 
The following users thanked this post: Rerouter


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf