Which MCU what has a fast interface suitable for an FPGA - Page 1
Forum section: electronics / general

author: Boscoe
author_rank: Frequent Contributor
timestamp: March 29, 2022, 09:07:54 pm
content: Hi all,I need a bit of advice. I'm currently looking at designing a digital camera where the sensor output is raw LVDS so will need an FPGA for interfacing and buffering the data. The ideal solution is the Xilinx Zynq however I find the Xilinx work flow nearly unusable and I'm very proficient with Altera/Intel tooling. I would lie to use a standard Intel FPGA and a microcontroller for saving the data to disk plus some other bits and pieces. Thing is I need an MCU with an appropriate interface and DMA. I need this interface to hit ~50MB/s. I'm very experienced with STM however they don;t really have anything that fits the bill. I looked at the QSPI and FMC interfaces however they won't quite work. Any advice or pointers are more than welcome!I forgot to mention, I can't use STM32 as the maximum image size for bayer image is 2k x 2k and I'm looking to store 25MP images using external memory.Many thanks

author: ejeffrey
author_rank: Super Contributor
timestamp: March 29, 2022, 09:28:47 pm
content: If what you really want is a Zynq have you looked at the Cyclone V SX? That is an affordable Intel/Altera alternative to Zynq that wouldn't require an off-chip MCU with DMA.

author: nctnico
author_rank: Super Contributor
timestamp: March 29, 2022, 09:42:43 pm
content: PCIexpress would be the obvious choice. Otherwise a gigabit ethernet MAC can be used as well. But you'll likely end up using some kind of SoC or the NXP i.MX RT1170 cross-over MCU.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 29, 2022, 11:14:14 pm
content: What do you want to do with this data in the MCU, to begin with?

author: julian1
author_rank: Frequent Contributor
timestamp: March 29, 2022, 11:32:41 pm
content: Have you seen how (stm32) fsmc can be used to quickly clock data to tft/lcd drivers, but without using the address lines (or using just two dummy addresses for read/write)? Would be curious to know if that approach couldn't be applied to an fpga.

author: Jeroen3
author_rank: Super Contributor
timestamp: March 30, 2022, 10:40:17 am
content: During my time in university a group was experimenting with using the FPGA as external memory on the FMC of an STM32F4.

author: hans
author_rank: Super Contributor
timestamp: March 30, 2022, 12:52:28 pm
content: I suppose FMSC/QSPI won't work because of the STM being master, while the FPGA should hold control over it's data flow. Perhaps a buffer and some interrupt signals can do the trick on that? Or am I missing something else? (25MP storage could be fixed with SDRAM, which a FPGA would also need if it were to buffer it completely, anyway)The STM32F407 (for example) also has a 8 or 14-bit digital camera interface (DCMI), up to 54MPix/s..If that doesn't work out, perhaps it's an idea to move data processing into the FPGA itself. Perhaps use a softcore with custom LVDS camera + data storage IP, so that the high data rate doesn't have to pass through the MCU or main data buses.

author: mon2
author_rank: Frequent Contributor
timestamp: March 30, 2022, 12:58:16 pm
content: Are you not concerned about the lead times for the STM32 devices ? Sure kits are somewhat available but without the silicon to build your concept at fair pricing is a show stopper for us.Hence the quest for suitable replacements. Review GEEHY / APM32 microcontroller series as possible choices.For the FPGA - review Efinix Ti60 series. The toolchain is dog slow to synthesize (30-45 minutes) but works. This series has LVDS & MIPI drivers and they have a kit with the RPI CSI camera as input and DSI LCD panel for viewing the captured MIPI HD streaming camera.Another possible option to consider is the Cypress CYUSB3014 USB 3.x FX3 device which offers camera interface examples and autonomous buffering.

author: AndyC_772
author_rank: Super Contributor
timestamp: March 30, 2022, 01:26:06 pm
content: I've used QSPI on an STM32F7 to read bursts of data out of an FPGA; I forget the exact speed but it wasn't far short of what you're after.The biggest technical problem was errata in the STM32 memory controller. Even if QSPI isn't configured to be accessed as a memory mapped device, the core does speculative fetches over the QSPI interface on exit from interrupts, which the FPGA isn't expecting and can't handle. It took me ages to find this out; apparently the workaround involves reprogramming the MMU.The biggest hurdle by far, though, is availability. Try buying an STM32 or Altera FPGA right now, and if you find any, do please let me know.

author: Boscoe
author_rank: Frequent Contributor
timestamp: March 30, 2022, 02:27:09 pm
content: Quote from: julian1 on March 29, 2022, 11:32:41 pmYes the FMC is an option but not in the LCD mode as the data direction is the wrong way. I have considered making the FPGA act as SRAM for example.

author: Boscoe
author_rank: Frequent Contributor
timestamp: March 30, 2022, 02:30:18 pm
content: Quote from: hans on March 30, 2022, 12:52:28 pmThe FPGA would have a large buffer in the shape of some DDR3. Then, the MCU can read out at its leisure. The problem with the DCMI is it's limited to a 4MP image for bayer or monochrome images.I find it a lot easier to develop in the software domain of a well established MCU line like STM or iMX rather than softcores and FPGAs in general. This is why I'd like to stay away from Zynq as the iteration and debugging is painfully slow - I don't know complex projects get done there.

author: Boscoe
author_rank: Frequent Contributor
timestamp: March 30, 2022, 02:31:21 pm
content: Quote from: AndyC_772 on March 30, 2022, 01:26:06 pmThis is very insightful, thank you! Yes the sourcing is very difficult at the moment.

author: mon2
author_rank: Frequent Contributor
timestamp: March 30, 2022, 03:38:46 pm
content: Efinix Ti60 series are about to ship soon. Kits are available on DK (from where we purchased them). Their devices offer versions with internal (Winbond) HyperRam for buffer use. Toolchain is free for 1 year with any kit purchase. Simulator is not a part of the toolchain so need to use external solution.https://www.digikey.com/en/products/detail/efinix-inc/TI60F225C-DK/15672425

author: julian1
author_rank: Frequent Contributor
timestamp: March 30, 2022, 09:36:57 pm
content: Quote from: Boscoe on March 30, 2022, 02:27:09 pmfsmc is bidirectional but mcu is bus master. Even with tft, it is common to invert the relationship though. For example data transfer is initiated in response to a hardware interrupt for the current scanline vsync/hsync. this reduces or eliminates visible rendering artifacts/tearing.

author: ejeffrey
author_rank: Super Contributor
timestamp: March 31, 2022, 03:35:52 am
content: Quote from: Boscoe on March 30, 2022, 02:30:18 pmA zynq or altera SoC is just an FPGA stapled to an arm processor with an AXI bus. Developing and debugging the code on the processor side is not any slower than developing for a separate CPU. Iterating the programmable logic design takes a minute whether it is a zynq or stand alone FPGA.You don't have to speak AXI directly, both vendors offer a wide range of standard protocol bridges.

author: fchk
author_rank: Frequent Contributor
timestamp: April 01, 2022, 10:57:03 am
content: Quote from: Boscoe on March 29, 2022, 09:07:54 pmWhy do you need a MCU?You could convert your LVDS interface to PCIe. There are enough ways to feed PCIe (a single 2.5GBit/s Gen1 lane should be more then enough for just 50MB/s) into a PC, which then does buffering, debayering and processing. Ximea (www.ximea.com) does this, and it works really nice even with 50 MPix cameras. PCIe ist the most direct, fastest and low-latency way to interface to a PC.fchk