Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurred while comparing the execution of linux.bin. #3654

Open
3 tasks done
han-jianing opened this issue Sep 26, 2024 · 12 comments
Open
3 tasks done

Error occurred while comparing the execution of linux.bin. #3654

han-jianing opened this issue Sep 26, 2024 · 12 comments
Labels
problem Problem requiring help

Comments

@han-jianing
Copy link

Before start

  • I have read the XiangShan Documents. 我已经阅读过香山文档。
  • I have searched the previous issues and did not find anything relevant. 我已经搜索过之前的 issue,并没有找到相关的。
  • I have searched the previous discussions and did not find anything relevant. 我已经搜索过之前的 discussions,并没有找到相关的。

Describe you problem

运行linux.bin对比出错,但运行
image对比成功

hjn@hjn-virtual-machine:~/xs-env/XiangShan$ ./build/emu -i $NOOP_HOME/ready-to-run/linux.bin
emu compiled at Sep 18 2024, 19:18:42
Using simulated 32768B flash
Using simulated 8192MB RAM
The image is /home/hjn/xs-env/XiangShan/ready-to-run/linux.bin
The reference model is /home/hjn/xs-env/NEMU/build/riscv64-nemu-interpreter-so
The first instruction of core 0 has commited. Difftest enabled.

============== In the last commit group ==============
the first commit instr pc of DUT is 0x0000000080009c60
the first commit instr pc of REF is 0x0000000080009c60

============== Commit Group Trace (Core 0) ==============
commit group [00]: pc 0080009c60 cmtcnt 1 <--
commit group [01]: pc 0080009c1a cmtcnt 1
commit group [02]: pc 0080009c1e cmtcnt 1
commit group [03]: pc 0080009c22 cmtcnt 1
commit group [04]: pc 0080009c26 cmtcnt 4
commit group [05]: pc 0080009c32 cmtcnt 1
commit group [06]: pc 0080009c36 cmtcnt 1
commit group [07]: pc 0080009c3a cmtcnt 1
commit group [08]: pc 0080009c3e cmtcnt 1
commit group [09]: pc 0080009c42 cmtcnt 1
commit group [10]: pc 0080009c46 cmtcnt 1
commit group [11]: pc 0080009c4a cmtcnt 1
commit group [12]: pc 0080009c4e cmtcnt 2
commit group [13]: pc 0080009c52 cmtcnt 2
commit group [14]: pc 0080009c58 cmtcnt 1
commit group [15]: pc 0080009c5a cmtcnt 2

============== Commit Instr Trace ==============
[00] commit pc 0000000080009c5a inst 0007b503 wen 1 dst 10 data 000000008000cdd8 idx 010 (02)
[01] commit pc 0000000080009c5c inst 00068733 wen 1 dst 14 data 0000000080046ea0 idx 011
[02] commit pc 0000000080009c60 inst 30551573 wen 1 dst 10 data 0000000080000400 idx 012
[03] exception pc 0000000080009c64 inst 3c0028f3 cause 0000000000000002 <--
[04] commit pc 0000000080009bfc inst 3be898f3 wen 1 dst 17 data 00003ffffffffc00 idx 024
[05] commit pc 0000000080009c00 inst 62b89de3 wen 0 dst 27 data 0000000000000000 idx 025
[06] commit pc 0000000080009c04 inst 0104a503 wen 1 dst 10 data 000000000000000e idx 026 (14)
[07] commit pc 0000000080009c06 inst 00060693 wen 1 dst 13 data 0000000080046ea0 idx 027
[08] commit pc 0000000080009c08 inst f6043c23 wen 0 dst 24 data 0000000000000000 idx 028 (02)
[09] commit pc 0000000080009c0c inst 0015051b wen 1 dst 10 data 000000000000000f idx 029
[10] commit pc 0000000080009c0e inst 00a4a823 wen 0 dst 16 data 0000000000000000 idx 02a (03)
[11] commit pc 0000000080009c10 inst 0007b503 wen 1 dst 10 data 000000008000cdd8 idx 02b (15)
[12] commit pc 0000000080009c12 inst 00068733 wen 1 dst 14 data 0000000080046ea0 idx 02c
[13] commit pc 0000000080009c16 inst 30551573 wen 1 dst 10 data 0000000080000400 idx 02d
[14] commit pc 0000000080009c1a inst 3bf028f3 wen 1 dst 17 data 0000000000000000 idx 02e
[15] commit pc 0000000080009c1e inst 30551073 wen 0 dst 00 data 0000000000000000 idx 02f
[16] commit pc 0000000080009c22 inst f7843683 wen 1 dst 13 data 0000000000000000 idx 000 (16)
[17] commit pc 0000000080009c26 inst 60069ae3 wen 0 dst 21 data 0000000000000000 idx 001
[18] commit pc 0000000080009c2a inst 0007b503 wen 1 dst 10 data 000000008000cdd8 idx 002 (17)
[19] commit pc 0000000080009c2c inst 00060693 wen 1 dst 13 data 0000000080046ea0 idx 003
[20] commit pc 0000000080009c32 inst 30551573 wen 1 dst 10 data 0000000080000400 idx 004
[21] commit pc 0000000080009c36 inst 3bf59073 wen 0 dst 00 data 0000000000000000 idx 005
[22] commit pc 0000000080009c3a inst 30551073 wen 0 dst 00 data 0000000000000000 idx 006
[23] commit pc 0000000080009c3e inst f7843683 wen 1 dst 13 data 0000000000000000 idx 007 (00)
[24] commit pc 0000000080009c42 inst 5e069ce3 wen 0 dst 25 data 0000000000000000 idx 008
[25] commit pc 0000000080009c46 inst 3bf898f3 wen 1 dst 17 data 00003ffffffffc00 idx 009
[26] commit pc 0000000080009c4a inst 5eb898e3 wen 0 dst 17 data 0000000000000000 idx 00a
[27] commit pc 0000000080009c4e inst 0104a503 wen 1 dst 10 data 000000000000000f idx 00b (01)
[28] commit pc 0000000080009c50 inst 00060693 wen 1 dst 13 data 0000000080046ea0 idx 00c
[29] commit pc 0000000080009c52 inst f6043c23 wen 0 dst 24 data 0000000000000000 idx 00d (04)
[30] commit pc 0000000080009c56 inst 0015051b wen 1 dst 10 data 0000000000000010 idx 00e
[31] commit pc 0000000080009c58 inst 00a4a823 wen 0 dst 16 data 0000000000000000 idx 00f (05)

============== REF Regs ==============
$0: 0x0000000000000000 ra: 0x000000008000963c sp: 0x0000000080046ea0 gp: 0x0000000000000000
tp: 0x0000000080047000 t0: 0x0000000000002000 t1: 0x000000000000062c t2: 0x0000000000001000
s0: 0x0000000080046f30 s1: 0x00000000800470b0 a0: 0x0000000080000400 a1: 0x00003ffffffffc00
a2: 0x0000000080046ea0 a3: 0x0000000080046ea0 a4: 0x0000000080046ea0 a5: 0x0000000080040b58
a6: 0x0000000080046ed0 a7: 0x00003ffffffffc00 s2: 0x000000000000000c s3: 0x0000000080047000
s4: 0x0000000080043c18 s5: 0x0000000000000000 s6: 0x0000000000000000 s7: 0x0000000000000001
s8: 0x0000000000002000 s9: 0x00000000800436f0 s10: 0x0000000000000000 s11: 0x0000000000000000
t3: 0x000000000000004a t4: 0x000000000000003f t5: 0x0000000000000003 t6: 0x0000000000000004
ft0: 0xa07c6deb791b71f7 ft1: 0xaa1f3768e92cde5d ft2: 0xa6f8d4d369979da6 ft3: 0xfdaba2bce360b8b8
ft4: 0xfa5d0f8a12c6496d ft5: 0xebf9f4b027191ce1 ft6: 0x738e5a4ef82ecdc9 ft7: 0x824795a61763326c
fs0: 0x32febce441b45472 fs1: 0x92fccbec0cac4fc0 fa0: 0xff10803351220e05 fa1: 0x0a7aeef66da71a16
fa2: 0x0f9de504c47e5513 fa3: 0xc8d69a4f86f10a1c fa4: 0xfac276b0f54cae32 fa5: 0x2c4888f95a01bec5
fa6: 0x65a65b308501d821 fa7: 0xf2af8ec506a23ad5 fs2: 0x56c6387fb5aec9c7 fs3: 0x807842d09f45d4cf
fs4: 0xcc66bb1620c3becd fs5: 0x2d9cd9c636b93f56 fs6: 0x682ef16b5a669e04 fs7: 0x9f3c6d8dae7f9e47
fs8: 0xa9341e0ff168cc47 fs9: 0xca081d5a60a22e68 fs10: 0x5175ff7bddfeb497 fs11: 0x1c0245d8924e400e
ft8: 0x7f5d8aa1674320b4 ft9: 0xffd9dd4965ca707b ft10: 0x632b48f853302383 ft11: 0xb23bdafbe69d691f
pc: 0x000000008000cdd8 mstatus: 0x0000000a00001800 mcause: 0x0000000000000002 mepc: 0x0000000080009c64
sstatus: 0x0000000200000000 scause: 0x0000000000000000 sepc: 0x0000000000000000
satp: 0x0000000000000000
mip: 0x0000000000000000 mie: 0x0000000000000000 mscratch: 0x0000000080047000 sscratch: 0x4625c15b1ce006c5
mideleg: 0x0000000000001444 medeleg: 0x0000000000000000
mtval: 0x000000003c0028f3 stval: 0x0000000000000000 mtvec: 0x000000008000cdd8 stvec: 0x0000000000000000
miselect: 0x0000000000000000 siselect: 0x0000000000000000 mireg: 0x0000000000000000 sireg: 0x0000000000000000
mtopi: 0x0000000000000000 stopi: 0x0000000000000000 mvien: 0x0000000000000000 mvip: 0x0000000000000000
mtopei: 0x0000000000000000 stopei: 0x0000000000000000
fcsr: 0x0000000000000000
mtval2: 0x0000000000000000 mtinst: 0x0000000000000000 hstatus: 0x0000000200000000 hideleg: 0x0000000000000000
hedeleg: 0x0000000000000000 hcounteren: 0x0000000000000000 htval: 0x0000000000000000 htinst: 0x0000000000000000
hgatp: 0x0000000000000000 vsscratch: 0x20805ddb674f5c67 vsstatus: 0x0000000200000000 vstvec: 0x0000000000000000
vsepc: 0x0000000000000000 vscause: 0x0000000000000000 vstval: 0x0000000000000000 vsatp: 0x0000000000000000
hvien: 0x0000000000000000 hvictl: 0x0000000000000000 hviprio1: 0x0000000000000000 hviprio2: 0x0000000000000000
vsiselect: 0x0000000000000000 vsireg: 0x0000000000000000 vstopi: 0x0000000000000000
vstopei: 0x0000000000000000
virtualization mode: 0
privilege mode:3
pmp: 16 entries active, details:
0: cfg:0x00 addr:0x00003ffffffffc00| 1: cfg:0x00 addr:0x0000000000000000
2: cfg:0x00 addr:0x0000000000000000| 3: cfg:0x00 addr:0x0000000000000000
4: cfg:0x00 addr:0x0000000000000000| 5: cfg:0x00 addr:0x0000000000000000
6: cfg:0x00 addr:0x0000000000000000| 7: cfg:0x00 addr:0x0000000000000000
8: cfg:0x00 addr:0x0000000000000000| 9: cfg:0x00 addr:0x0000000000000000
10: cfg:0x00 addr:0x0000000000000000|11: cfg:0x00 addr:0x0000000000000000
12: cfg:0x00 addr:0x0000000000000000|13: cfg:0x00 addr:0x0000000000000000
14: cfg:0x00 addr:0x0000000000000000|15: cfg:0x00 addr:0x0000000000000000
v0 : 0xbdec2532beaf447e_b25182707b436efa v1 : 0x05d8b8f0a066051d_2baecb8054e1b453
v2 : 0x39eca3976a805174_590fd5291b2e107b v3 : 0x661df2f545c785c8_30d2c91393a5c74f
v4 : 0x06a804688bdefdea_f9138e6988df5cf9 v5 : 0xb7f2d7f2b6288ec4_ec889bdab940f227
v6 : 0xd903bfdad4a45346_c114a6525f681e38 v7 : 0x883c934bbdc36d53_b7c66df7715deefe
v8 : 0x6ab39578e0e19fc1_895bd4936feefa5b v9 : 0x9cd179917dbcba87_f29af5bfc3b61a2a
v10: 0x6855bd048e0cb60d_835b93916731e4aa v11: 0x770e8ad9b36a3f64_1334884872a74247
v12: 0x952ea3ba067b40ab_55400c3ca5152792 v13: 0xfe3222913c42d6e6_6c00f09878b9cc8c
v14: 0x4f9cbfbc6d040f79_ddf194a016ed9829 v15: 0x14811042d31520f8_7ab1c34ed140e497
v16: 0x376c04db13f5a080_fa8bd6cfdf1a18a3 v17: 0xda12f4d67b875943_f4dabe78578bbd2b
v18: 0x4ee8f337475934da_38d6d422adb1618a v19: 0xe64d2bf51fdcecf4_ba0af822366810f9
v20: 0xd11e61b6ad688c83_aa776b0cd649603a v21: 0x486cb70145268896_18d42491351986d6
v22: 0x4403205663a142a8_6cbffef6aafcd171 v23: 0xfba085405de1d784_288218cfe85d06cc
v24: 0x8a56bf3666e205bd_b7e0e31cc78f4b22 v25: 0xf7e9b74c8cd24588_d32dc3ca6fb61dfe
v26: 0x0654de5e85d34c02_53792b9bf664f4e5 v27: 0x89469686276fc36d_d301ca512c1994aa
v28: 0xcc12ea238aa25f67_d1c1220f94f2a363 v29: 0xcc4c4dfa14290e49_10ba3ec0d355c118
v30: 0x6f7a5645defe455c_73c6fb5be524e0f9 v31: 0x076501e96667ccea_827e7dc166998bf0
vtype: 0x8000000000000000 vstart: 0x0000000000000000 vxsat: 0x0000000000000000
vxrm: 0x0000000000000000 vl: 0x0000000000000000 vcsr: 0x0000000000000000
tselect: 0x0000000000000000
tcontrol: 0x0000000000000000
0: tdata1: 0xf000000000000000 tdata2: 0x0000000000000000
1: tdata1: 0xf000000000000000 tdata2: 0x0000000000000000
2: tdata1: 0xf000000000000000 tdata2: 0x0000000000000000
3: tdata1: 0xf000000000000000 tdata2: 0x0000000000000000
4: tdata1: 0x0000000000000000 tdata2: 0x0000000000000000
privilegeMode: 3
mtval different at pc = 0x0080009c60, right= 0x000000003c0028f3, wrong = 0x0000000000000000
Core 0: ABORT at pc = 0x80009bd4
Core-0 instrCnt = 894,780, cycleCnt = 583,567, IPC = 1.533294
Seed=0 Guest cycle spent: 583,570 (this will be different from cycleCnt if emu loads a snapshot)
Host time spent: 3,445,692ms

image

What did you do before

image
zhe'ge'cheng'g这个成功
image
这个对比出错,在NEMU仿真可以通过

非常感谢

Environment

  • XiangShan branch:
  • XiangShan commit id:
  • NEMU commit id:
  • SPIKE commit id:
  • Operating System:
  • gcc version:
  • mill version:
  • java version:

Additional context

No response

@han-jianing han-jianing added the problem Problem requiring help label Sep 26, 2024
@cebarobot
Copy link
Member

cebarobot commented Sep 26, 2024

我们无法根据现有信息判断问题,请在问题描述里补全 Environment 部分,提供 XiangShan、NEMU 和 ready-to-run 的 commit id。

We cannot determine the problem according to current infomation. Please fill the Environment part in the issue description, including XiangShan, NEMU & ready-to-run

@han-jianing
Copy link
Author

han-jianing commented Sep 26, 2024

好的谢谢
XiangShan commit id: 49162c9
NEMU commit id: a6a5f9b1
ready-to-run commit id: 3b2f905

@han-jianing
Copy link
Author

XiangShan commit id:49162c9ab
NEMU commit id:a6a5f9b1
ready-to-run commit id:3b2f905
这是我的环境,还需要什么呢

@cebarobot
Copy link
Member

我在较新版本的香山上未能复现这个问题。香山近期在解决大量缺陷,您这个版本的香山有些旧了,您可以更新一下香山和ready-to-run的版本再尝试。

I have tried an new version of XianShan and the bug didn't occur. XiangShan team are solving a lot of bugs thesedays and the version of XiangShan you used is too old. You could try again after updating XiangShan and ready-to-run.

@han-jianing
Copy link
Author

han-jianing commented Sep 26, 2024 via email

@han-jianing
Copy link
Author

我执行了source update-submodule.sh仍然不行,香山怎样更新呢?需要重新git环境吗?

@cebarobot
Copy link
Member

xs-env 里执行 source update-submodule.sh 应该能更新香山和各个子模块。在更新香山之后,需要重新编译香山。

麻烦您提供一下:

  • 更新后香山、ready-to-run 的 commit id
  • 您编译所用的命令

@han-jianing
Copy link
Author

您好,我已经更新并且重新编译,香山:97e37a223;ready-to-run:8ca5b19
执行命令:
image
现在不报错了,出现opensbi字样后不再出现其他信息。

@han-jianing
Copy link
Author

image

@han-jianing
Copy link
Author

这个是还在运行吗?好多个小时没有结束正常的吗?感谢解答!国庆节快乐!

@cebarobot
Copy link
Member

这个是还在运行吗?好多个小时没有结束正常的吗?感谢解答!国庆节快乐!

这个很难判断。我不太清楚您使用的机器是什么配置,但这个可能在较低配置的机器上可能确实需要很长时间。

ready-to-run 的 linux 大约需要运行 6,000,000 个周期。您可先运行 ready-to-run 下的 microbench 或 coremark,根据它们的周期数(microbench 约 234,000 个周期,coremark 约 300,000 个周期)和实际运行时间来大致估算您运行 linux 所需的时间。

作为参考,在 AMD EPYC 9684X 96-Core Processor 上使用 16 线程的 emu,运行 ready-to-run 里的 linux 大约需要半个小时的时间。更低的 CPU 性能、更少的线程数、虚拟机带来的性能损失都有可能让运行时间变得很长。

同祝您国庆节快乐。

@han-jianing
Copy link
Author

han-jianing commented Sep 30, 2024 via email

@Ma-YX Ma-YX changed the title 运行linux.bin对比出错 Error occurred while comparing the execution of linux.bin. Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Problem requiring help
Projects
None yet
Development

No branches or pull requests

2 participants