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 Feb 7, 2024
1 parent 4de2bff commit bc35e3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions model/riscv_sys_control.sail
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,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] = 0b1; /* Bit-manipulation */
misa[I] = 0b1; /* base integer ISA */
misa[M] = 0b1; /* integer multiply/divide */
misa[U] = 0b1; /* user-mode */
Expand Down
1 change: 1 addition & 0 deletions model/riscv_sys_regs.sail
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ function legalize_misa(m : Misa, v : xlenbits) -> Misa = {
/* we currently don't model 'E', so always assume 'I'. */
function haveAtomics() -> bool = misa[A] == 0b1
function haveRVC() -> bool = misa[C] == 0b1
function haveBExt() -> bool = misa[B] == 0b1
function haveMulDiv() -> bool = misa[M] == 0b1
function haveSupMode() -> bool = misa[S] == 0b1
function haveUsrMode() -> bool = misa[U] == 0b1
Expand Down

0 comments on commit bc35e3a

Please sign in to comment.