Skip to content

Commit

Permalink
phy/pcs_1000basex: Add missing RX Align during AUTONEG_WAIT_ABI state…
Browse files Browse the repository at this point in the history
… and enable/connect it on all PHYs.
  • Loading branch information
enjoy-digital committed Oct 15, 2024
1 parent 7e602c4 commit e5746c8
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 18 deletions.
6 changes: 3 additions & 3 deletions liteeth/phy/a7_1000basex.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,9 @@ def __init__(self, qpll_channel, data_pads, sys_clk_freq, with_csr=True,
o_RXBYTEISALIGNED = Open(),
o_RXBYTEREALIGN = Open(),
o_RXCOMMADET = Open(),
i_RXCOMMADETEN = 0,
i_RXMCOMMAALIGNEN = 0,
i_RXPCOMMAALIGNEN = 0,
i_RXCOMMADETEN = 0b1,
i_RXMCOMMAALIGNEN = pcs.align,
i_RXPCOMMAALIGNEN = pcs.align,
i_RXSLIDE = 0,
# Receive Ports - RX Channel Bonding Ports
o_RXCHANBONDSEQ = Open(),
Expand Down
6 changes: 3 additions & 3 deletions liteeth/phy/k7_1000basex.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,9 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
o_RXBYTEISALIGNED = Open(),
o_RXBYTEREALIGN = Open(),
o_RXCOMMADET = Open(),
i_RXCOMMADETEN = 1,
i_RXMCOMMAALIGNEN = 1,
i_RXPCOMMAALIGNEN = 1,
i_RXCOMMADETEN = 0b1,
i_RXMCOMMAALIGNEN = pcs.align,
i_RXPCOMMAALIGNEN = pcs.align,

# Receive Ports - RX Channel Bonding Ports
o_RXCHANBONDSEQ = Open(),
Expand Down
6 changes: 3 additions & 3 deletions liteeth/phy/ku_1000basex.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
i_RXCHBONDLEVEL = 0b000,
i_RXCHBONDMASTER = 0b0,
i_RXCHBONDSLAVE = 0b0,
i_RXCOMMADETEN = 0b0,
i_RXCOMMADETEN = 0b1,
i_RXDFEAGCCTRL = 0b01,
i_RXDFEAGCHOLD = 0b0,
i_RXDFEAGCOVRDEN = 0b0,
Expand Down Expand Up @@ -593,7 +593,7 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
i_RXLPMLFKLOVRDEN = 0b0,
i_RXLPMOSHOLD = 0b0,
i_RXLPMOSOVRDEN = 0b0,
i_RXMCOMMAALIGNEN = 0b0,
i_RXMCOMMAALIGNEN = pcs.align,
i_RXMONITORSEL = 0b00,
i_RXOOBRESET = 0b0,
i_RXOSCALRESET = 0b0,
Expand All @@ -606,7 +606,7 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
i_RXOSINTTESTOVRDEN = 0b0,
i_RXOSOVRDEN = 0b0,
i_RXOUTCLKSEL = 0b101,
i_RXPCOMMAALIGNEN = 0b0,
i_RXPCOMMAALIGNEN = pcs.align,
i_RXPCSRESET = 0b0,
i_RXPD = 0b00,
i_RXPHALIGNEN = 0b0,
Expand Down
3 changes: 3 additions & 0 deletions liteeth/phy/pcs_1000basex.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ def __init__(self, lsb_first=False, check_period=6e-3, more_ack_time=10e-3):

self.link_up = Signal()
self.restart = Signal()
self.align = Signal()


self.lp_abi = BusSynchronizer(16, "eth_rx", "eth_tx")

Expand Down Expand Up @@ -387,6 +389,7 @@ def __init__(self, lsb_first=False, check_period=6e-3, more_ack_time=10e-3):
)
# ABILITY_DETECT
fsm.act("AUTONEG_WAIT_ABI",
self.align.eq(1),
self.tx.config_valid.eq(1),
If(rx_config_reg_abi.o,
NextState("AUTONEG_WAIT_ACK")
Expand Down
6 changes: 3 additions & 3 deletions liteeth/phy/usp_gth_1000basex.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
i_RXCHBONDLEVEL = 0b000,
i_RXCHBONDMASTER = 0b0,
i_RXCHBONDSLAVE = 0b0,
i_RXCOMMADETEN = 0b0,
i_RXCOMMADETEN = 0b1,
i_RXDFEAGCCTRL = 0b01,
i_RXDFEAGCHOLD = 0b0,
i_RXDFEAGCOVRDEN = 0b0,
Expand Down Expand Up @@ -668,14 +668,14 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
i_RXLPMLFKLOVRDEN = 0b0,
i_RXLPMOSHOLD = 0b0,
i_RXLPMOSOVRDEN = 0b0,
i_RXMCOMMAALIGNEN = 0b0,
i_RXMCOMMAALIGNEN = pcs.align,
i_RXMONITORSEL = 0b00,
i_RXOOBRESET = 0b0,
i_RXOSCALRESET = 0b0,
i_RXOSHOLD = 0b0,
i_RXOSOVRDEN = 0b0,
i_RXOUTCLKSEL = 0b101,
i_RXPCOMMAALIGNEN = 0b0,
i_RXPCOMMAALIGNEN = pcs.align,
i_RXPCSRESET = 0b0,
i_RXPD = 0b00,
i_RXPHALIGNEN = 0b0,
Expand Down
6 changes: 3 additions & 3 deletions liteeth/phy/usp_gty_1000basex.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
i_RXCHBONDSLAVE = 0b0,
i_RXCKCALRESET = 0b0,
i_RXCKCALSTART = 0b0,
i_RXCOMMADETEN = 0b0,
i_RXCOMMADETEN = 0b1,
i_RXDFEAGCHOLD = 0b0,
i_RXDFEAGCOVRDEN = 0b0,
i_RXDFECFOKFCNUM = 0b0,
Expand Down Expand Up @@ -704,14 +704,14 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
i_RXLPMLFKLOVRDEN = 0b0,
i_RXLPMOSHOLD = 0b0,
i_RXLPMOSOVRDEN = 0b0,
i_RXMCOMMAALIGNEN = 0b0,
i_RXMCOMMAALIGNEN = pcs.align,
i_RXMONITORSEL = 0b00,
i_RXOOBRESET = 0b0,
i_RXOSCALRESET = 0b0,
i_RXOSHOLD = 0b0,
i_RXOSOVRDEN = 0b0,
i_RXOUTCLKSEL = 0b101,
i_RXPCOMMAALIGNEN = 0b0,
i_RXPCOMMAALIGNEN = pcs.align,
i_RXPCSRESET = 0b0,
i_RXPD = 0b00,
i_RXPHALIGN = 0b0,
Expand Down
6 changes: 3 additions & 3 deletions liteeth/phy/v7_1000basex.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,9 @@ def __init__(self, refclk_or_clk_pads, data_pads, sys_clk_freq, refclk_freq=200e
o_RXBYTEISALIGNED = Open(),
o_RXBYTEREALIGN = Open(),
o_RXCOMMADET = Open(),
i_RXCOMMADETEN = 1,
i_RXMCOMMAALIGNEN = 1,
i_RXPCOMMAALIGNEN = 1,
i_RXCOMMADETEN = 0b1,
i_RXMCOMMAALIGNEN = pcs.align,
i_RXPCOMMAALIGNEN = pcs.align,

# Receive Ports - RX Channel Bonding Ports
o_RXCHANBONDSEQ = Open(),
Expand Down

0 comments on commit e5746c8

Please sign in to comment.