同步测试完成

This commit is contained in:
Ruige Lee
2025-04-30 17:09:30 +08:00
parent 031cffab24
commit 9d53e4ea82
3 changed files with 84 additions and 63 deletions

View File

@@ -152,5 +152,14 @@ abstract class MasterParserBase extends Module{
class MasterParser extends MasterParserBase{
val deltaTimeStamp = Reg(UInt(32.W))
dontTouch(deltaTimeStamp)
val txStamps = Reg(UInt(32.W))
when( io.downOut.fire & io.downOut.bits.tlast ){
txStamps := io.timeStamp(31,0)
} .elsewhen( io.upIn.fire & io.upIn.bits.tlast & ~io.upIn.bits.tuser ){
deltaTimeStamp := io.timeStamp(31,0) - txStamps
}
}