Skip to content

Commit d858966

Browse files
committed
Update difftest
1 parent b40138c commit d858966

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ Enter the test cycle:
115115
```shell
116116
# 编译仿真
117117
./build.sh -e cpu_diff -d -b -s -a "-i inst_diff.bin"
118-
# 编译仿真,并从CPU上报至difftest的时钟周期0开始输出波形
119-
./build.sh -e cpu_diff -d -b -s -a "-i inst_diff.bin --dump-wave -b 0" -m "EMU_TRACE=1"
118+
# 编译仿真,并从CPU上报至difftest的时钟周期0开始输出波形至wave.vcd文件
119+
./build.sh -e cpu_diff -d -b -s -a "-i inst_diff.bin --wave-path=wave.vcd --dump-wave -b 0" -m "EMU_TRACE=1"
120120
```
121121

122122
仿真程序运行后,终端将打印绿色的提示内容`HIT GOOD TRAP at pc = 0x8000000c`。说明程序运行到自定义的`0x6b`指令,并且此时存放错误码的`a0`寄存器的值为0,即程序按照预期结果成功退出。关于`0x6b`自定义指令作用,可参考[讲座-AM运行环境介绍](https://oscpu.github.io/ysyx/events/events.html?EID=2021-07-13_AM_Difftest)。如果指定输出波形,将在`projects/cpu_diff/build/`路径下生成`.vcd`波形文件。
@@ -126,7 +126,7 @@ Enter the test cycle:
126126
`projects/cpu_diff`目录下存放了通过`AXI总线`接入`香山difftest框架``verilog`版本单周期`RISC-V`CPU例程源码,源码实现了`RV64I`指令`addi``AXI总线`读逻辑。可以使用下面的命令编译和仿真。
127127

128128
```shell
129-
./build.sh -e cpu_axi_diff -d -s -a "-i inst_diff.bin --dump-wave -b 0" -m "EMU_TRACE=1 WITH_DRAMSIM3=1" -b
129+
./build.sh -e cpu_axi_diff -d -s -a "-i inst_diff.bin --wave-path=wave.vcd --dump-wave -b 0" -m "EMU_TRACE=1 WITH_DRAMSIM3=1" -b
130130
```
131131

132132
### chisel_cpu_diff

libraries/difftest

Submodule difftest updated from 706b571 to 56d947b

projects/cpu_axi_diff/vsrc/cpu.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ DifftestInstrCommit DifftestInstrCommit(
158158
.valid (cmt_valid),
159159
.pc (cmt_pc),
160160
.instr (cmt_inst),
161+
.special (0),
161162
.skip (0),
162163
.isRVC (0),
163164
.scFailed (0),

projects/cpu_diff/vsrc/SimTop.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ DifftestInstrCommit DifftestInstrCommit(
148148
.valid (cmt_valid),
149149
.pc (cmt_pc),
150150
.instr (cmt_inst),
151+
.special (0),
151152
.skip (0),
152153
.isRVC (0),
153154
.scFailed (0),

0 commit comments

Comments
 (0)