self.locked = Signal()
self.serdesstrobe = Signal()
- self._cd_pix = ClockDomain()
- self._cd_pix5x = ClockDomain()
- self._cd_pix20x = ClockDomain()
+ self.clock_domains._cd_pix = ClockDomain()
+ self.clock_domains._cd_pix5x = ClockDomain()
+ self.clock_domains._cd_pix20x = ClockDomain()
###
self.specials += Instance("PLL_BASE",
Instance.Parameter("CLKIN_PERIOD", 22.0),
Instance.Parameter("CLKFBOUT_MULT", 20),
- Instance.Parameter("CLKOUT0_DIVIDE", 20), # pix
+ Instance.Parameter("CLKOUT0_DIVIDE", 1), # pix20x
Instance.Parameter("CLKOUT1_DIVIDE", 4), # pix5x
- Instance.Parameter("CLKOUT2_DIVIDE", 1), # pix20x
+ Instance.Parameter("CLKOUT2_DIVIDE", 20), # pix
Instance.Parameter("COMPENSATION", "INTERNAL"),
Instance.Output("CLKFBOUT", clkfbout),
Instance.Input("RST", self._r_pll_reset.field.r)
)
- self.specials += Instance("BUFG",
- Instance.Input("I", pll_clk0), Instance.Output("O", self._cd_pix.clk))
- self.specials += Instance("BUFG",
- Instance.Input("I", pll_clk1), Instance.Output("O", self._cd_pix5x.clk))
locked_async = Signal()
self.specials += Instance("BUFPLL",
Instance.Parameter("DIVIDE", 4),
- Instance.Input("PLLIN", pll_clk2),
+ Instance.Input("PLLIN", pll_clk0),
Instance.ClockPort("GCLK", "pix5x"),
Instance.Input("LOCKED", pll_locked),
Instance.Output("IOCLK", self._cd_pix20x.clk),
)
self.specials += MultiReg(locked_async, self.locked, "sys")
self.comb += self._r_locked.field.w.eq(self.locked)
+ self.specials += Instance("BUFG",
+ Instance.Input("I", pll_clk1), Instance.Output("O", self._cd_pix5x.clk))
+ self.specials += Instance("BUFG",
+ Instance.Input("I", pll_clk2), Instance.Output("O", self._cd_pix.clk))
delay_ce = Signal()
delay_rst = Signal()
delay_init = Signal()
- self.specials += Instance("IDELAY2",
+ self.specials += Instance("IODELAY2",
Instance.Parameter("DELAY_SRC", "IDATAIN"),
Instance.Parameter("IDELAY_TYPE", "VARIABLE_FROM_ZERO"),
- Instance.Parameter("COUNTER_WRAP_AROUND", "STAY_AT_LIMIT"),
+ Instance.Parameter("COUNTER_WRAPAROUND", "STAY_AT_LIMIT"),
Instance.Input("IDATAIN", self.pad),
Instance.Output("DATAOUT", pad_delayed),
Instance.Input("INC", delay_inc | delay_init),