phy/a7_gtp: Allow using GTGREFCLK0/1 input as reference clocks.
Useful when reference clock is generated from a PLL or MMCM.
This commit is contained in:
parent
c1dc02093d
commit
3c1f4dbf6c
|
@ -27,7 +27,9 @@ class QPLLChannel:
|
||||||
|
|
||||||
|
|
||||||
class QPLL(Module):
|
class QPLL(Module):
|
||||||
def __init__(self, gtrefclk0, qpllsettings0, gtrefclk1=0, qpllsettings1=None):
|
def __init__(self,
|
||||||
|
gtrefclk0=0, qpllsettings0=None, gtgrefclk0=0,
|
||||||
|
gtrefclk1=0, qpllsettings1=None, gtgrefclk1=1):
|
||||||
self.channels = []
|
self.channels = []
|
||||||
|
|
||||||
channel_settings = dict()
|
channel_settings = dict()
|
||||||
|
@ -52,10 +54,11 @@ class QPLL(Module):
|
||||||
add_setting("o_PLLXOUTCLK", channel.clk)
|
add_setting("o_PLLXOUTCLK", channel.clk)
|
||||||
add_setting("o_PLLXOUTREFCLK", channel.refclk)
|
add_setting("o_PLLXOUTREFCLK", channel.refclk)
|
||||||
|
|
||||||
self.specials += \
|
self.specials += Instance("GTPE2_COMMON",
|
||||||
Instance("GTPE2_COMMON",
|
|
||||||
i_GTREFCLK0 = gtrefclk0,
|
i_GTREFCLK0 = gtrefclk0,
|
||||||
i_GTREFCLK1 = gtrefclk1,
|
i_GTREFCLK1 = gtrefclk1,
|
||||||
|
i_GTGREFCLK0 = gtgrefclk0,
|
||||||
|
i_GTGREFCLK1 = gtgrefclk1,
|
||||||
i_BGBYPASSB = 1,
|
i_BGBYPASSB = 1,
|
||||||
i_BGMONITORENB = 1,
|
i_BGMONITORENB = 1,
|
||||||
i_BGPDB = 1,
|
i_BGPDB = 1,
|
||||||
|
|
Loading…
Reference in New Issue