m = Module()
m.d.comb += self.clk_pll_o.eq(self.clk_24_i) # just pass through
# just get something, stops yosys destroying (optimising) these out
- m.d.comb += self.pll_18_o.eq(self.clk_24_i)
with m.If(self.clk_sel_i == Const(0, 2)):
m.d.comb += self.pll_lck_o.eq(self.clk_24_i)
+ m.d.comb += self.pll_18_o.eq(~self.clk_24_i)
return m
# add clock select, pll output
if variant == "ls180":
self.pll_18_o = Signal()
- self.clk_sel = Signal(3)
+ self.clk_sel = Signal(2)
self.pll_lck_o = Signal()
self.cpu_params['i_clk_sel_i'] = self.clk_sel
self.cpu_params['o_pll_18_o'] = self.pll_18_o
# CLK/RST: 2 pins
("sys_clk", 0, Pins("G2"), IOStandard("LVCMOS33")),
("sys_rst", 0, Pins("R1"), IOStandard("LVCMOS33")),
- ("sys_clksel_i", 0, Pins("R1 R2 R3"), IOStandard("LVCMOS33")),
+ ("sys_clksel_i", 0, Pins("R1 R2"), IOStandard("LVCMOS33")),
("sys_pll_18_o", 0, Pins("R1"), IOStandard("LVCMOS33")),
("sys_pll_lck_o", 0, Pins("R1"), IOStandard("LVCMOS33")),
# PLL direct clock or not
self.pll_en = hasattr(pspec, "use_pll") and pspec.use_pll
+ if self.pll_en:
+ self.pll_18_o = Signal(reset_less=True)
def elaborate(self, platform):
m = Module()
# wire up external 24mhz to PLL
comb += pll.clk_24_i.eq(ClockSignal())
+ # output 18 mhz PLL test signal
+ comb += self.pll_18_o.eq(pll.pll_18_o)
+
# now wire up ResetSignals. don't mind them being in this domain
pll_rst = ResetSignal("pllclk")
comb += pll_rst.eq(ResetSignal())
ports.append(ResetSignal())
if self.pll_en:
ports.append(self.pll.clk_sel_i)
- ports.append(self.pll.pll_18_o)
+ ports.append(self.pll_18_o)
ports.append(self.pll.pll_lck_o)
return ports