We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5126f61 commit 28cb970Copy full SHA for 28cb970
milkymist/dvisampler/clocking.py
@@ -57,5 +57,20 @@ def __init__(self):
57
self.specials += Instance("BUFG",
58
Instance.Input("I", pll_clk2), Instance.Output("O", self._cd_pix.clk))
59
self.specials += MultiReg(locked_async, self.locked, "sys")
60
- self.specials += MultiReg(~locked_async, self._cd_pix5x.rst, "pix5x")
61
self.comb += self._r_locked.field.w.eq(self.locked)
+
62
+ # sychronize pix5x reset
63
+ # this reset is also sampled in the sys clock domain, also guarantee
64
+ # a sufficient minimum pulse width.
65
+ pix5x_rst_n = 1
66
+ for i in range(5):
67
+ new_pix5x_rst_n = Signal()
68
+ self.specials += Instance("FDCE",
69
+ Instance.Input("D", pix5x_rst_n),
70
+ Instance.Input("CE", 1),
71
+ Instance.Input("C", ClockSignal("pix5x")),
72
+ Instance.Input("CLR", ~locked_async),
73
+ Instance.Output("Q", new_pix5x_rst_n)
74
+ )
75
+ pix5x_rst_n = new_pix5x_rst_n
76
+ self.comb += self._cd_pix5x.rst.eq(~pix5x_rst_n)
0 commit comments