确认波形

This commit is contained in:
Ruige Lee
2025-09-02 11:10:05 +08:00
parent 10e0cd645c
commit a21d6eaf54
3 changed files with 5 additions and 4 deletions

View File

@@ -50,7 +50,7 @@ testShin:
-I ./generated/shin \ -I ./generated/shin \
-D RANDOMIZE_REG_INIT \ -D RANDOMIZE_REG_INIT \
./tb/shinTest/ShinTopSpiTb.v ./tb/shinTest/ShinTopSpiTb.v
vvp -N ./tb/build/shinTest.iverilog -lxt2 || true vvp -N ./tb/build/shinTest.iverilog -lxt2 -fst || true
./tb/shinTest/check_testcase.py ./tb/shinTest/check_testcase.py
testFilter: testFilter:
@@ -63,6 +63,9 @@ vcdFilter:
vcdShin: vcdShin:
gtkwave ./tb/build/wave.vcd 1>/dev/null 2>&1 & gtkwave ./tb/build/wave.vcd 1>/dev/null 2>&1 &
fstShin:
gtkwave ./tb/build/wave.fst 1>/dev/null 2>&1 &
ef: ef:
sbt "test:runMain test.testModule" sbt "test:runMain test.testModule"

View File

@@ -93,7 +93,6 @@ trait CDRInMultiSample{ this: CDRInBase =>
val clearCnt = Reg(UInt(4.W)) val clearCnt = Reg(UInt(4.W))
val checkCnt = Reg(UInt(4.W)) val checkCnt = Reg(UInt(4.W))
val arbLock = Reg(UInt( (log2Ceil(8*clkNum)).W ))
val arbCali = Reg(UInt( (log2Ceil(8*clkNum)).W )) val arbCali = Reg(UInt( (log2Ceil(8*clkNum)).W ))
val isLock = RegInit(false.B) val isLock = RegInit(false.B)
@@ -149,7 +148,6 @@ trait CDRInMultiSample{ this: CDRInBase =>
for( i <- 0 until 16 ){ for( i <- 0 until 16 ){
val j = 50+16 - i - 1 val j = 50+16 - i - 1
when( flitReg(j) ^ flitReg(j+1) ){ when( flitReg(j) ^ flitReg(j+1) ){
arbLock := j.U
arbCali := j.U arbCali := j.U
} }
} }

View File

@@ -460,7 +460,7 @@ initial
begin begin
spidata_file = $fopen("spi_trans_data.txt", "w"); spidata_file = $fopen("spi_trans_data.txt", "w");
if (!spidata_file) $display("文件打开失败"); if (!spidata_file) $display("文件打开失败");
$dumpfile("./tb/build/wave.vcd"); //生成的vcd文件名称 $dumpfile("./tb/build/wave.fst"); //生成的vcd文件名称
$dumpvars(0, ShinTopSpiTb);//tb模块名称 $dumpvars(0, ShinTopSpiTb);//tb模块名称
end end