Single board computer with very fast GPIO (>=40 MHz) - Page 1
Forum section: electronics / general

author: stefan_o
author_rank: Regular Contributor
timestamp: August 03, 2024, 04:53:28 pm
content: Hi,I'm looking for a single-board computer with a very specific feature:-A very fast 32 Bit parallel input (40 MHz at least) that can run continuously over hours without any drops, with internal or external clock (alternatively LVDS input). No protocol, ADCs are connected to that-A way to transmit or store that data, so either USB3 interface or 2.5G Ethernet is needed.-Should run LinuxWhat I do not want:Some restricted proprietary SDK, closed source drivers etc. Preferable all drivers/devicetree are upstream in the kernel.Any idea?Best regardsStefan

author: Postal2
author_rank: Frequent Contributor
timestamp: August 07, 2024, 12:43:05 pm
content: Quote from: stefan_o on August 03, 2024, 04:53:28 pmSingle-board computer is not, I bought PCIe X4 fpga board for this purposes.https://aliexpress.com/item/4001125245990.html

author: Mahagam
author_rank: Regular Contributor
timestamp: August 07, 2024, 01:41:53 pm
content: Spartan-6 (or 7) board:I/O -> capture to small internal buffer -> softcore DVI interface (read XAPP495) -> Any fast HDMI capture board

author: stefan_o
author_rank: Regular Contributor
timestamp: August 17, 2024, 12:07:45 am
content: Quote from: Postal2 on August 07, 2024, 12:43:05 pmHow do you program it? I remember working with an Altera FPGA at university some time ago. The Altera software for it was the worst, it was proprietary, extremely complicated GUI, needed some outdated libraries to work (not documented), was painfully slow (sometimes 30 minutes or to get the binary on a recent machine), sometimes it failed after that time, nobody could tell you why, no clear error messages. Nothing I ever want to use again.I would like to give it a try, when:a) There are simple open-source command-line tools to create the binaries for the FPGAb) The functionality is documented with fully working examples you can modify and use in your codeI had a quick look I couldn't find anything. I also had a look for PCIe to parallel cards, but those I could find were all priced at least 4 digits and with proprietary SDKs. A <100€ FPGA PCI-e card would probably a good option, but not with horrible software.Best regardsStefan

author: langwadt
author_rank: Super Contributor
timestamp: August 17, 2024, 12:15:57 am
content: Quote from: Mahagam on August 07, 2024, 01:41:53 pmhttps://hackaday.com/2024/06/01/use-that-one-port-for-high-speed-fpga-data-export/

author: Postal2
author_rank: Frequent Contributor
timestamp: August 17, 2024, 12:29:53 am
content: Quote from: stefan_o on August 17, 2024, 12:07:45 amI actually wanted a PCI version, but it's currently unavailable. So I bought a PCIe, I have adapters. The board comes with a lot of examples, and for the purpose of simply inputting high-speed signals, you can modify the examples in 1 day. I was counting on using Windows XP, all the examples work flawlessly in this system.In general, I wanted to make a video decoder for an old computer on this board, but I found out that there was nowhere to steal it for free. So the board is on the drawer for now.

author: tggzzz
author_rank: Super Contributor
timestamp: August 17, 2024, 08:43:28 am
content: Quote from: stefan_o on August 03, 2024, 04:53:28 pmXMOS xCORE MCUs can do most of that in softwareHard real-time operation guaranteedby design. The IDEcalculatesthe performance by examining the machine code - none of this "measure and hopeyou've hit the worst case" rubbish.USB interface and/or Ethernet interfaces. It can process 100Mb/s ethernet serial bitstreams in software. Use printf() to send results up the USB to a PC, and scanf() to receive commands. Does not interfere with the hard realtime operation, since that is using different cores (up to 32 per IC, and I believe that can be transparently extended across multiple ICs).LVDS: use a logic level converter.Linux: hell no! To get hard realtime guarantees you program the silicon directly (and it is very clean simple programming!).It has the equivalent of an RTOS cast in silicon. Run Linux on the PC if you want to.Pedigree: concepts implemented and proven over 40/50 years, and partially adopted by many other hardware and software systems over the decades.Buy them at DigiKey.

