riscv-vector-tests icon indicating copy to clipboard operation
riscv-vector-tests copied to clipboard

Generating tests for VLEN=64 fails

Open EAlexJ opened this issue 10 months ago • 1 comments

When building executables with VLEN equal to 64, faulty patches are generated for at least one instruction. For XLEN=32:

build/merger -stage1output out/v64x32machine/tests/stage1/ -stage2output out/v64x32machine/tests/stage2/ -stage2patch out/v64x32machine/patches/stage2/
fatal: wrong patch generated for file vloxei16_v-0.S, expected 190, got 156

and for XLEN=64:

build/merger -stage1output out/v64x64machine/tests/stage1/ -stage2output out/v64x64machine/tests/stage2/ -stage2patch out/v64x64machine/patches/stage2/
fatal: wrong patch generated for file vloxei16_v-0.S, expected 191, got 181

EAlexJ avatar Feb 08 '25 09:02 EAlexJ

Thanks for the report, I'll take a look next week.

ksco avatar Feb 08 '25 09:02 ksco

Similar issue:fatal: wrong patch generated for file vsse16_v-0.S, expected 625, got 334

zhongchengyong avatar Jul 14 '25 11:07 zhongchengyong

I’m not entirely sure, but this could be Spike related. In some cases, even when I set VLEN=64, Spike seemed to internally use VLEN=128.

I discovered this while running Spike in debug mode and printing VLEN and ELEN.

nadime15 avatar Jul 30 '25 20:07 nadime15

I can confirm that the issue is setting illegal combinations of V, Zvl and Zve as described in #78.

I got VLEN=64, XLEN=64 working for vloxei16_v

When compiled with

isa=rv64gc_zvbb_zvbc_zfh_zvfh_zvkg_zvkned_zvknha_zvksed_zvksh_zvl64b_zve64d_zfh_zfhmin_zvfh

(I removed V, Zvfbfmin and Zvfbfwma)

nadime15 avatar Aug 18 '25 21:08 nadime15

So a change to the isa string in Makefile would resolve this issue?

ksco avatar Aug 19 '25 06:08 ksco

For VLEN=64 and VLEN=32 (I think we can start supporting VLEN=32), yes. I will open a PR later.

nadime15 avatar Aug 19 '25 12:08 nadime15

We can close this one.

nadime15 avatar Sep 25 '25 12:09 nadime15