Comments (6)
@poemonsense Do you have any idea about this?
from nemu.
I have never tested the nemu-diff-with-spike. However, I have a general concern of the position of wfi
. Can you have a try moving wfi
to the second instruction?
For example,
nop
wfi
li a1, 0x20240603
.word 0x6b # Hit Good Trap
from nemu.
I tried. But there is no difference.
This small program was extraced from a large program (xvisor). I think it is representative enough.
from nemu.
It seems that I found the problem.
The previous workable spike-so is built from pxk27/riscv-isa-sim and it removed some wfi logic at this commit.
// debug mode wfis must nop
if (unlikely(in_wfi && !state.debug_mode)) {
throw wait_for_interrupt_t();
}
But current spike-so is built from OpenXiangShan/riscv-isa-sim, which keeps the wfi logic.
This wfi code would throw an exception, skip pc+1 then quit step(), in order to handle interrupts outside. But for difftest ref so, there is no handler outside the step().
Now we have two way to solve this problem:
- let dut (XiangShan and NEMU) require to skip wfi instruction on ref side.
- remove wfi logic from spike step().
from nemu.
It seems that I found the problem.
The previous workable spike-so is built from pxk27/riscv-isa-sim and it removed some wfi logic at this commit.
// debug mode wfis must nop if (unlikely(in_wfi && !state.debug_mode)) { throw wait_for_interrupt_t(); }
But current spike-so is built from OpenXiangShan/riscv-isa-sim, which keeps the wfi logic.
This wfi code would throw an exception, skip pc+1 then quit step(), in order to handle interrupts outside. But for difftest ref so, there is no handler outside the step().
Now we have two way to solve this problem:
- let dut (XiangShan and NEMU) require to skip wfi instruction on ref side.
- remove wfi logic from spike step().
Use something like #ifdef CONFIG_DIFFTEST
?
from nemu.
Use something like
#ifdef CONFIG_DIFFTEST
?
I agree. I will open a PR at spike repo.
from nemu.
Related Issues (20)
- spec2006在ubuntu20.04交叉编译生成的可执行文件无法进行simpoint HOT 7
- 编译riscv64-nemu-interpreter支持pie问题 HOT 4
- Potential memory access out of bound problem when printing $ISA-manual logo HOT 3
- 关于生成的checkpoint文件的一些疑惑
- 生成riscv32指令集时出现的错误 HOT 4
- NEMU could not trap at misaligned memory access when running standalone HOT 1
- 关于根据cpu.pc取指疑问 HOT 5
- NUME仿真精度疑问 HOT 1
- 关于checkpoint的预热指令疑问
- 关于Xiangshan中实现的0x9c0地址的Sdsid自定义读写寄存器,目前NEMU中好像没有相关实现 HOT 1
- 对于vsstatus寄存器,在执行完浮点指令需要修改fs位域时(dirty_fs),NEMU中没有做对应修改 HOT 6
- 关于NEMU中对于C.EBREAK指令的处理 HOT 3
- 0x5C5-0x5E5在香山中为cache instruction register,这部分好像NEMU中没有对应实现? HOT 1
- 请教关于多核NEMU问题 HOT 1
- 请教NEMU中关于PMA地址寄存器初始值以及内存地址划分问题 HOT 1
- 当前NEMU中对异常V扩展指令的覆盖存在部分缺陷 HOT 2
- Compilation Failure When Enabling FPU_HOST
- NEMU Crashes When Enabling AC_HOST
- Compilation Failure When Using clang and Enabling RVB & PERF_OPT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nemu.