Skip to content

Commit

Permalink
Add unratified B extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ved-rivos committed Jun 13, 2024
1 parent ba35af5 commit 46bc941
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions model/riscv_sys_control.sail
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ function init_sys() -> unit = {
misa[MXL] = arch_to_bits(if sizeof(xlen) == 32 then RV32 else RV64);
misa[A] = 0b1; /* atomics */
misa[C] = bool_to_bits(sys_enable_rvc()); /* RVC */
misa[B] = bool_to_bits(haveBExt()); /* Bit-manipulation */
misa[I] = 0b1; /* base integer ISA */
misa[M] = 0b1; /* integer multiply/divide */
misa[U] = 0b1; /* user-mode */
Expand Down
7 changes: 4 additions & 3 deletions model/riscv_sys_regs.sail
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,11 @@ function haveNExt() -> bool = misa[N] == 0b1
/* see below for F and D (and Z*inx counterparts) extension tests */

/* BitManip extension support. */
function haveZba() -> bool = true
function haveZbb() -> bool = true
function haveBExt() -> bool = true
function haveZba() -> bool = true | haveBExt()
function haveZbb() -> bool = true | haveBExt()
function haveZbs() -> bool = true | haveBExt()
function haveZbc() -> bool = true
function haveZbs() -> bool = true

/* Zfa (additional FP) extension */
function haveZfa() -> bool = true
Expand Down

0 comments on commit 46bc941

Please sign in to comment.