Skip to content

Commit

Permalink
Rename ext_write_fcsr
Browse files Browse the repository at this point in the history
  • Loading branch information
jordancarlin committed Oct 16, 2024
1 parent 2ecc81b commit 266607e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions model/riscv_fdext_control.sail
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ function clause read_CSR (0x001) = zero_extend(fcsr[FFLAGS])
function clause read_CSR (0x002) = zero_extend(fcsr[FRM])
function clause read_CSR (0x003) = zero_extend(fcsr.bits)

function clause write_CSR (0x001, value) = { ext_write_fcsr(fcsr[FRM], value[4..0]); zero_extend(fcsr[FFLAGS]) }
function clause write_CSR (0x002, value) = { ext_write_fcsr(value[2..0], fcsr[FFLAGS]); zero_extend(fcsr[FRM]) }
function clause write_CSR (0x003, value) = { ext_write_fcsr(value[7..5], value[4..0]); zero_extend(fcsr.bits) }
function clause write_CSR (0x001, value) = { write_fcsr(fcsr[FRM], value[4..0]); zero_extend(fcsr[FFLAGS]) }
function clause write_CSR (0x002, value) = { write_fcsr(value[2..0], fcsr[FFLAGS]); zero_extend(fcsr[FRM]) }
function clause write_CSR (0x003, value) = { write_fcsr(value[7..5], value[4..0]); zero_extend(fcsr.bits) }

/* **************************************************************** */
4 changes: 2 additions & 2 deletions model/riscv_fdext_regs.sail
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ bitfield Fcsr : bits(32) = {

register fcsr : Fcsr

val ext_write_fcsr : (bits(3), bits(5)) -> unit
function ext_write_fcsr (frm, fflags) = {
val write_fcsr : (bits(3), bits(5)) -> unit
function write_fcsr (frm, fflags) = {
fcsr[FRM] = frm; /* Note: frm can be an illegal value, 101, 110, 111 */
fcsr[FFLAGS] = fflags;
dirty_fd_context_if_present();
Expand Down

0 comments on commit 266607e

Please sign in to comment.