powdr-labs / powdr

A modular stack for zkVMs, with a focus on productivity, security and performance.
Apache License 2.0
416 stars 82 forks source link

Open-source CPU targets #1695

Open taqtiqa-mark opened 3 months ago

taqtiqa-mark commented 3 months ago

Are any of the following open-source CPUs targets for powdr?

Specifically, should I ever expect that powdr will run on, say, the Berkeley/SiFive Rocket rv32ima, etc

leonardoalt commented 3 months ago

Hi @taqtiqa-mark !

I'm personally not familiar with those specific variants, but if you can generate LLVM assembly (AT&T asm syntax) using rv32imac ISAs our powdr-rs crate should be able to compile it to powdr-IR using the asm input.

As I see in the script you linked, it looks like it also generates a rv32ima ELF. Although our ELF frontend only supports rv32im, it's in general possible to remove the atomic instructions by using passes=loweratomic.

It'd be great to have a look at any specific assembly or ELF files you're interested in, otherwise we can have a look ourselves at some point (it'll just take a bit longer).