self.clk_sel_i = Signal(2, reset_less=True) # PLL selection
self.clk_pll_o = Signal(reset_less=True) # output fake PLL clock
self.pll_18_o = Signal(reset_less=True) # 16-divide from PLL
- self.clk_lck_o = Signal(reset_less=True) # output fake PLL "lock"
+ self.pll_lck_o = Signal(reset_less=True) # output fake PLL "lock"
def elaborate(self, platform):
m = Module()
# 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.clk_lck_o.eq(self.clk_24_i)
+ m.d.comb += self.pll_lck_o.eq(self.clk_24_i)
return m
if variant == "ls180":
self.pll_18_o = Signal()
self.clk_sel = Signal(3)
+ 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
+ self.cpu_params['o_pll_lck_o'] = self.pll_lck_o
# add wishbone buses to cpu params
self.cpu_params.update(make_wb_bus("ibus", ibus))
("sys_rst", 0, Pins("R1"), IOStandard("LVCMOS33")),
("sys_clksel_i", 0, Pins("R1 R2 R3"), IOStandard("LVCMOS33")),
("sys_pll_18_o", 0, Pins("R1"), IOStandard("LVCMOS33")),
+ ("sys_pll_lck_o", 0, Pins("R1"), IOStandard("LVCMOS33")),
# JTAG0: 4 pins
("jtag", 0,
# PLL/Clock Select
clksel_i = platform.request("sys_clksel_i")
pll18_o = platform.request("sys_pll_18_o")
+ pll_lck_o = platform.request("sys_pll_lck_o")
self.comb += self.cpu.clk_sel.eq(clksel_i) # allow clock src select
self.comb += pll18_o.eq(self.cpu.pll_18_o) # "test feed" from the PLL
+ self.comb += pll_lck_o.eq(self.cpu.pll_lck_o) # PLL lock flag
#ram_init = []
if self.pll_en:
ports.append(self.pll.clk_sel_i)
ports.append(self.pll.pll_18_o)
- ports.append(self.pll.clk_lck_o)
+ ports.append(self.pll.pll_lck_o)
return ports