Skip to content

Generating stage2 patches fails with a modified env #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
LekKit opened this issue Feb 22, 2025 · 1 comment
Open

Generating stage2 patches fails with a modified env #65

LekKit opened this issue Feb 22, 2025 · 1 comment

Comments

@LekKit
Copy link

LekKit commented Feb 22, 2025

RVVM uses a forked riscv-test-env tree where write_tohost is implemented via printing results to UART and shutting down the machine.

This can be seen here: riscv/riscv-test-env@002df18

This works well for riscv-tests, but hangs riscv-vector-tests build as soon as Spike is invoked to generate test results for stage 2:

make[1]: Entering directory '/home/lekkit/stuff/riscv-vector-tests'
LD_LIBRARY_PATH=/lib build/pspike --isa=rv64gcv_zvbb_zvbc_zfh_zvfh_zvkg_zvkned_zvknha_zvksed_zvksh_zvl256b_zve64d_zfh_zfhmin_zvfh  out/v256x64machine/bin/stage1/vaadd_vv-0 > out/v256x64machine/patches/stage2/vaadd_vv-0.patch
...
[no progress]

Shouldn't test env only be used when building stage2? Or maybe altering write_tohost is not supposed to work correctly, but how am I supposed to report test status then?

@ksco
Copy link
Collaborator

ksco commented Apr 23, 2025

Oops, I overlooked this issue, sorry! :(

At stage 1, tests are generated and compiled, then run by a special spike called pspike to generate the reference results;
At stage 2, tests are combined with those reference results, compiled, and then run by standard spike to verify it's working as expected.

From your log, it's pspike at stage1 stuck as the env is changed to something else, but spike relies on HTIF (tohost) to work.

A workaround would be to keep the env unchanged at stage1, and change the env at stage2 while removing the verify process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants