# Converters
reverse = endianness == "be"
- tx_converter = Converter(eth_mac_description(dw), eth_mac_description(phy.dw), reverse=reverse)
- rx_converter = Converter(eth_mac_description(phy.dw), eth_mac_description(dw), reverse=reverse)
+ tx_converter = Converter(eth_phy_description(dw), eth_phy_description(phy.dw), reverse=reverse)
+ rx_converter = Converter(eth_phy_description(phy.dw), eth_phy_description(dw), reverse=reverse)
self.submodules += RenameClockDomains(tx_converter, "eth_tx")
self.submodules += RenameClockDomains(rx_converter, "eth_rx")
# Cross Domain Crossing
- tx_cdc = AsyncFIFO(eth_mac_description(dw), 4)
- rx_cdc = AsyncFIFO(eth_mac_description(dw), 4)
+ tx_cdc = AsyncFIFO(eth_phy_description(dw), 4)
+ rx_cdc = AsyncFIFO(eth_phy_description(dw), 4)
self.submodules += RenameClockDomains(tx_cdc, {"write": "sys", "read": "eth_tx"})
self.submodules += RenameClockDomains(rx_cdc, {"write": "eth_rx", "read": "sys"})
class LiteEthMACTXLastBE(Module):
def __init__(self, dw):
- self.sink = sink = Sink(eth_mac_description(dw))
+ self.sink = sink = Sink(eth_phy_description(dw))
self.source = source = Source(eth_phy_description(dw))
###
ongoing = Signal()
class LiteEthMACRXLastBE(Module):
def __init__(self, dw):
self.sink = sink = Sink(eth_phy_description(dw))
- self.source = source = Source(eth_mac_description(dw))
+ self.source = source = Source(eth_phy_description(dw))
###
self.comb += [
source.stb.eq(sink.stb),
class LiteEthMACSRAMWriter(Module, AutoCSR):
def __init__(self, dw, depth, nslots=2):
- self.sink = sink = Sink(eth_mac_description(dw))
+ self.sink = sink = Sink(eth_phy_description(dw))
self.crc_error = Signal()
slotbits = max(log2_int(nslots), 1)
class LiteEthMACSRAMReader(Module, AutoCSR):
def __init__(self, dw, depth, nslots=2):
- self.source = source = Source(eth_mac_description(dw))
+ self.source = source = Source(eth_phy_description(dw))
slotbits = max(log2_int(nslots), 1)
lengthbits = log2_int(depth*4) # length in bytes
class LiteEthMACWishboneInterface(Module, AutoCSR):
def __init__(self, dw, nrxslots=2, ntxslots=2):
- self.sink = Sink(eth_mac_description(dw))
- self.source = Source(eth_mac_description(dw))
+ self.sink = Sink(eth_phy_description(dw))
+ self.source = Source(eth_phy_description(dw))
self.bus = wishbone.Interface()
###
# storage in SRAM