author: stefan_o
author_rank: Regular Contributor
timestamp: August 17, 2024, 08:16:04 pm
content: Quote from: langwadt on August 17, 2024, 12:15:57 amEdit: I had a look at the GitHub pages: That looks quite interesting. Only downside: The FPGA needs some proprietary software, open source not available yet. But it's cheap.Quote from: Postal2 on August 17, 2024, 12:29:53 amA PCIe version is fine for me (I would need the adapter for a PCI one). But how do you write the software for it? What license are the examples? Can I download the examples to see in advance what I'm getting?Quote from: tggzzz on August 17, 2024, 08:43:28 amI actually had XMOS on my mind, I remember some years ago they had a dev board for 20€ or so (did Dave receive one in the mailbag?). But I had a look now, AI stuff everywhere, nothing on data acquisition and the dev board is 200€. And I strongly prefer PCI-e or ethernet over USB3, but the dev board only comes with USB3 and 1G ethernet, that's not fast enough.In fact, that would be my favorite solution: it just streams the acquired data over TCP on an ethernet port (2.5G or faster)Is there some 3rd-party PCI-e dev board for XMOS?I was only demanding Linux on a single-board computer (instead of embedded Windows or any other proprietary OS), not for an external device. I know that Linux itself couldn't do that, the chip would need to fill a (ring)buffer (OS independent) that one can read periodically.

author: tggzzz
author_rank: Super Contributor
timestamp: August 17, 2024, 08:41:54 pm
content: I don't bother to keep up with any manufacturers offerings! They change so fast I only look when I need something.When I realised XMOS was making their StartKit obsolete, I bought a few. Hence "I'm alright Jack".

author: radiolistener
author_rank: Super Contributor
timestamp: August 18, 2024, 12:18:17 pm
content: You're need to use FPGA board for such task. Look for dev-board with GMII interface.

author: langwadt
author_rank: Super Contributor
timestamp: August 18, 2024, 01:17:42 pm
content: https://youtu.be/_LnZrXrdC00?si=i32BSqL7IoZzDGNo

author: Postal2
author_rank: Frequent Contributor
timestamp: August 18, 2024, 03:24:56 pm
content: Quote from: stefan_o on August 17, 2024, 08:16:04 pmThere is a link to Mediafire in the product description. Some porn opened, but the file downloaded. There is a driver for Windows 10 there too. 300 megabytes in size, "PCIE X4_V3_2018.rar".You can use my FTP if you want.

