同步包更新工作计数
This commit is contained in:
@@ -593,6 +593,24 @@ trait SlaveParserRW{ 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 upTimeStamp = Reg(UInt(64.W)) //上行本地时间戳寄存器
|
||||
val mstTimeStamp = Reg(UInt(64.W)) //主站时间戳
|
||||
|
||||
Reference in New Issue
Block a user