我有一个CVA6设计实现到FPGA,我已经连接OpenOCD,并在将图像写入RAM后,我试图验证它。但是验证失败了我收到了这个消息
verify_image uImage 0x80200000
Algorithm timed out after 180001 ms.
ra = 0x0
sp = 0x0
gp = 0x0
tp = 0x0
t0 = 0x0
t1 = 0x0
t2 = 0x0
s0 = 0x0
s1 = 0x0
a0 = 0x80200000
a1 = 0x82cb3e
a2 = 0x0
a3 = 0x0
a4 = 0x0
a5 = 0x0
a6 = 0x0
a7 = 0x0
s2 = 0x0
s3 = 0x0
s4 = 0x0
s5 = 0x0
s6 = 0x0
s7 = 0x0
s8 = 0x0
s9 = 0x0
s10 = 0x0
s11 = 0x0
t3 = 0x0
t4 = 0x0
t5 = 0x0
t6 = 0x0
pc = 0x80200040
mstatus = 0xa00001800
mepc = 0x80200040
mcause = 0xc
error executing RISC-V CRC algorithm
verified 8571710 bytes in 283.027466s (29.576 KiB/s)
PC卡在0x80200040地址,入口点和加载地址都是0x80200000,mcause = 0xc表示指令页错误,但有时会显示mcause = 0x2(非法指令)。我还转储了0x80200000区域,并使用objdump查看那里是否有一些有效的代码,我得到了这个
Disassembly of section .data:
0000000000000000 <.data>:
0: 56190527 0x56190527
4: f842 fsw fa6,48(sp)
6: f7a1 bnez a5,0xffffffffffffff4e
8: 0765 addi a4,a4,25
a: 98003957 0x98003957
e: c1ad beqz a1,0x70
10: 2080 fld fs0,0(s1)
12: 0000 unimp
14: 2080 fld fs0,0(s1)
16: 0000 unimp
18: d4c1 beqz s1,0xffffffffffffffa0
1a: 07ca slli a5,a5,0x12
1c: 1a05 addi s4,s4,-31
1e: 0102 c.slli64 sp
20: 34365643 0x34365643
24: 3641 jal 0xfffffffffffffba4
26: 694c flw fa1,20(a0)
28: 756e flw fa0,248(sp)
2a: 0078 addi a4,sp,12
...
40: 8b1f 0808 5738 0x573808088b1f
46: 03026507 0x3026507
4a: 6d49 lui s10,0x12
4c: 6761 lui a4,0x18
4e: 0065 c.nop 25
50: 59ec lw a1,116(a1)
52: d713547b 0xd713547b
56: dfba sw a4,252(sp)
正如你在0x40看到的,它看起来不像指令。为什么会发生这种情况?
我试着用verify_image uImage 0x80200000
验证图像。它没有得到验证,这很奇怪,因为我使用cva6-sdk来生成图像。
1条答案
按热度按时间igsr9ssn1#
实际上这是由于openOCD配置文件中的错误基址。所以我设法修好了。