Skip to content

Commit

Permalink
replace vxrm with vcsr[vxrm]
Browse files Browse the repository at this point in the history
  • Loading branch information
Yui5427 committed Sep 28, 2024
1 parent 28bd3be commit ad450e9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion model/riscv_insts_zicsr.sail
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function clause write_CSR(0x015, value) = write_seed_csr()
/* vector */
function clause write_CSR(0x008, value) = { let vstart_length = get_vlen_pow(); vstart = zero_extend(16, value[(vstart_length - 1) .. 0]); zero_extend(vstart) }
function clause write_CSR(0x009, value) = { vxsat = value[0 .. 0]; zero_extend(vxsat) }
function clause write_CSR(0x00A, value) = { vxrm = value[1 .. 0]; zero_extend(vxrm) }
function clause write_CSR(0x00A, value) = { vcsr[vxrm] = value[1 .. 0]; zero_extend(vcsr[vxrm]) }
function clause write_CSR(0x00F, value) = { vcsr.bits = value[2 ..0]; zero_extend(vcsr.bits) }
function clause write_CSR(0xC20, value) = { vl = value; vl }
function clause write_CSR(0xC21, value) = { vtype.bits = value; vtype.bits }
Expand Down
1 change: 0 additions & 1 deletion model/riscv_sys_control.sail
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,6 @@ function init_sys() -> unit = {
*/
vstart = zero_extend(0b0);
vxsat = 0b0;
vcsr[] = vxrm;
vcsr[vxsat] = vxsat;
vl = zero_extend(0b0);
vtype[vill] = 0b1;
Expand Down

0 comments on commit ad450e9

Please sign in to comment.