Closed ha0lyu closed 2 months ago
Your XiangShan and NEMU version may be too old. Please consider to use latest master XiangShan and latest master NEMU to try again. We have solved a lots of bugs since January.
Hi @cebarobot, thanks for your reply. I update the Xiangshan and NEMU, and 're-make' them, now:
Xiangshan: 7e1c60713 (HEAD -> master, origin/master, origin/HEAD) fix(vstopi): wrong API usage in InterruptFilter (#3557)
NEMU: 8fba3220 (HEAD -> master, origin/master, origin/HEAD) docs(issues): add issue template (#527)
Both two are the latest version. Unfortunately, I got this:
Those numbers are fixed, I ran several test programs and got same output. You can try the same program I have uploaded.
Core 0: ABORT at pc = 0x7e7a8e7a7
instrCnt = 1, cycleCnt = 2,101, IPC = 0.000476
Please let me know if I have made any mistakes. Thanks!
After updating XiangShan (git pull origin master
), Did you run make init
to update submodules? You could check this by running git status
and there should not be anything like this:
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: coupledL2 (new commits)
modified: difftest (new commits)
modified: ready-to-run (new commits)
modified: rocket-chip (new commits)
By the way, could you check the NEMU defconfig you used? It should be riscv64-xs-ref_defconfig
. You could use this defconfig by:
make riscv64-xs-ref_defconfig
make -j
You could also try the riscv64-nemu-interpreter-so
in the ready-to-run
as diff ref.
I just run your workloads in my enviroment, where XiangShan is recent version but not the latest. I could run about 14 instrcutions and then traps into endless trap. You could add the following two instructions to end the emulation:
mv a0, 0
.word 0x0005006b
The problem has been fixed in Xiangshan! I installed the latest version of Xiangshan & NEMU in a brand-new OS. The program runs smoothly without any errors. Thank you for your patience and help. I really appreciate it.
Before start
Describe the bug
In M mode, we set the
mstatus.FS
value then read thefflags
, we will see themstatus
andsstatus
in Xiangshan changed.mstatus = 0x0000000a00006000
andsstatus = 0x0000000200006000
Expected behavior
mstatus = 0x0000000a00002000
andsstatus = 0x0000000200002000
To Reproduce
The following zip file contains asm file, elf file, bin file and link file. If you want to assemble and link it, run:
Run Xiangshan with:
./build/emu -i /path/to/readfflags.bin 2>/dev/null
read fflags.zipEnvironment
Additional context
I built the env by xs-env.