加入phy层测试完成

This commit is contained in:
Ruige Lee
2025-05-08 11:22:04 +08:00
parent b55deb239f
commit 3810298986
2 changed files with 24 additions and 6 deletions

View File

@@ -572,13 +572,16 @@ trait SlaveParserSync{ this: SlaveParserBase =>
val syncCnt = Reg(UInt(4.W)) val syncCnt = Reg(UInt(4.W))
when( downRecParser.io.rec.fire ){
when( isSync ){ when( isSync ){
syncCnt := syncCnt + 1.U syncCnt := syncCnt + 1.U
} .otherwise{ } .otherwise{
syncCnt := 0.U syncCnt := 0.U
} }
}
when( isSync ){
when( isSync & downRecParser.io.rec.fire ){
when( syncCnt === 0.U ){ when( syncCnt === 0.U ){
mstTimeStamp := Cat( mstTimeStamp(63, 8), downRecParser.io.data.bits ) mstTimeStamp := Cat( mstTimeStamp(63, 8), downRecParser.io.data.bits )
} .elsewhen( syncCnt === 1.U ){ } .elsewhen( syncCnt === 1.U ){

View File

@@ -514,6 +514,7 @@ initial begin
#50000 #50000
#50000 #50000
#50000 #50000
#50000
begin begin
@@ -628,7 +629,21 @@ initial begin
// 同步 // 同步
#200000 #90000
#90000
#90000
#90000
#90000
#90000
#90000
#90000
#90000
#90000
#90000
#90000
#90000
#90000
begin begin