neorv32 icon indicating copy to clipboard operation
neorv32 copied to clipboard

feature request - Zb* sub-extensions

Open biosbob opened this issue 1 year ago • 3 comments

the Zbc sub-extension (carry-less multiplication) is quite different from the other sub-extensions, which really do "bit manipulation" in the more traditional sense...

not critical, but it might be helpful to enable the Zb* sub-extensions individual -- as this also has impact on the overall size of the synthesized core....

a placeholder for the future....

biosbob avatar Jun 28 '23 03:06 biosbob

~For the records: this is being discussed in https://github.com/stnolting/neorv32/issues/633#issuecomment-1604684303~

stnolting avatar Jun 30 '23 05:06 stnolting

#633 talks about the Zc* sub-extensions; this issue concerns the Zb* sub-extensions....

perhaps the data-sheet could not only list the extensions currently supported, but those on (or NOT on) the roadmap....

biosbob avatar Jun 30 '23 15:06 biosbob

Oh sorry, seems like I have mixed up something 😅

B vs. Zb* is something I need to take care of because the B extensions basically does not exist (anymore): https://github.com/riscv/riscv-bitmanip/issues/183

So we should replace CPU_EXTENSION_RISCV_B by several CPU_EXTENSION_RISCV_Zb* generics to fine tune the bitmanip extension. Actually, this fine-grained tuning is already implemented:

https://github.com/stnolting/neorv32/blob/a5bf1c822ff02482029f3aa93e8ca07e91a45a77/rtl/core/neorv32_cpu_cp_bitmanip.vhd#L74-L79

But theses switches are not propagated to the top nor to the control unit to check for legal/illegal instructions.

stnolting avatar Jun 30 '23 16:06 stnolting

The B ISA extension has been ratified in April 2024 (https://wiki.riscv.org/display/HOME/Ratified+Extensions). It consists of the Zba, Zbb and Zbs sub-extensions, which is/are implemented by the core (see https://github.com/stnolting/neorv32/pull/869). So I think this can be closed now.

stnolting avatar May 28 '24 15:05 stnolting