3 ms·
If anyone is interested in using C# on a FPGA to learn take a look at https://hastlayer.com/project https://hastlayer.com/project
by jayonsoftware 8y ago
If anyone is interested in using C# on a FPGA to learn take a look at https://hastlayer.com/project https://hastlayer.com/project
- monocasa 8y agoWow, someone managed to make something even worse than the "compile your C to an FPGA" tools you see occasionally. The model is just too different for these things to make sense 99% of the time. It's like trying to run general purpose code on a GPU, but even worse.
- __jal 8y agoWhy would anyone in their right mind try (or even want to try, except as a lark) this? "...The input of Hastlayer can be a program written in dozens of programming languages (including several of the most popular ones as C#, C++, Python, PHP..."
- londons_explore 8y agoFor those of you missing context to understand why it's a bad idea... Typical programming languages run code one line at a time from the top to the bottom, occasionally calling functions or looping. FPGA's instead have code which specifies a kind of circuit diagram of what is connected to what. You can make something to translate one to the other, but by translating a programming language to a circuit diagram you usually end up bits of creating circuitry for each line of code, and then extra circuitry which makes each bit be activated in sequence. That typically leaves 99.9% of the circuitry unused (deactivated) at any point in time. FPGA's don't have much space for circuitry, so by translating a program from C to an FPGA directly you'll usually end up with a huge design with a very low throughput, since the vast majority of the circuit is sitting idle most of the time. Real FPGA designs will typically aim to use circuitry very sparingly, and keep as much of it in use as possible all the time to get maximal performance. Complex, sequential and non-performance critical tasks are typically not a good fit for an FPGA and are usually offloaded to a programmable processor instead.
- aninhumer 8y agoYeah, I don't understand why so many people keep trying to write control-flow to FPGA compilers. The only way these things are going to be practical is if you understand how both FPGAs and the compiler work really well, and then write control-flow code in a really specific way that the compiler can handle. At which point you'd be better off using a tool that can model what you want directly. The more useful way to write hardware using programming languages is to create a model of hardware and then use the language features to manipulate that model, and use it to create abstractions for actual hardware patterns.
- phendrenad2 8y agoWait until you see the python-to-FPGA tool :P