Hacker News new | ask | show | jobs
by nonrandomstring 1006 days ago
Interesting that as well as speed, there's more to "transparency" than meets the eye. Thanks very much to you and the other commenters. So most of the FPGA tools are proprietary, as they were when I looked at them 10 years ago? Wonder why there is little FOSS movement.

I see there is a gap, between fun hobby projects like building a CPU from discrete gates on 10 breadboards, and an actual viable (but slow), microprocessor (and SBC) that can be totally audited and provably secure (at least to a good logician).

1 comments

Doing synthesis is easy. Making a fitter is a lot harder, but can be done. But making a really optimized fitter that handles all sorts of fabric-specific oddities, hits the highest Fmax, and critically, can be timing verified to guarantee timing closure at the target operating temp, that is very, very difficult.

Where the only real open toolchain (Yosys) fails hard is in hard IP blocks, and timing analysis. These are two critical parts of using modern FPGAs, and they require far more information than is ever documented anywhere. Without timing analysis you can't do timing driven synthesis, which is sort of like closing the control loop for optimizing the design.

Device support in Quartus for a simple FPGA family like the Cyclone 3/4/10LP (they are just die shrinks) takes several hundred megs. Most of that is in the timing model dbs. The rest lies in the hard IP models.

So, not that Yosys et al is not great work (outstanding really), but they can only really practically target the easiest low hanging fruit as it relates to FPGA compilation.

Finally, nobody uses softcore CPUs for any substantial processing. They are inefficient and waste precious fabric space. As an example, using up routing wiring for a softcore can negatively impact your Fmax on the rest of the design. As a rough guide, a cheap low end FPGA could run some simple arch like MIPS at maybe 150mhz with a tailwind, but that would quickly decrease if you were to do anything else useful with the FPGA. Higher end chips like the Intel 10 series could maybe hit 400 mhz or a bit more, so really not super impressive compared to dedicated silicon.

The one place you will typically see softcores are

1. System bring up in very large designs

2. Babysitting more complex IP blocks (DDRx ram controller calibration and register programming), HDMI/Display port IP clocking calculations and supervisions etc

3. Toy/research applications

It is virtually always cheaper and more practical to throw on a STM32 or any microcontroller that talks to the FPGA, and it is very rare to not have both in a system.

4) Custom accelerators.

For some HPC applications one can use high-performance cpu that includes wide vector units or other application-optimized cpu features. Or (for example) wire an FPGA to a CPU (for control / configuration) & network, and do the heavy lifting in the FPGA. Iirc there's even a few cpu's with embedded FPGA fabric inside.

As for OP's question: there also exist FPGAs with hard cpu cores included. But this would essentially replace [closed firmware blobs] with [proprietary FPGA design software]. Not to mention the job of implementing all required peripherals in the FPGA. Probably not a good deal...

If security / transparency is #1 concern, I'd go hunting for some hardware where open/source firmware is available for included peripherals. Maybe you won't find something 100% open that suits your needs. But with some research, probably close. And maybe you get lucky.