From 8c722db54e5192aa298d8ff5dd2d63989f443830 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Sun, 12 Apr 2015 14:43:35 +0200 Subject: [PATCH] liteeth/phy/mii: assign tx_er only if exists (as it's done on GMII) --- misoclib/com/liteeth/phy/mii.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misoclib/com/liteeth/phy/mii.py b/misoclib/com/liteeth/phy/mii.py index 13d39ffb0..f42768fe3 100644 --- a/misoclib/com/liteeth/phy/mii.py +++ b/misoclib/com/liteeth/phy/mii.py @@ -5,12 +5,13 @@ class LiteEthPHYMIITX(Module): def __init__(self, pads): self.sink = sink = Sink(eth_phy_description(8)) ### + if hasattr(pads, "tx_er"): + self.sync += pads.tx_er.eq(0) tx_en_r = Signal() tx_data_r = Signal(4) self.sync += [ - pads.tx_er.eq(0), pads.tx_en.eq(tx_en_r), - pads.tx_data.eq(tx_data_r), + pads.tx_data.eq(tx_data_r) ] fsm = FSM(reset_state="IDLE")