self.clk_24_i = Signal(name="ref", reset_less=True) # external incoming
self.sel_a0_i = Signal(name="a0", reset_less=True) # PLL selection
self.sel_a1_i = Signal(name="a1", reset_less=True) # PLL selection
- self.clk_sel_i = Signal(2, reset_less=True) # same as a0,a1
self.clk_pll_o = Signal(name="out", reset_less=True) # output clock
self.pll_18_o = Signal(name="div_out_test", reset_less=True) # test out
self.pll_ana_o = Signal(name="vco_test_ana", reset_less=True) # analog
m.d.comb += self.pll_ana_o.eq(self.clk_24_i)
m.d.comb += self.pll_18_o.eq(~self.clk_24_i)
- # same API
- m.d.comb += self.clk_sel_i.eq(Cat(self.sel_a0_i, self.sel_a1_i))
-
#self.attrs['blackbox'] = 1
return m
self.pll_en = hasattr(pspec, "use_pll") and pspec.use_pll
if self.pll_en:
self.pll_18_o = Signal(reset_less=True)
+ self.clk_sel_i = Signal(reset_less=True)
def elaborate(self, platform):
m = Module()
# output 18 mhz PLL test signal
comb += self.pll_18_o.eq(pll.pll_18_o)
+ # input to pll clock selection
+ comb += Cat(pll.sel_a0_i, pll.sel_a1_i).eq(self.clk_sel_i)
+
# now wire up ResetSignals. don't mind them being in this domain
pll_rst = ResetSignal("pllclk")
comb += pll_rst.eq(ResetSignal())
ports.append(ClockSignal())
ports.append(ResetSignal())
if self.pll_en:
- ports.append(self.pll.clk_sel_i)
+ ports.append(self.clk_sel_i)
ports.append(self.pll_18_o)
ports.append(self.pll.pll_ana_o)
return ports