SpinalHDL / NaxRiscv

MIT License
267 stars 40 forks source link

Wrong value of `sie` after trapping store_access_fault #105

Closed zhangkanqi closed 6 months ago

zhangkanqi commented 6 months ago

Hi, there is an mismatch on sie between NaxRiscv and Spike after trapping store_access_fault:

*** INTEGER WRITE DATA PC=80000150 DUT=c09428124310ded0 REF=0 ***

For Debug: input_0.zip

For Reproduce: NaxRiscv: f335738370e50d5d23614150c3e8c4a85685e43a

cd $NAXRISCV
vim NaxRiscv/src/main/scala/naxriscv/Gen.scala # enable Rvc&float&double in Gen64
sbt "runMain naxriscv.Gen64"
cd $NAXRISCV/src/test/cpp/naxriscv
make clean; make compile
./obj_dir/VNaxRiscv --load-elf=./input_nax_0.elf --start-symbol=_start --pass-symbol=write_tohost --timeout=100000 --name=input_nax_0 --trace --trace-ref --spike-debug
Dolu1990 commented 6 months ago

Should be fixed, now, it was a bug in the LSU2 special FSM which was re-entering after the trap Thanks ^^