同步包更新工作计数

This commit is contained in:
Ruige Lee
2025-05-26 19:05:15 +08:00
parent 87d81bdc54
commit 2f66deb7ed

View File

@@ -593,6 +593,24 @@ trait SlaveParserRW{ this: SlaveParserBase =>
trait SlaveParserSync{ this: SlaveParserBase => trait SlaveParserSync{ this: SlaveParserBase =>
//下行接收
when( downRecParser.io.subMsgReq.fire ){
when( isDownRecPing ){
//override
when( downRecParser.io.subMsgReq.bits.operator === SUBMSG_OPERATOR_SYNC ) { //同步包
downSubMsgInfo(0).workCnt := downRecParser.io.subMsgReq.bits.workCnt + 1.U
}
} .otherwise{ //pong
//override
when( downRecParser.io.subMsgReq.bits.operator === SUBMSG_OPERATOR_SYNC ) { //同步包 )
downSubMsgInfo(1).workCnt := downRecParser.io.subMsgReq.bits.workCnt + 1.U
}
}
}
val downTimeStamp = Reg(UInt(64.W)) //下行本地时间戳寄存器 val downTimeStamp = Reg(UInt(64.W)) //下行本地时间戳寄存器
val upTimeStamp = Reg(UInt(64.W)) //上行本地时间戳寄存器 val upTimeStamp = Reg(UInt(64.W)) //上行本地时间戳寄存器
val mstTimeStamp = Reg(UInt(64.W)) //主站时间戳 val mstTimeStamp = Reg(UInt(64.W)) //主站时间戳