News for hackers. Stuff that matters.
Re:I decided to build a nine-bit computer by PragmaticPulp on Wednesday February 09, 2022 @10:22AM (#30273626)
Basically anything with significant real-time requirements or high bandwidth requires an external FPGA or microcontroller.

Embedded Linux is great, but if you’re trying to do something like read from a high-speed ADC then the only way to do it is with an FPGA. The FPGA reads from the ADC at precise intervals and buffers the data. The embedded Linux system can then periodically read the buffer with all of the jitter and latencies that come with using Linux.

Virtually every Linux-based software defined radio, oscilloscope, and logic analyzer work on this architecture. For lower speeds you can get away with a microcontroller running bare metal code to do the buffering, but the high speed stuff enters the domain of FPGAs.

Re:I decided to build a nine-bit computer by coryrc on Wednesday February 09, 2022 @04:53PM (#30279090)
> read from a high-speed ADC

You just have the peripheral DMA and flag/interrupt when done. If you need an "immediate" reaction you use a DSP. There are only so many useful calculations you can do with a single input stream and DSP can handle them.

Re:I decided to build a nine-bit computer by andai on Wednesday February 09, 2022 @10:39AM (#30273900)
Noob question, in this instance would a realtime OS or a unikernel also solve the problem?
Re:I decided to build a nine-bit computer by tyingq on Wednesday February 09, 2022 @11:48AM (#30274832)
It's better, but still not the same level of timing guarantees. I suppose, left to right, you would have something like:

SBC/Linux -> SBC/Real-time OS -> General Purpose MCU -> Specialized MCU (Parallax Propeller, for example) -> FPGA/CPLD/DSP

With perhaps some additions to the diagram to account for bit-banging vs actual drivers, speeds where some portion of the left side just isn't fast enough to even kind-of work, slow clock MCUs vs fast clock MCUs, etc.

Re:I decided to build a nine-bit computer by sbierwagen on Wednesday February 09, 2022 @06:28PM (#30280269)
There are also some some hybrid SOCs, like TI's Sitara chips that the Beagleboard is built around, that have a ARM core for linux, then a couple MCU cores for doing fast-ish realtime stuff. (TI's FAQ says a four instruction busyloop that just toggles a pin can run at about 50MHz on a PRU)
Re:I decided to build a nine-bit computer by emteycz on Wednesday February 09, 2022 @01:46PM (#30276622)
The problem is, machine code is not the lowest level, there is also processor microcode. Machine code doesn't give you a hard real-time guarantee, the execution is still too approximate. FPGA enables you to work on/below the microcode level.