Fix load segment2 m2 test cases - set vl correctly - fix expected output pattern Because the impl is currently incorrect, the changed test cases now fail, and are temporarily marked as skipped before we have the fixes. Change-Id: Ibee12af3d6ae1eca16f59edfa2cc9aa9a1d4a13b
diff --git a/tests/cocotb/BUILD b/tests/cocotb/BUILD index 0b030d8..499258f 100644 --- a/tests/cocotb/BUILD +++ b/tests/cocotb/BUILD
@@ -187,9 +187,10 @@ "load8_segment2_unit_m1", "load16_segment2_unit_m1", "load32_segment2_unit_m1", - "load8_segment2_unit_m2", - "load16_segment2_unit_m2", - "load32_segment2_unit_m2", + # TODO(davidgao): re-enable once fixes are in. + # "load8_segment2_unit_m2", + # "load16_segment2_unit_m2", + # "load32_segment2_unit_m2", "load8_segment2_stride6_m1", "load16_segment2_stride6_m1", "load8_indexed_m1",
diff --git a/tests/cocotb/rvv/load_store/load16_segment2_unit_m2.cc b/tests/cocotb/rvv/load_store/load16_segment2_unit_m2.cc index 98c2c7b..68fab72 100644 --- a/tests/cocotb/rvv/load_store/load16_segment2_unit_m2.cc +++ b/tests/cocotb/rvv/load_store/load16_segment2_unit_m2.cc
@@ -21,7 +21,7 @@ __attribute__((used, retain)) void test_intrinsic(const uint16_t *x, uint16_t *y) { - vuint16m2x2_t v = __riscv_vlseg2e16_v_u16m2x2(in_buf, 32); + vuint16m2x2_t v = __riscv_vlseg2e16_v_u16m2x2(in_buf, 16); vuint16m4_t vv = __riscv_vcreate_v_u16m2_u16m4( __riscv_vget_v_u16m2x2_u16m2(v, 0),
diff --git a/tests/cocotb/rvv/load_store/load32_segment2_unit_m2.cc b/tests/cocotb/rvv/load_store/load32_segment2_unit_m2.cc index e88f774..5790e4f 100644 --- a/tests/cocotb/rvv/load_store/load32_segment2_unit_m2.cc +++ b/tests/cocotb/rvv/load_store/load32_segment2_unit_m2.cc
@@ -21,7 +21,7 @@ __attribute__((used, retain)) void test_intrinsic(const uint32_t *x, uint32_t *y) { - vuint32m2x2_t v = __riscv_vlseg2e32_v_u32m2x2(in_buf, 16); + vuint32m2x2_t v = __riscv_vlseg2e32_v_u32m2x2(in_buf, 8); vuint32m4_t vv = __riscv_vcreate_v_u32m2_u32m4( __riscv_vget_v_u32m2x2_u32m2(v, 0),
diff --git a/tests/cocotb/rvv/load_store/load8_segment2_unit_m2.cc b/tests/cocotb/rvv/load_store/load8_segment2_unit_m2.cc index 97da9ae..2f3a10f 100644 --- a/tests/cocotb/rvv/load_store/load8_segment2_unit_m2.cc +++ b/tests/cocotb/rvv/load_store/load8_segment2_unit_m2.cc
@@ -21,7 +21,7 @@ __attribute__((used, retain)) void test_intrinsic(const uint8_t *x, uint8_t *y) { - vuint8m2x2_t v = __riscv_vlseg2e8_v_u8m2x2(in_buf, 64); + auto v = __riscv_vlseg2e8_v_u8m2x2(in_buf, 32); vuint8m4_t vv = __riscv_vcreate_v_u8m2_u8m4( __riscv_vget_v_u8m2x2_u8m2(v, 0),
diff --git a/tests/cocotb/rvv_load_store_test.py b/tests/cocotb/rvv_load_store_test.py index 2f3f11a..6fb4963 100644 --- a/tests/cocotb/rvv_load_store_test.py +++ b/tests/cocotb/rvv_load_store_test.py
@@ -364,7 +364,8 @@ ) -@cocotb.test() +# TODO(davidgao): re-enable once fixes are in. +@cocotb.test(skip=True) async def load8_segment2_unit_m2(dut): await vector_load_store( dut=dut, @@ -372,12 +373,12 @@ dtype=np.uint8, in_size=128, out_size=128, - pattern=(list(range(0, 32, 2)) + list(range(1, 32, 2)) + - list(range(32, 64, 2)) + list(range(33, 64, 2))), + pattern=(list(range(0, 63, 2)) + list(range(1, 64, 2))), ) -@cocotb.test() +# TODO(davidgao): re-enable once fixes are in. +@cocotb.test(skip=True) async def load16_segment2_unit_m2(dut): await vector_load_store( dut=dut, @@ -385,12 +386,12 @@ dtype=np.uint16, in_size=64, out_size=64, - pattern=(list(range(0, 16, 2)) + list(range(1, 16, 2)) + - list(range(16, 32, 2)) + list(range(17, 32, 2))), + pattern=(list(range(0, 31, 2)) + list(range(1, 32, 2))), ) -@cocotb.test() +# TODO(davidgao): re-enable once fixes are in. +@cocotb.test(skip=True) async def load32_segment2_unit_m2(dut): await vector_load_store( dut=dut, @@ -398,8 +399,7 @@ dtype=np.uint32, in_size=32, out_size=32, - pattern=(list(range(0, 8, 2)) + list(range(1, 8, 2)) + - list(range(8, 16, 2)) + list(range(9, 16, 2))), + pattern=(list(range(0, 15, 2)) + list(range(1, 16, 2))), )