1 #include "riscv_test.h"
2 #include "sv_test_macros.h"
7 # SV test: vector-vector fadd
9 # sets up x3 and x4 with data, sets VL to 2, and carries out
10 # an "add 1 to x3". which actually means "add 1 to x3 *AND* add 1 to x4"
13 RVTEST_CODE_BEGIN # Start of test code.
15 SV_FLD_DATA( f1, testdata , 0)
16 SV_FLD_DATA( f2, testdata+(1*8) , 0)
17 SV_FLD_DATA( f3, testdata+(2*8), 0)
18 SV_FLD_DATA( f4, testdata+(3*8), 0)
19 SV_FLD_DATA( f5, testdata+(4*8), 0)
20 SV_FLD_DATA( f6, testdata+(5*8), 0)
21 SV_FLD_DATA( f7, testdata+(6*8), 0)
22 SV_FLD_DATA( f8, testdata+(7*8), 0)
23 SV_FLD_DATA( f9, testdata+(8*8), 0)
24 SV_FLD_DATA( f10, testdata+(9*8), 0)
25 SV_FLD_DATA( f11, testdata+(10*8), 0)
26 SV_FLD_DATA( f12, testdata+(11*8), 0)
29 SET_SV_2CSRS( SV_REG_CSR(0, 1, 0, 1, 1),
30 SV_REG_CSR(0, 7, 0, 7, 1) )
31 SET_SV_REMAP_CSR(7, 0, 0, 0, 0, 0);
32 // x=3, y=2, z=1, where remap swaps xy to yx. therefore:
36 SET_SV_SHAPE0_CSR(3, 2, 1, 0, SV_SHAPE_PERM_YXZ );
45 TEST_SV_FD(0, f1, results, 0)
46 TEST_SV_FD(0, f2, results+1*8, 0)
47 TEST_SV_FD(0, f3, results+2*8, 0)
48 TEST_SV_FD(0, f4, results+3*8, 0)
49 TEST_SV_FD(0, f5, results+4*8, 0)
50 TEST_SV_FD(0, f6, results+5*8, 0)
52 RVTEST_PASS # Signal success.
55 RVTEST_CODE_END # End of test code.
58 # This section is optional, and this data is NOT saved in the output.
84 # Output data section.
85 RVTEST_DATA_BEGIN # Start of test output data region.
91 RVTEST_DATA_END # End of test output data region.