author: stefan_o
author_rank: Regular Contributor
timestamp: August 18, 2024, 09:20:19 pm
content: Quote from: langwadt on August 18, 2024, 01:17:42 pmThe Cypress FX3 was my first try:-All open-source projects do not support USB3 yet-Their own example firmware for sigrok is buggy (starts dropping samples at some point, that's ok for a few seconds capture for logic analyzer, but not for hours of capturing analog data)-Anything derived from their example code is undistributeable, the license states that. I asked for permission, answer was: We don't give legal advice to our own license agreements, contact your lawyerSo IMHO the FX3 is not a good option for anythingQuote from: Postal2 on August 18, 2024, 03:24:56 pmI downloaded it, but it does not look FPGA-beginner friendly at all. Also I couldn't find anything regarding a Linux driver, I don't want to code my own kernel module.Quote from: radiolistener on August 18, 2024, 12:18:17 pmI ordered a Tang Nano 9K FPGA board with HDMI output and a HDMI capture device with MS2130 controller for 25€ total now, I hope that will work.

author: langwadt
author_rank: Super Contributor
timestamp: August 18, 2024, 09:35:44 pm
content: Quote from: stefan_o on August 18, 2024, 09:20:19 pmso use CNLohr's code instead?,https://github.com/cnlohr/fx3fun

author: Postal2
author_rank: Frequent Contributor
timestamp: August 18, 2024, 11:21:22 pm
content: Quote from: stefan_o on August 18, 2024, 09:20:19 pmIt seemed to me that the task of connecting input pins to ready-made modules was still easier than creating a video decoder.Quote from: stefan_o on August 18, 2024, 09:20:19 pmIt should be, but it's really hard to find. If Altera made examples for Cyclone for Windows, there should be examples for Linux too.

author: stefan_o
author_rank: Regular Contributor
timestamp: August 19, 2024, 01:26:15 pm
content: Quote from: langwadt on August 18, 2024, 09:35:44 pmCHLohr uses the Cypress libraries, he even mentions the licensing problem. It might solve the technical issues, but not the legal ones. The license only allows you to distribute firmware builds using the Cypress SDK *together* with a Cypress chip. Source code cannot be published at all (you can publish your code as long it doesn't contain anything from Cypress). That's why the sigrok project refuses to integrate FX3 support, because you need a firmware binary that's not only not free software, you cannot even distribute it.With that license Cypress is shooting themselves in the foot IMHO, they should change it:Allow distribution of binaries linked with their API independent of a Cypress chip, as long as it it designed and intended to run on a Cypress chipPut their example code under some permissive license, so people can use and adopt itBut I don't have high hopes that anything is going to change. Chances are probably higher that somebody get the chip fully working (or at least USB3) using only open-source softwareQuote from: Postal2 on August 18, 2024, 11:21:22 pmI cannot even find a document that describes the content of that archive and a lot of files are only Chinese. Maybe it makes more sense if you can speak Chinese (I cannot). For people with more experience with FPGAs this might be enough, but not for me.

author: langwadt
author_rank: Super Contributor
timestamp: August 19, 2024, 02:13:28 pm
content: FT601 ?

author: Postal2
author_rank: Frequent Contributor
timestamp: August 19, 2024, 08:20:51 pm
content: Quote from: stefan_o on August 19, 2024, 01:26:15 pmSomeday we will brag that we saw a person who can read. And I saw a person who can work with FPGA. He wrote a JPG decoder on FPGA in a month from scratch. You can use this when calculating labor costs. And also ask yourself, have you seen anyone around you who is not a beginner?

author: stefan_o
author_rank: Regular Contributor
timestamp: August 21, 2024, 11:30:49 am
content: Quote from: Postal2 on August 19, 2024, 08:20:51 pmI'm sorry, but I don't have unlimited time. I'm not saying it's impossible to do, but I won't be able to do it in a reasonable amount of time. The TangNano FPGA boards come with a guide how to install the IDE, how to flash the board and there are 3rd party example projects close to what I need, that I can modify for my use case. All documented in English. This is what I consider beginner friendly, because I can focus on a single aspect: Coding Verilog. No need to figure all the other stuff out, because nothing is worse when you don't where something goes wrong: Maybe your code doesn't work as intended, maybe the IDE is not setup correctly, maybe the driver is not working properly, maybe the flashing was not correct. For a beginner it's good to be able to start from a fully working example and then mess with it, because you know what you changed when it's not working anymore.Quote from: langwadt on August 19, 2024, 02:13:28 pmThe developer board seem to be taylored towards interfacing a FPGA. I couldn't find any example for direct data capturing.My first try will be the TangNano / HDMI capture approach

author: langwadt
author_rank: Super Contributor
timestamp: August 21, 2024, 05:04:09 pm
content: Quote from: stefan_o on August 21, 2024, 11:30:49 amit's a start but the tang nano doesn't have enough pins for 32 bit

author: stefan_o
author_rank: Regular Contributor
timestamp: August 22, 2024, 12:17:42 pm
content: Quote from: langwadt on August 21, 2024, 05:04:09 pmIf I counted correctly, the Tang Nano 20K has 34 GPIOs, that means 32 Bit and one for clock and still one left. Important is of course, that all the onboard stuff connected to the pins doesn't interfere. The HDMI output does not share it's pins with the GPIO (only EDID I2C and CEC pin, but they are used for joysticks in the example, so I don't see that as a problem). In fact there are even more:Code:Bank 0: 8 Pins: 4x GPIO, 4x Missing on GPIO: SD-CardBank 1: 9 Pins: 7x GPIO, 2x Missing on GPIO: UART to USBBank 2: 4 Pins: 0x GPIO, 4x Missing on GPIO: JTAGBank 3: 17 Pins: 8x GPIO, 9x Missing on GPIO: 6x Flash, 2x Button, 1x Test point(Reset?)Bank 4: 8 Pins: 2x GPIO, 6x Missing on GPIO: HDMIBank 5: 10 Pins: 7x GPIO, 3x Missing on GPIO: 2x HDMI, 1x LCDBank 6: 9 Pins: 6x GPIO, 3x Missing on GPIO: External PLLBank 7: 1 Pins: 0x GPIO, 1x Missing on GPIO: System ClockThe 4 pins on the SD-Card, the button pins and the one to the LCD could be used as GPIOs as well (the buttons have 1k pull-down, you may have to remove those resistors). The tang nano 9k has more pins, but it's too slow for 40 MHz at 32 bit (that's 160MB/s) on it's HDMI output: 102 MB/s on Tang Nano 9K, 184 MB/s on Tang Nano 20K according to the slides of Steve Markgraf.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 12, 2024, 06:59:55 pm
content: Maybe thunderscope is interesting for you.It's based around some ADC's (with analog frontend) and an FPGA and is apparently able to stream a lot of data over an USB-C bus.https://hackaday.com/2024/09/11/supercon-2023-aleksa-bjelogrlic-dives-into-circuits-that-measure-circuits/40MHz * 32 bits = 1.280Gbps That's a lot of data. Thunderscope is quite quick but I have not verified if it can sustain that datarate.