phy: remove pads_register parameter (does not save enough, priority to simplicity)

This commit is contained in:
Florent Kermarrec 2016-03-15 15:33:13 +01:00
parent 5583fe5543
commit b7efe0fd46
5 changed files with 8 additions and 16 deletions

View File

@ -7,21 +7,17 @@ from liteeth.phy.common import *
class LiteEthPHYGMIITX(Module):
def __init__(self, pads, pads_register=True):
def __init__(self, pads):
self.sink = sink = Sink(eth_phy_description(8))
# # #
if hasattr(pads, "tx_er"):
self.sync += pads.tx_er.eq(0)
pads_eq = [
self.sync += [
pads.tx_en.eq(sink.stb),
pads.tx_data.eq(sink.data)
]
if pads_register:
self.sync += pads_eq
else:
self.comb += pads_eq
self.comb += sink.ack.eq(1)

View File

@ -27,11 +27,11 @@ class LiteEthPHYGMIIMIITX(Module):
# # #
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
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
demux = Demultiplexer(eth_phy_description(8), 2)

View File

@ -11,7 +11,7 @@ def converter_description(dw):
class LiteEthPHYMIITX(Module):
def __init__(self, pads, pads_register=True):
def __init__(self, pads):
self.sink = sink = Sink(eth_phy_description(8))
# # #
@ -27,14 +27,10 @@ class LiteEthPHYMIITX(Module):
sink.ack.eq(converter.sink.ack),
converter.source.ack.eq(1)
]
pads_eq = [
self.sync += [
pads.tx_en.eq(converter.source.stb),
pads.tx_data.eq(converter.source.data)
]
if pads_register:
self.sync += pads_eq
else:
self.comb += pads_eq
class LiteEthPHYMIIRX(Module):

View File

@ -11,7 +11,7 @@ from liteeth.phy.common import *
class LiteEthPHYRGMIITX(Module):
def __init__(self, pads, pads_register=True):
def __init__(self, pads):
self.sink = sink = Sink(eth_phy_description(8))
# # #

View File

@ -11,7 +11,7 @@ from liteeth.phy.common import *
class LiteEthPHYRGMIITX(Module):
def __init__(self, pads, pads_register=True):
def __init__(self, pads):
self.sink = sink = Sink(eth_phy_description(8))
# # #