risc-v/litex: Update docs for vexriscv invalidate and no-op flush.#17792
Conversation
Per further feedback from Litex community, the vexriscv cache is write-through so no flush is required - therefore, make it a nop. And add a pointer to vexriscv invalidation magic instr docs. Signed-off-by: Justin Erenkrantz <justin@erenkrantz.com>
|
I see that the CI run failed, but in reviewing the build logs, I'm not sure how this PR could have triggered that failure. Could this be a transient failure or some other CI failure in master? |
|
@jerenkrantz the issue is happening in BL602 board: Maybe @lupyuen could know what is happening anyway I will restart the CI to check whether it is a transient issue or not. |
|
Sorry @simbit18: Any idea why https://github.com/apache/nuttx/actions/runs/20786276050/job/59697000727?pr=17792#step:11:156 |
Hi @lupyuen, I have no idea why this is happening, sorry. |
This bl602evb:elf configuration has caused job risc-v-01 to fail on several occasions. riscv-none-elf-ld: cannot find /github/workspace/sources/nuttx/arch/risc-v/src/crt0.o: No such file or directory apache#17792 Added -bl602evb:elf to the risc-v-01.dat file to skip the build. Signed-off-by: simbit18 <simbit18@gmail.com>
This bl602evb:elf configuration has caused job risc-v-01 to fail on several occasions. riscv-none-elf-ld: cannot find /github/workspace/sources/nuttx/arch/risc-v/src/crt0.o: No such file or directory apache#17792 Added -bl602evb:elf to the risc-v-01.dat file to skip the build. Signed-off-by: simbit18 <simbit18@gmail.com>
This bl602evb:elf configuration has caused job risc-v-01 to fail on several occasions. riscv-none-elf-ld: cannot find /github/workspace/sources/nuttx/arch/risc-v/src/crt0.o: No such file or directory #17792 Added -bl602evb:elf to the risc-v-01.dat file to skip the build. Signed-off-by: simbit18 <simbit18@gmail.com>
This bl602evb:elf configuration has caused job risc-v-01 to fail on several occasions. riscv-none-elf-ld: cannot find /github/workspace/sources/nuttx/arch/risc-v/src/crt0.o: No such file or directory apache#17792 Added -bl602evb:elf to the risc-v-01.dat file to skip the build. Signed-off-by: simbit18 <simbit18@gmail.com>
This bl602evb:elf configuration has caused job risc-v-01 to fail on several occasions. riscv-none-elf-ld: cannot find /github/workspace/sources/nuttx/arch/risc-v/src/crt0.o: No such file or directory apache#17792 Added -bl602evb:elf to the risc-v-01.dat file to skip the build. Signed-off-by: simbit18 <simbit18@gmail.com>
Per further feedback from Litex community on Discord, the vexriscv cache is write-through so no flush is required - therefore, make it a nop.
And add a pointer to vexriscv invalidation magic instruction docs:
https://github.com/SpinalHDL/VexRiscv?tab=readme-ov-file#dbuscachedplugin
Summary
A prior PR #17696 issued an invalidation instruction when asked to flush; but, that's not strictly necessary as the cache is write-through. Therefore, make flush a nop. This matches Zephyr's behavior which implements vexriscv caching:
https://github.com/zephyrproject-rtos/zephyr/pull/97925/files
I believe a nop is slightly better than trying to make flush function conditional upstream, but I'm open to modifying the PR accordingly.
Impact
When asked to flush, NuttX won't invalidate the entire cache.
Testing
I tested with
arty_a7:nshbuild which ran successfully locally.