phy/titaniumrgmii.py: uses ClockSignal for DDRInput/DDROutput/ClkOutput, added cd for eth_tx_delayed, removed name=xxx for clkout with a cd

This commit is contained in:
Gwenhael Goavec-Merou 2024-09-10 11:52:48 +02:00
parent 88387cbd11
commit 9496fd229f
1 changed files with 12 additions and 11 deletions

View File

@ -36,7 +36,7 @@ class LiteEthPHYRGMIITX(LiteXModule):
i1 = tx_data_h[i], i1 = tx_data_h[i],
i2 = tx_data_l[i], i2 = tx_data_l[i],
o = pads.tx_data[i], o = pads.tx_data[i],
clk = f"auto_eth{n}_tx_clk", # FIXME: Use Clk Signal. clk = ClockSignal("eth_tx"),
) )
# TX Ctl IOs. # TX Ctl IOs.
@ -47,7 +47,7 @@ class LiteEthPHYRGMIITX(LiteXModule):
i1 = tx_ctl_h, i1 = tx_ctl_h,
i2 = tx_ctl_l, i2 = tx_ctl_l,
o = pads.tx_ctl, o = pads.tx_ctl,
clk = f"auto_eth{n}_tx_clk", # FIXME: Use Clk Signal. clk = ClockSignal("eth_tx"),
) )
# Logic. # Logic.
@ -80,7 +80,7 @@ class LiteEthPHYRGMIIRX(LiteXModule):
i = pads.rx_data[i], i = pads.rx_data[i],
o1 = rx_data_h[i], o1 = rx_data_h[i],
o2 = rx_data_l[i], o2 = rx_data_l[i],
clk = f"auto_eth{n}_rx_clk", # FIXME: Use Clk Signal. clk = ClockSignal("eth_rx"),
) )
# RX Ctl IOs. # RX Ctl IOs.
@ -91,7 +91,7 @@ class LiteEthPHYRGMIIRX(LiteXModule):
i = pads.rx_ctl, i = pads.rx_ctl,
o1 = rx_ctl_h, o1 = rx_ctl_h,
o2 = rx_ctl_l, o2 = rx_ctl_l,
clk = f"auto_eth{n}_rx_clk", # FIXME: Use Clk Signal. clk = ClockSignal("eth_rx"),
) )
rx_ctl = rx_ctl_h rx_ctl = rx_ctl_h
@ -125,6 +125,7 @@ class LiteEthPHYRGMIICRG(LiteXModule):
# ------------ # ------------
self.cd_eth_rx = ClockDomain() self.cd_eth_rx = ClockDomain()
self.cd_eth_tx = ClockDomain() self.cd_eth_tx = ClockDomain()
self.cd_eth_tx_delayed = ClockDomain(reset_less=True)
# RX Clk. # RX Clk.
# ------- # -------
@ -136,7 +137,7 @@ class LiteEthPHYRGMIICRG(LiteXModule):
# TX Clk. # TX Clk.
# ------- # -------
self.specials += ClkOutput( self.specials += ClkOutput(
i = f"auto_eth{n}_tx_clk_delayed", # FIXME: Use Clk Signal. i = ClockSignal("eth_tx_delayed"),
o = clock_pads.tx o = clock_pads.tx
) )
@ -144,9 +145,9 @@ class LiteEthPHYRGMIICRG(LiteXModule):
# ------- # -------
self.pll = pll = TITANIUMPLL(platform) self.pll = pll = TITANIUMPLL(platform)
pll.register_clkin(None, freq=125e6, name=f"auto_eth{n}_rx_clk_in0") # FIXME: 0 is to match ClkInput pll.register_clkin(None, freq=125e6, name=f"auto_eth{n}_rx_clk_in0") # FIXME: 0 is to match ClkInput
pll.create_clkout(self.cd_eth_rx, freq=125e6, phase=0, name=f"auto_eth{n}_rx_clk", with_reset=False) pll.create_clkout(self.cd_eth_rx, freq=125e6, phase=0, with_reset=False)
pll.create_clkout(self.cd_eth_tx, freq=125e6, phase=0, name=f"auto_eth{n}_tx_clk", with_reset=False) pll.create_clkout(self.cd_eth_tx, freq=125e6, phase=0, with_reset=False)
pll.create_clkout(None, freq=125e6, phase=90, name=f"auto_eth{n}_tx_clk_delayed") pll.create_clkout(self.cd_eth_tx_delayed, freq=125e6, phase=90)
# Reset. # Reset.
# ------ # ------