liteeth/phy/gmii : set tx_er to 0 only if it exits
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 17 Mar 2015 11:24:06 +0000 (12:24 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 17 Mar 2015 11:24:06 +0000 (12:24 +0100)
misoclib/com/liteeth/phy/gmii.py

index 1b8893a56cba8ac00d5478afd72c18d329960a99..3d020b92802e7bd21a31e9f424067e1fd6dc8d3b 100644 (file)
@@ -7,8 +7,9 @@ class LiteEthPHYGMIITX(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)
                self.sync += [
-                       pads.tx_er.eq(0),
                        pads.tx_en.eq(sink.stb),
                        pads.tx_data.eq(sink.data)
                ]