Skip to content

Commit

Permalink
Merge pull request #559 from Alasdair/vext_undefined_refactor3
Browse files Browse the repository at this point in the history
Further vector refactoring and updates
  • Loading branch information
Timmmm authored Sep 24, 2024
2 parents 5a841c9 + 7636462 commit b3ca3a8
Show file tree
Hide file tree
Showing 14 changed files with 309 additions and 310 deletions.
2 changes: 1 addition & 1 deletion model/riscv_insts_dext.sail
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ function haveDoubleFPU() -> bool = extensionEnabled(Ext_D) | extensionEnabled(Ex

/* RV32Zdinx requires even register pairs; can be omitted for code */
/* not used for RV32Zdinx (i.e. RV64-only or D-only). */
val validDoubleRegs : forall 'n, 'n > 0. (implicit('n), vector('n, dec, regidx)) -> bool
val validDoubleRegs : forall 'n, 'n > 0. (implicit('n), vector('n, regidx)) -> bool
function validDoubleRegs(n, regs) = {
if extensionEnabled(Ext_Zdinx) & sizeof(xlen) == 32 then
foreach (i from 0 to (n - 1))
Expand Down
224 changes: 112 additions & 112 deletions model/riscv_insts_vext_arith.sail

Large diffs are not rendered by default.

112 changes: 56 additions & 56 deletions model/riscv_insts_vext_fp.sail
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ function clause execute(FVVTYPE(funct6, vm, vs2, vs1, vd)) = {
let 'n = num_elem;
let 'm = SEW;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vs1_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs1);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vs1_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs1);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);

let (initial_result, mask) = init_masked_result(num_elem, SEW, LMUL_pow, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -116,10 +116,10 @@ function clause execute(FVVMATYPE(funct6, vm, vs2, vs1, vd)) = {
let 'n = num_elem;
let 'm = SEW;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vs1_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs1);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vs1_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs1);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);

let (initial_result, mask) = init_masked_result(num_elem, SEW, LMUL_pow, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -188,10 +188,10 @@ function clause execute(FWVVTYPE(funct6, vm, vs2, vs1, vd)) = {
let 'm = SEW;
let 'o = SEW_widen;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vd_val : vector('n, dec, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);
let vs1_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs1);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vd_val : vector('n, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);
let vs1_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs1);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);

let (initial_result, mask) = init_masked_result(num_elem, SEW_widen, LMUL_pow_widen, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -252,10 +252,10 @@ function clause execute(FWVVMATYPE(funct6, vm, vs1, vs2, vd)) = {
let 'm = SEW;
let 'o = SEW_widen;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vd_val : vector('n, dec, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);
let vs1_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs1);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vd_val : vector('n, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);
let vs1_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs1);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);

let (initial_result, mask) = init_masked_result(num_elem, SEW_widen, LMUL_pow_widen, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -314,10 +314,10 @@ function clause execute(FWVTYPE(funct6, vm, vs2, vs1, vd)) = {
let 'm = SEW;
let 'o = SEW_widen;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vd_val : vector('n, dec, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);
let vs1_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs1);
let vs2_val : vector('n, dec, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vs2);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vd_val : vector('n, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);
let vs1_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs1);
let vs2_val : vector('n, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vs2);

let (initial_result, mask) = init_masked_result(num_elem, SEW_widen, LMUL_pow_widen, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -371,9 +371,9 @@ function clause execute(VFUNARY0(vm, vs2, vfunary0, vd)) = {
let 'n = num_elem;
let 'm = SEW;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);

let (initial_result, mask) = init_masked_result(num_elem, SEW, LMUL_pow, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -489,9 +489,9 @@ function clause execute(VFWUNARY0(vm, vs2, vfwunary0, vd)) = {
let 'm = SEW;
let 'o = SEW_widen;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, dec, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);

let (initial_result, mask) = init_masked_result(num_elem, SEW_widen, LMUL_pow_widen, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -618,9 +618,9 @@ function clause execute(VFNUNARY0(vm, vs2, vfnunary0, vd)) = {
let 'm = SEW;
let 'o = SEW_widen;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vs2_val : vector('n, dec, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vs2);
let vd_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vs2_val : vector('n, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vs2);
let vd_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);

let (initial_result, mask) = init_masked_result(num_elem, SEW, LMUL_pow, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -748,9 +748,9 @@ function clause execute(VFUNARY1(vm, vs2, vfunary1, vd)) = {
let 'n = num_elem;
let 'm = SEW;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);

let (initial_result, mask) = init_masked_result(num_elem, SEW, LMUL_pow, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -823,7 +823,7 @@ function clause execute(VFMVFS(vs2, rd)) = {
let 'n = num_elem;
let 'm = SEW;

let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, 0, vs2);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, 0, vs2);
match 'm {
16 => F_H(rd) = vs2_val[0],
32 => F_S(rd) = vs2_val[0],
Expand Down Expand Up @@ -871,10 +871,10 @@ function clause execute(FVFTYPE(funct6, vm, vs2, rs1, vd)) = {
let 'n = num_elem;
let 'm = SEW;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let rs1_val : bits('m) = get_scalar_fp(rs1, 'm);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);

let (initial_result, mask) = init_masked_result(num_elem, SEW, LMUL_pow, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -960,10 +960,10 @@ function clause execute(FVFMATYPE(funct6, vm, vs2, rs1, vd)) = {
let 'n = num_elem;
let 'm = SEW;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let rs1_val : bits('m) = get_scalar_fp(rs1, 'm);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);

let (initial_result, mask) = init_masked_result(num_elem, SEW, LMUL_pow, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -1031,10 +1031,10 @@ function clause execute(FWVFTYPE(funct6, vm, vs2, rs1, vd)) = {
let 'm = SEW;
let 'o = SEW_widen;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vd_val : vector('n, dec, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vd_val : vector('n, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);
let rs1_val : bits('m) = get_scalar_fp(rs1, 'm);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);

let (initial_result, mask) = init_masked_result(num_elem, SEW_widen, LMUL_pow_widen, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -1094,10 +1094,10 @@ function clause execute(FWVFMATYPE(funct6, vm, rs1, vs2, vd)) = {
let 'm = SEW;
let 'o = SEW_widen;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vd_val : vector('n, dec, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vd_val : vector('n, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);
let rs1_val : bits('m) = get_scalar_fp(rs1, 'm);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);

let (initial_result, mask) = init_masked_result(num_elem, SEW_widen, LMUL_pow_widen, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -1155,10 +1155,10 @@ function clause execute(FWFTYPE(funct6, vm, vs2, rs1, vd)) = {
let 'm = SEW;
let 'o = SEW_widen;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vd_val : vector('n, dec, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vd_val : vector('n, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vd);
let rs1_val : bits('m) = get_scalar_fp(rs1, 'm);
let vs2_val : vector('n, dec, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vs2);
let vs2_val : vector('n, bits('o)) = read_vreg(num_elem, SEW_widen, LMUL_pow_widen, vs2);

let (initial_result, mask) = init_masked_result(num_elem, SEW_widen, LMUL_pow_widen, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -1207,11 +1207,11 @@ function clause execute(VFMERGE(vs2, rs1, vd)) = {
let 'n = num_elem;
let 'm = SEW;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, 0b0, 0b00000);
let vm_val : vector('n, bool) = read_vmask(num_elem, 0b0, 0b00000);
let rs1_val : bits('m) = get_scalar_fp(rs1, 'm);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);
var result : vector('n, dec, bits('m)) = vector_init(zeros());
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);
var result : vector('n, bits('m)) = vector_init(zeros());

let tail_ag : agtype = get_vtype_vta();
foreach (i from 0 to (num_elem - 1)) {
Expand Down Expand Up @@ -1256,8 +1256,8 @@ function clause execute(VFMV(rs1, vd)) = {
let 'm = SEW;

let rs1_val : bits('m) = get_scalar_fp(rs1, 'm);
let vm_val : vector('n, dec, bool) = read_vmask(num_elem, 0b1, 0b00000);
let vd_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);
let vm_val : vector('n, bool) = read_vmask(num_elem, 0b1, 0b00000);
let vd_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vd);

let (initial_result, mask) = init_masked_result(num_elem, SEW, LMUL_pow, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -1291,9 +1291,9 @@ function clause execute(VFMVSF(rs1, vd)) = {
let 'n = num_elem;
let 'm = SEW;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, 0b1, 0b00000);
let vm_val : vector('n, bool) = read_vmask(num_elem, 0b1, 0b00000);
let rs1_val : bits('m) = get_scalar_fp(rs1, 'm);
let vd_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, 0, vd);
let vd_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, 0, vd);

let (initial_result, mask) = init_masked_result(num_elem, SEW, 0, vd_val, vm_val);
var result = initial_result;
Expand Down
16 changes: 8 additions & 8 deletions model/riscv_insts_vext_fp_red.sail
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ function process_rfvv_single(funct6, vm, vs2, vs1, vd, num_elem_vs, SEW, LMUL_po
let 'd = num_elem_vd;
let 'm = SEW;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem_vs, vm, 0b00000);
let vd_val : vector('d, dec, bits('m)) = read_vreg(num_elem_vd, SEW, 0, vd);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem_vs, SEW, LMUL_pow, vs2);
let mask : vector('n, dec, bool) = init_masked_source(num_elem_vs, LMUL_pow, vm_val);
let vm_val : vector('n, bool) = read_vmask(num_elem_vs, vm, 0b00000);
let vd_val : vector('d, bits('m)) = read_vreg(num_elem_vd, SEW, 0, vd);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem_vs, SEW, LMUL_pow, vs2);
let mask : vector('n, bool) = init_masked_source(num_elem_vs, LMUL_pow, vm_val);

var sum : bits('m) = read_single_element(SEW, 0, vs1); /* vs1 regardless of LMUL setting */
foreach (i from 0 to (num_elem_vs - 1)) {
Expand Down Expand Up @@ -83,10 +83,10 @@ function process_rfvv_widen(funct6, vm, vs2, vs1, vd, num_elem_vs, SEW, LMUL_pow
let 'm = SEW;
let 'o = SEW_widen;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem_vs, vm, 0b00000);
let vd_val : vector('d, dec, bits('o)) = read_vreg(num_elem_vd, SEW_widen, 0, vd);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem_vs, SEW, LMUL_pow, vs2);
let mask : vector('n, dec, bool) = init_masked_source(num_elem_vs, LMUL_pow, vm_val);
let vm_val : vector('n, bool) = read_vmask(num_elem_vs, vm, 0b00000);
let vd_val : vector('d, bits('o)) = read_vreg(num_elem_vd, SEW_widen, 0, vd);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem_vs, SEW, LMUL_pow, vs2);
let mask : vector('n, bool) = init_masked_source(num_elem_vs, LMUL_pow, vm_val);

var sum : bits('o) = read_single_element(SEW_widen, 0, vs1); /* vs1 regardless of LMUL setting */
foreach (i from 0 to (num_elem_vs - 1)) {
Expand Down
4 changes: 2 additions & 2 deletions model/riscv_insts_vext_fp_utils.sail
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ function rsqrt7 (v, sub) = {
64 => (zero_extend(64, v[51 .. 0]), zero_extend(64, v[62 .. 52]), [v[63]], 11, 52)
};
assert(s == 10 & e == 5 | s == 23 & e == 8 | s == 52 & e == 11);
let table : vector(128, dec, int) = [
let table : vector(128, int) = [
52, 51, 50, 48, 47, 46, 44, 43,
42, 41, 40, 39, 38, 36, 35, 34,
33, 32, 31, 30, 30, 29, 28, 27,
Expand Down Expand Up @@ -560,7 +560,7 @@ function recip7 (v, rm_3b, sub) = {
64 => (zero_extend(64, v[51 .. 0]), zero_extend(64, v[62 .. 52]), [v[63]], 11, 52)
};
assert(s == 10 & e == 5 | s == 23 & e == 8 | s == 52 & e == 11);
let table : vector(128, dec, int) = [
let table : vector(128, int) = [
127, 125, 123, 121, 119, 117, 116, 114,
112, 110, 109, 107, 105, 104, 102, 100,
99, 97, 96, 94, 93, 91, 90, 88,
Expand Down
14 changes: 7 additions & 7 deletions model/riscv_insts_vext_fp_vm.sail
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ function clause execute(FVVMTYPE(funct6, vm, vs2, vs1, vd)) = {
let 'n = num_elem;
let 'm = SEW;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vs1_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs1);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, dec, bool) = read_vmask(num_elem, 0b0, vd);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let vs1_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs1);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, bool) = read_vmask(num_elem, 0b0, vd);

let (initial_result, mask) = init_masked_result_cmp(num_elem, SEW, LMUL_pow, vd_val, vm_val);
var result = initial_result;
Expand Down Expand Up @@ -100,10 +100,10 @@ function clause execute(FVFMTYPE(funct6, vm, vs2, rs1, vd)) = {
let 'n = num_elem;
let 'm = SEW;

let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000);
let vm_val : vector('n, bool) = read_vmask(num_elem, vm, 0b00000);
let rs1_val : bits('m) = get_scalar_fp(rs1, 'm);
let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, dec, bool) = read_vmask(num_elem, 0b0, vd);
let vs2_val : vector('n, bits('m)) = read_vreg(num_elem, SEW, LMUL_pow, vs2);
let vd_val : vector('n, bool) = read_vmask(num_elem, 0b0, vd);

let (initial_result, mask) = init_masked_result_cmp(num_elem, SEW, LMUL_pow, vd_val, vm_val);
var result = initial_result;
Expand Down
Loading

0 comments on commit b3ca3a8

Please sign in to comment.