forked from M-Labs/artiq
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)
This commit is contained in:
parent
f3cd0fc675
commit
85bb641917
@ -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))
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user