Closed quite closed 2 years ago
@secworks I tried building with ENABLE_DIV=1
, result is this increased device utilisation, from:
Info: ICESTORM_LC: 4446/ 5280 84%
to
Info: ICESTORM_LC: 5189/ 5280 98%
Maybe this is not great at all, considering that the space might be needed for other things, like a blake2 in hw? Or what else we've had on the table.
Maybe we can just avoid DIV/REM being used? If so, then eating up more space in the FPGA seems like really bad idea. In this case, would it be fine for now to check for DIV/REM in the final ELF, and fail if they are present? And once we get onto clang 16 (or what is needed), we can benefit from Zmmul extension.
Ah yes, we should try to use a DIV and see what happens, crash or not?
@secworks I tried building with
ENABLE_DIV=1
, result is this increased device utilisation, from:Info: ICESTORM_LC: 4446/ 5280 84%
to
Info: ICESTORM_LC: 5189/ 5280 98%
Maybe this is not great at all, considering that the space might be needed for other things, like a blake2 in hw? Or what else we've had on the table.
Interesting, I don't see the change in utilization when I enable DIV (which I expect to get).
To answer the the use of resources - if apps crash when using a div instruction that would make this a high priority, and thus a good use of resources. As long as we get good clock frequency with 98% fill rate I would be happy. I don't see any things more important to add right now.
Blake2s in HW will require more resources that we have as it is before enabling DIV.
@bjoto wrote:
Thank you. We currently use clang 14 and it does not have
Zmmul
, checked withllc -march=riscv32 -mcpu=help |& grep -i zmmul
. For catching this early and right now we could dollvm-objdump | grep (div|rem)
or "look into the exception handling of illegal instruction in picorv32... maybe it's possible to trap and blink the leds aggresively!"