From 6c2f2fa93b258ef9cf54c9b5e219a6efbb35a4aa Mon Sep 17 00:00:00 2001 From: Ruige Lee Date: Wed, 13 Aug 2025 15:39:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E7=AB=99=E5=BF=85=E9=A1=BB=E5=8F=91?= =?UTF-8?q?=E9=80=81=E5=A4=A7=E4=BA=8E8byte=E7=9A=84=E5=8C=85=E6=89=8D?= =?UTF-8?q?=E4=BC=9A=E6=9B=B4=E6=96=B0=E5=90=8C=E6=AD=A5=E5=AF=84=E5=AD=98?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/scala/backBoard/shin/MasterParser.scala | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/scala/backBoard/shin/MasterParser.scala b/src/main/scala/backBoard/shin/MasterParser.scala index 280bd54..4587998 100644 --- a/src/main/scala/backBoard/shin/MasterParser.scala +++ b/src/main/scala/backBoard/shin/MasterParser.scala @@ -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 } } \ No newline at end of file