修复中断丢脉冲问题,但每次脉冲宽度比设置多一拍
This commit is contained in:
@@ -1229,15 +1229,15 @@ trait InterfaceInterrupt{ this: InterfaceBase =>
|
|||||||
intHWErr(0) | //下行接收硬件错误
|
intHWErr(0) | //下行接收硬件错误
|
||||||
intHWErr(1) //上行接收硬件错误
|
intHWErr(1) //上行接收硬件错误
|
||||||
|
|
||||||
when( intPulseResetCnt === intPulseWidth ){
|
when( trigIntPulse ){
|
||||||
intPulse := false.B
|
|
||||||
} .elsewhen( trigIntPulse ){
|
|
||||||
intPulse := true.B
|
intPulse := true.B
|
||||||
|
} .elsewhen( intPulseResetCnt === intPulseWidth ){
|
||||||
|
intPulse := false.B
|
||||||
}
|
}
|
||||||
|
|
||||||
when( trigIntPulse ){
|
when( trigIntPulse ){
|
||||||
intPulseResetCnt := 0.U
|
intPulseResetCnt := 0.U
|
||||||
} .elsewhen( (intPulseResetCnt < intPulseWidth) & (intPulse === true.B) ){
|
} .elsewhen( (intPulseResetCnt <= intPulseWidth) & (intPulse === true.B) ){
|
||||||
intPulseResetCnt := intPulseResetCnt + 1.U
|
intPulseResetCnt := intPulseResetCnt + 1.U
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user