Ada on FPGAs with PicoRV32
blog.adacore.com
Ada on FPGAs with PicoRV32
1–7 of 7 posts
Re: Ada on FPGAs with PicoRV32
#2Has anyone worked with Ada or deployed it in a real product? How does it compare to "microcontroller C" with no strings and statically declared memory?
Re: Ada on FPGAs with PicoRV32
#3I'd like to use Ada for an embedded project, but I've got a few concerns - that development time would be considerably longer, that finding other people able to maintain the codebase would be hard, and that the resulting code would be considerably less performant than equivalent C. Has anyone worked with Ada or deployed it in a real product? How does it compare to "microcontroller C" with no strings and statically de…
I would not expect dev time to be longer, except for the initial learning as such/onboarding.
My reasons are apparently quite a bit more ambitious than yours though, so it's hard to compare.
The cases where I'd go for the hassle that non-standard tooling is, allow large gains from deep static analysis/formal proving of limits due to foregoing conservative, non-adaptive hardware limits. A C-version would look like seL4, including the proofs. I'd try Ada/SPARK for it automating a lot of it away and having specific features to support this "lock elision" use of software verification.
Re: Ada on FPGAs with PicoRV32
#4I'd like to use Ada for an embedded project, but I've got a few concerns - that development time would be considerably longer, that finding other people able to maintain the codebase would be hard, and that the resulting code would be considerably less performant than equivalent C. Has anyone worked with Ada or deployed it in a real product? How does it compare to "microcontroller C" with no strings and statically de…
Re: Ada on FPGAs with PicoRV32
#5I just started getting into FPGAa and Verilog, so I appreciate these kinds of writeups.
Thank you.
Re: Ada on FPGAs with PicoRV32
#6I'd like to use Ada for an embedded project, but I've got a few concerns - that development time would be considerably longer, that finding other people able to maintain the codebase would be hard, and that the resulting code would be considerably less performant than equivalent C. Has anyone worked with Ada or deployed it in a real product? How does it compare to "microcontroller C" with no strings and statically de…
Re: Ada on FPGAs with PicoRV32
#7I'd like to use Ada for an embedded project, but I've got a few concerns - that development time would be considerably longer, that finding other people able to maintain the codebase would be hard, and that the resulting code would be considerably less performant than equivalent C. Has anyone worked with Ada or deployed it in a real product? How does it compare to "microcontroller C" with no strings and statically de…
> that development time would be considerably longer
It really depends on how good the support for the platform you're working on. If it is well-supported / documented, then you'll be at least as fast as with C.
> that finding other people able to maintain the codebase would be hard
Eh, it's a pretty straightforward language, and anybody reasonably talented (which most embedded programmers certainly are) should be able to maintian it without difficulty.
> and that the resulting code would be considerably less performant than equivalent C.
Definitely not the case. Ada is basically a bare metal language (notably, no garbage collector), so it is very performant, and just as easy to reason about performance and underlying assembly code as C. There are some runtime checks that are enabled by default (e.g. bounds checking) which contribute to slightly slower performance, but these can be easily disabled if needed.
> How does it compare to "microcontroller C" with no strings and statically declared memory?
It's basically the same, but with far fewer "gotchas" to trip you up, but stricter typing and nicer semantics, together with a pascalesque syntax (more english like, without curly brackets, which you may or may not like). I've only ever used it with statically declared memory (although it does have features like memory pools which reportedly make managing heap-allocated objects easier).