phy: remove pads_register parameter (does not save enough, priority to simplicity)
This commit is contained in:
parent
5583fe5543
commit
b7efe0fd46
|
@ -7,21 +7,17 @@ from liteeth.phy.common import *
|
||||||
|
|
||||||
|
|
||||||
class LiteEthPHYGMIITX(Module):
|
class LiteEthPHYGMIITX(Module):
|
||||||
def __init__(self, pads, pads_register=True):
|
def __init__(self, pads):
|
||||||
self.sink = sink = Sink(eth_phy_description(8))
|
self.sink = sink = Sink(eth_phy_description(8))
|
||||||
|
|
||||||
# # #
|
# # #
|
||||||
|
|
||||||
if hasattr(pads, "tx_er"):
|
if hasattr(pads, "tx_er"):
|
||||||
self.sync += pads.tx_er.eq(0)
|
self.sync += pads.tx_er.eq(0)
|
||||||
pads_eq = [
|
self.sync += [
|
||||||
pads.tx_en.eq(sink.stb),
|
pads.tx_en.eq(sink.stb),
|
||||||
pads.tx_data.eq(sink.data)
|
pads.tx_data.eq(sink.data)
|
||||||
]
|
]
|
||||||
if pads_register:
|
|
||||||
self.sync += pads_eq
|
|
||||||
else:
|
|
||||||
self.comb += pads_eq
|
|
||||||
self.comb += sink.ack.eq(1)
|
self.comb += sink.ack.eq(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,11 +27,11 @@ class LiteEthPHYGMIIMIITX(Module):
|
||||||
# # #
|
# # #
|
||||||
|
|
||||||
gmii_tx_pads = Record(tx_pads_layout)
|
gmii_tx_pads = Record(tx_pads_layout)
|
||||||
gmii_tx = LiteEthPHYGMIITX(gmii_tx_pads, pads_register=False)
|
gmii_tx = LiteEthPHYGMIITX(gmii_tx_pads)
|
||||||
self.submodules += gmii_tx
|
self.submodules += gmii_tx
|
||||||
|
|
||||||
mii_tx_pads = Record(tx_pads_layout)
|
mii_tx_pads = Record(tx_pads_layout)
|
||||||
mii_tx = LiteEthPHYMIITX(mii_tx_pads, pads_register=False)
|
mii_tx = LiteEthPHYMIITX(mii_tx_pads)
|
||||||
self.submodules += mii_tx
|
self.submodules += mii_tx
|
||||||
|
|
||||||
demux = Demultiplexer(eth_phy_description(8), 2)
|
demux = Demultiplexer(eth_phy_description(8), 2)
|
||||||
|
|
|
@ -11,7 +11,7 @@ def converter_description(dw):
|
||||||
|
|
||||||
|
|
||||||
class LiteEthPHYMIITX(Module):
|
class LiteEthPHYMIITX(Module):
|
||||||
def __init__(self, pads, pads_register=True):
|
def __init__(self, pads):
|
||||||
self.sink = sink = Sink(eth_phy_description(8))
|
self.sink = sink = Sink(eth_phy_description(8))
|
||||||
|
|
||||||
# # #
|
# # #
|
||||||
|
@ -27,14 +27,10 @@ class LiteEthPHYMIITX(Module):
|
||||||
sink.ack.eq(converter.sink.ack),
|
sink.ack.eq(converter.sink.ack),
|
||||||
converter.source.ack.eq(1)
|
converter.source.ack.eq(1)
|
||||||
]
|
]
|
||||||
pads_eq = [
|
self.sync += [
|
||||||
pads.tx_en.eq(converter.source.stb),
|
pads.tx_en.eq(converter.source.stb),
|
||||||
pads.tx_data.eq(converter.source.data)
|
pads.tx_data.eq(converter.source.data)
|
||||||
]
|
]
|
||||||
if pads_register:
|
|
||||||
self.sync += pads_eq
|
|
||||||
else:
|
|
||||||
self.comb += pads_eq
|
|
||||||
|
|
||||||
|
|
||||||
class LiteEthPHYMIIRX(Module):
|
class LiteEthPHYMIIRX(Module):
|
||||||
|
|
|
@ -11,7 +11,7 @@ from liteeth.phy.common import *
|
||||||
|
|
||||||
|
|
||||||
class LiteEthPHYRGMIITX(Module):
|
class LiteEthPHYRGMIITX(Module):
|
||||||
def __init__(self, pads, pads_register=True):
|
def __init__(self, pads):
|
||||||
self.sink = sink = Sink(eth_phy_description(8))
|
self.sink = sink = Sink(eth_phy_description(8))
|
||||||
|
|
||||||
# # #
|
# # #
|
||||||
|
|
|
@ -11,7 +11,7 @@ from liteeth.phy.common import *
|
||||||
|
|
||||||
|
|
||||||
class LiteEthPHYRGMIITX(Module):
|
class LiteEthPHYRGMIITX(Module):
|
||||||
def __init__(self, pads, pads_register=True):
|
def __init__(self, pads):
|
||||||
self.sink = sink = Sink(eth_phy_description(8))
|
self.sink = sink = Sink(eth_phy_description(8))
|
||||||
|
|
||||||
# # #
|
# # #
|
||||||
|
|
Loading…
Reference in New Issue