tillitis / tillitis-key1

Board designs, FPGA verilog, firmware for TKey, the flexible and open USB security key 🔑
https://www.tillitis.se
400 stars 26 forks source link

Move to the zmmul subset of the RISC-V M extensions #23

Closed quite closed 1 year ago

quite commented 2 years ago

This will allow us to bring in the PicoRV32 with ENABLE_DIV=0, and use the freed resources in the FPGA for other things.

This will require clang-15. Is this sensible to do until Ubuntu 22.04 LTS gets clang-15 -- will it get it?

mchack-work commented 2 years ago

For Debian packages (also usable in Ubuntu) of clang one can use https://apt.llvm.org/ but of course requires that you trust another package repo. Might want to wait until at least Ubuntu gets it.

quite commented 1 year ago

May be helpful: https://github.com/riscv/riscv-isa-manual/issues/869

quite commented 1 year ago

The correct -march seems to be -march=rv32iczmmul. I have tried adding a DIV in our inline asm. With imc it compiles, with iczmmul clang complains that it needs 'M'.

Do we need a test with C code that really produces a DIV on imc, but not on iczmmul?

mchack-work commented 1 year ago

Zmmul changes to firmware and apps merged.