Giter Club home page Giter Club logo

Comments (4)

AugustusWillisWang avatar AugustusWillisWang commented on July 17, 2024

这是 difftest 跑出问题的提示. 看起来在协同仿真过程中 NEMU 访问了奇怪的地址 0x0000000000000000, NEMU 不接受对这段地址的访问.

一些可行的策略:

  1. 可以检查下指令提交时 skip 有没有正确设置, 以及被 skip 的指令结果是否正确
  2. 确认下这个报错是在哪个 cycle 触发的? 是在仿真一开始就触发了? 还是仿真过了一段时间才触发?
  3. 如果不是在仿真一开始就触发, 可以看下错误现场附近的情况, 看看你的处理器有没有发出错误的跳转/访存请求

from difftest.

AugustusWillisWang avatar AugustusWillisWang commented on July 17, 2024

BTW, 这是一个 difftest 相关的问题, 我将它移动到 difftest 的 issue 中了

from difftest.

AppDoraemon avatar AppDoraemon commented on July 17, 2024

这是 difftest 跑出问题的提示. 看起来在协同仿真过程中 NEMU 访问了奇怪的地址 0x0000000000000000, NEMU 不接受对这段地址的访问.

一些可行的策略:

1. **可以检查下指令提交时 skip 有没有正确设置, 以及被 skip 的指令结果是否正确**

2. 确认下这个报错是在哪个 cycle 触发的? 是在仿真一开始就触发了? 还是仿真过了一段时间才触发?

3. 如果不是在仿真一开始就触发, 可以看下错误现场附近的情况, 看看你的处理器有没有发出错误的跳转/访存请求
  1. skip这个属性的判断条件应该是怎样的呀?我没有看明白香山和NutShell的具体代码描述。我之前一直是当成mm/io访存指令的判断条件来考虑的。初始的时候microbench都是寄存器计算所以skip设置的是0。同时,我测试了将skip设置为常量1,然后就像difftest源码中描述的,跳转指令无法正确执行了。
  2. 这个报错是在仿真一开始就触发了,我这边display了一些指令,显示在我提交第一组指令时就出错了。并且没有显示任何的代码比对内容。
index1_PC: 0000000080000000
index1_IR: 00000413
index2_PC: 0000000080000004
index2_IR: 0000f117
The first instruction of core 0 has commited. Difftest enabled. 
address (0x0000000000000000) is out of bound {???} [0x0000000000000000, 0x0000000000000000] at pc = 0x0000000000000000

(其中index1和2是一组发射的两条指令)

from difftest.

AugustusWillisWang avatar AugustusWillisWang commented on July 17, 2024

怀疑是 difftest 相关的连线有问题, 导致 skip 后出现异常. skip 可以处理包括 MMIO 指令在内的情况. 它所做的事情是:

  1. 将 DUT 中的指令写回结果强制更新到 REF 中
  2. 跳过当前指令的比较

参见这里的代码:

if (dut.commit[i].skip || (DEBUG_MODE_SKIP(dut.commit[i].valid, dut.commit[i].pc, dut.commit[i].inst))) {
proxy->regcpy(ref_regs_ptr, REF_TO_DIFFTEST);
ref.csr.this_pc += dut.commit[i].isRVC ? 2 : 4;
if (realWen) {
// We use the physical register file to get wdata
// TODO: what if skip with fpwen?
ref_regs_ptr[dut.commit[i].wdest] = get_commit_data(i);
// printf("Debug Mode? %x is ls? %x\n", DEBUG_MEM_REGION(dut.commit[i].valid, dut.commit[i].pc), IS_LOAD_STORE(dut.commit[i].inst));
// printf("skip %x %x %x %x %x\n", dut.commit[i].pc, dut.commit[i].inst, get_commit_data(i), dut.commit[i].wpdest, dut.commit[i].wdest);
}
proxy->regcpy(ref_regs_ptr, DIFFTEST_TO_REF);
return;
}

请确认所有 difftest 接口的连线正确. 尤其是 DiffBasicInstrCommitIODiffIntWritebackIO.

from difftest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.