主站必须发送大于8byte的包才会更新同步寄存器
This commit is contained in:
@@ -210,10 +210,18 @@ with MasterParserStat{
|
||||
io.deltaTimeStamp := deltaTimeStamp
|
||||
|
||||
val txStamps = Reg(UInt(32.W))
|
||||
val pkgChkCnt = Reg(UInt(4.W))
|
||||
|
||||
when( io.upIn.fire & io.upIn.bits.tlast ){
|
||||
pkgChkCnt := 0.U
|
||||
} .elsewhen( io.downOut.fire & pkgChkCnt =/= 9.U ){
|
||||
pkgChkCnt := pkgChkCnt + 1.U
|
||||
}
|
||||
|
||||
|
||||
when( io.downOut.fire & io.downOut.bits.tlast ){
|
||||
txStamps := io.cReg.timeStamp(31,0)
|
||||
} .elsewhen( io.upIn.fire & io.upIn.bits.tlast & ~io.upIn.bits.tuser ){
|
||||
} .elsewhen( io.upIn.fire & io.upIn.bits.tlast & ~io.upIn.bits.tuser & pkgChkCnt === 9.U ){
|
||||
deltaTimeStamp := io.cReg.timeStamp(31,0) - txStamps
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user