wrpll.ddmtd: fix first edge deglitcher

The blind counter should be held in reset whenever the input is high,
not just when there is a rising edge (otherwise the counter runs down
during the main pulse and can then re-trigger on jitter from the falling edge)
pull/1529/head
hartytp 2020-10-06 15:42:37 +01:00 committed by Sebastien Bourdeauducq
parent f3cd0fc675
commit 85bb641917
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ class DDMTDDeglitcherFirstEdge(Module):
blind_counter = Signal(max=blind_period)
self.sync.helper += [
If(blind_counter != 0, blind_counter.eq(blind_counter - 1)),
If(rising, blind_counter.eq(blind_period - 1)),
If(input_signal_r, blind_counter.eq(blind_period - 1)),
self.detect.eq(rising & (blind_counter == 0))
]