|
1 | 1 | # NEORV32 Bit-Manipulation `B` Extension
|
2 | 2 |
|
3 |
| -:warning: The RISC-V bit-manipulation extension is frozen but not yet officially ratified. |
| 3 | +The provided test program `main.c` verifies all currently implemented instruction by checking the |
| 4 | +results against a pure-software emulation model. The emulation functions as well as the available |
| 5 | +**intrinsics** for the sub-extension are located in `neorv32_b_extension_intrinsics.h`. |
4 | 6 |
|
5 |
| -:warning: The NEORV32 bit manipulation extensions `B` only supports the `Zbb` and `Zba` sub-extension |
6 |
| -(basic bit-manipulation operation) yet. |
| 7 | +:information_source: See the according section of the NEORV32 data sheet for more information. |
7 | 8 |
|
8 |
| -The provided test program `main.c` verifies all currently implemented instruction by checking the results against a pure-software emulation model. |
9 |
| -The emulation functions as well as the available **intrinsics** for the sub-extension are located in `neorv32_b_extension_intrinsics.h`. |
10 | 9 |
|
11 |
| -:information_source: More information regarding the RISC-V bit manipulation extension can be found in the officail GitHub repo: |
12 |
| -[github.com/riscv/riscv-bitmanip](https://github.com/riscv/riscv-bitmanip). |
13 |
| -The specification of the bit-manipulation spec supported by the NEORV32 can be found in `docs/references/bitmanip-draft.pdf`. |
| 10 | +## Exemplary Test Output |
| 11 | + |
| 12 | +``` |
| 13 | +<<< NEORV32 Bit-Manipulation Extension ('B') Test >>> |
| 14 | +
|
| 15 | +Starting bit-manipulation extension tests (1000000 test cases per instruction)... |
| 16 | +
|
| 17 | +-------------------------------------------- |
| 18 | +Zbb - Basic bit-manipulation instructions |
| 19 | +-------------------------------------------- |
| 20 | +
|
| 21 | +ANDN: |
| 22 | +Errors: 0/1000000 [ok] |
| 23 | +
|
| 24 | +ORN: |
| 25 | +Errors: 0/1000000 [ok] |
| 26 | +
|
| 27 | +XNOR: |
| 28 | +Errors: 0/1000000 [ok] |
| 29 | +
|
| 30 | +CLZ: |
| 31 | +Errors: 0/1000000 [ok] |
| 32 | +
|
| 33 | +CTZ: |
| 34 | +Errors: 0/1000000 [ok] |
| 35 | +
|
| 36 | +CPOP: |
| 37 | +Errors: 0/1000000 [ok] |
| 38 | +
|
| 39 | +MAX: |
| 40 | +Errors: 0/1000000 [ok] |
| 41 | +
|
| 42 | +MAXU: |
| 43 | +Errors: 0/1000000 [ok] |
| 44 | +
|
| 45 | +MIN: |
| 46 | +Errors: 0/1000000 [ok] |
| 47 | +
|
| 48 | +MINU: |
| 49 | +Errors: 0/1000000 [ok] |
| 50 | +
|
| 51 | +SEXT.B: |
| 52 | +Errors: 0/1000000 [ok] |
| 53 | +
|
| 54 | +SEXT.H: |
| 55 | +Errors: 0/1000000 [ok] |
| 56 | +
|
| 57 | +ZEXT.H: |
| 58 | +Errors: 0/1000000 [ok] |
| 59 | +
|
| 60 | +ROL: |
| 61 | +Errors: 0/1000000 [ok] |
| 62 | +
|
| 63 | +ROR: |
| 64 | +Errors: 0/1000000 [ok] |
| 65 | +
|
| 66 | +RORI (imm=20): |
| 67 | +Errors: 0/1000000 [ok] |
| 68 | +
|
| 69 | +ORCB: |
| 70 | +Errors: 0/1000000 [ok] |
| 71 | +
|
| 72 | +REV8: |
| 73 | +Errors: 0/1000000 [ok] |
| 74 | +
|
| 75 | +
|
| 76 | +-------------------------------------------- |
| 77 | +Zba - Address-generation instructions |
| 78 | +-------------------------------------------- |
| 79 | +
|
| 80 | +SH1ADD: |
| 81 | +Errors: 0/1000000 [ok] |
| 82 | +
|
| 83 | +SH2ADD: |
| 84 | +Errors: 0/1000000 [ok] |
| 85 | +
|
| 86 | +SH3ADD: |
| 87 | +Errors: 0/1000000 [ok] |
| 88 | +
|
| 89 | +
|
| 90 | +-------------------------------------------- |
| 91 | +Zbs - Single-bit instructions |
| 92 | +-------------------------------------------- |
| 93 | +
|
| 94 | +BCLR: |
| 95 | +Errors: 0/1000000 [ok] |
| 96 | +
|
| 97 | +BCLRI (imm=20): |
| 98 | +Errors: 0/1000000 [ok] |
| 99 | +
|
| 100 | +BEXT: |
| 101 | +Errors: 0/1000000 [ok] |
| 102 | +
|
| 103 | +BEXTI (imm=20): |
| 104 | +Errors: 0/1000000 [ok] |
| 105 | +
|
| 106 | +BINV: |
| 107 | +Errors: 0/1000000 [ok] |
| 108 | +
|
| 109 | +BINVI (imm=20): |
| 110 | +Errors: 0/1000000 [ok] |
| 111 | +
|
| 112 | +BSET: |
| 113 | +Errors: 0/1000000 [ok] |
| 114 | +
|
| 115 | +BSETI (imm=20): |
| 116 | +Errors: 0/1000000 [ok] |
| 117 | +
|
| 118 | +
|
| 119 | +-------------------------------------------- |
| 120 | +Zbc - Carry-less multiplication instructions |
| 121 | +-------------------------------------------- |
| 122 | +
|
| 123 | +NOTE: The emulation functions will take quite some time to execute. |
| 124 | +
|
| 125 | +CLMUL: |
| 126 | +Errors: 0/1000000 [ok] |
| 127 | +
|
| 128 | +CLMULH: |
| 129 | +Errors: 0/1000000 [ok] |
| 130 | +
|
| 131 | +CLMULR: |
| 132 | +Errors: 0/1000000 [ok] |
| 133 | +
|
| 134 | +
|
| 135 | +B extension tests completed. |
| 136 | +``` |
0 commit comments