代码清理
This commit is contained in:
@@ -448,20 +448,6 @@ trait SlaveParserIndex{ this: SlaveParserBase =>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// when( downRecParser.io.subMsgHeadReq.fire &
|
||||
// downRecParser.io.subMsgHeadReq.bits.devIndex === 0.U &
|
||||
// downRecParser.io.subMsgHeadReq.bits.style === 0.U &
|
||||
// downRecParser.io.subMsgHeadReq.bits.operator === SUBMSG_OPERATOR_INDEX ){ //设置顺序地址
|
||||
// localDevIndex := downRecParser.io.subMsgHeadReq.bits.workCnt + 1.U
|
||||
// indexOfRightDev := Mux(isLastDevice, 0.U, downRecParser.io.subMsgHeadReq.bits.workCnt + 2.U)
|
||||
// when( isDownRecPing ){
|
||||
// downSubMsgHeadInfo(0).workCnt := downRecParser.io.subMsgHeadReq.bits.workCnt + 1.U
|
||||
// } .otherwise{ //pong
|
||||
// downSubMsgHeadInfo(1).workCnt := downRecParser.io.subMsgHeadReq.bits.workCnt + 1.U
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -827,27 +813,6 @@ trait SlaveParserRW{ this: SlaveParserBase =>
|
||||
|
||||
trait SlaveParserSync{ this: SlaveParserBase =>
|
||||
|
||||
// when( upRecParser.io.subMsgTailReq.fire ){
|
||||
// when( isUpRecPing ){
|
||||
// //override
|
||||
// when(
|
||||
// ( ( (upSubMsgHeadInfo(0).operator === SUBMSG_OPERATOR_UNIREAD ) | (upSubMsgHeadInfo(0).operator === SUBMSG_OPERATOR_UNIRDWR ) ) & ((upSubMsgHeadInfo(0).isSeqIndex & upSubMsgHeadInfo(0).devIndex === localDevIndex) || (upSubMsgHeadInfo(0).isLgcIndex & isUpLgcWorked =/= 0.U ) ) ) |
|
||||
// ( ( (upSubMsgHeadInfo(0).operator === SUBMSG_OPERATOR_BOARDREAD) | (upSubMsgHeadInfo(0).operator === SUBMSG_OPERATOR_BOARDRDWR) ) )
|
||||
// ){ //自身包//读或读写
|
||||
// upSubMsgTailInfo(0).workCnt := upRecParser.io.subMsgTailReq.bits.workCnt + 1.U
|
||||
// }
|
||||
// } .otherwise{
|
||||
// //override
|
||||
// when(
|
||||
// ( ( (upSubMsgHeadInfo(1).operator === SUBMSG_OPERATOR_UNIREAD ) | (upSubMsgHeadInfo(1).operator === SUBMSG_OPERATOR_UNIRDWR ) ) & ((upSubMsgHeadInfo(1).isSeqIndex & upSubMsgHeadInfo(1).devIndex === localDevIndex) || (upSubMsgHeadInfo(1).isLgcIndex & isUpLgcWorked =/= 0.U ) ) ) |
|
||||
// ( ( (upSubMsgHeadInfo(1).operator === SUBMSG_OPERATOR_BOARDREAD) | (upSubMsgHeadInfo(1).operator === SUBMSG_OPERATOR_BOARDRDWR) ) )
|
||||
// ){ //自身包//读或读写 )
|
||||
// upSubMsgTailInfo(1).workCnt := upRecParser.io.subMsgTailReq.bits.workCnt + 1.U
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
//下行接收
|
||||
when( downRecParser.io.subMsgTailReq.fire ){
|
||||
when( isDownRecPing ){
|
||||
@@ -958,17 +923,9 @@ trait SlaveParserSync{ this: SlaveParserBase =>
|
||||
|
||||
trait SlaveParserProbe{ this: SlaveParserBase =>
|
||||
|
||||
|
||||
// val ProbeRecAim = 511.U
|
||||
val probeRecCnt = RegInit(0.U(9.W))
|
||||
val isWatchDogOverflow = probeRecCnt.andR
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// val isReadyToProbe_Pending = RegInit(false.B)
|
||||
|
||||
when( downRecParser.io.frameReq.fire & downRecParser.io.frameReq.bits.frameStyle === FRAME_STYLE_PROBE ){ //下行来了一个嗅探包
|
||||
isReadyToProbe := true.B
|
||||
when( downSendGen.io.stateCurr =/= STATE_IDLE ){
|
||||
@@ -986,10 +943,6 @@ trait SlaveParserProbe{ this: SlaveParserBase =>
|
||||
isAckProbe := false.B
|
||||
}
|
||||
|
||||
|
||||
|
||||
// val isLastDevice = RegInit(true.B)
|
||||
|
||||
when( upRecParser.io.frameReq.fire & upRecParser.io.frameReq.bits.frameStyle === FRAME_STYLE_PROBE ){ //上行来了一个嗅探包
|
||||
isLastDevice := false.B
|
||||
} .elsewhen( isWatchDogOverflow ){
|
||||
@@ -997,9 +950,6 @@ trait SlaveParserProbe{ this: SlaveParserBase =>
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
when( upRecParser.io.frameReq.fire & upRecParser.io.frameReq.bits.frameStyle === FRAME_STYLE_PROBE ){ //上行来了一个嗅探包
|
||||
probeRecCnt := 0.U
|
||||
} .elsewhen( isWatchDogOverflow ){
|
||||
@@ -1031,14 +981,6 @@ trait SlaveParserProbe{ this: SlaveParserBase =>
|
||||
|
||||
io.isLoop := isLastDevice & ~isReadyToProbe
|
||||
|
||||
|
||||
// when( isLastDevice =/= isLastDevice_Pending & ~downSendGen.io.send.valid & ~io.downOut.valid & ~io.upIn.valid ){
|
||||
// isLastDevice := isLastDevice_Pending
|
||||
// }
|
||||
|
||||
// when( isReadyToProbe =/= isReadyToProbe_Pending & ~downSendGen.io.send.valid & ~io.downOut.valid & ~io.upIn.valid ){
|
||||
// isReadyToProbe := isReadyToProbe_Pending
|
||||
// }
|
||||
}
|
||||
|
||||
class SlaveParser extends SlaveParserBase
|
||||
@@ -1055,9 +997,6 @@ with SlaveParserProbe{
|
||||
upRecParser.reset := reset.asBool | io.intHWClr(1)
|
||||
upSendGen.reset := reset.asBool | io.intHWClr(1)
|
||||
|
||||
//downRecParser.io.resp := io.intHWClr(0)
|
||||
//upRecParser.io.resp := io.intHWClr(1)
|
||||
|
||||
io.downRecStat := downRecParser.io.stat
|
||||
io.upRecStat := upRecParser.io.stat
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user