From 6249209f941a071aef99cbba4b69854c8a53c0e9 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 28 Jan 2015 22:49:49 +0100 Subject: [PATCH] mac: use eth_phy_description inside mac --- liteeth/mac/core/__init__.py | 8 ++++---- liteeth/mac/core/last_be.py | 4 ++-- liteeth/mac/frontend/sram.py | 4 ++-- liteeth/mac/frontend/wishbone.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/liteeth/mac/core/__init__.py b/liteeth/mac/core/__init__.py index e4c378a8a..2967e0b58 100644 --- a/liteeth/mac/core/__init__.py +++ b/liteeth/mac/core/__init__.py @@ -29,14 +29,14 @@ class LiteEthMACCore(Module, AutoCSR): # 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"}) diff --git a/liteeth/mac/core/last_be.py b/liteeth/mac/core/last_be.py index deaf7fd75..ce39be2ca 100644 --- a/liteeth/mac/core/last_be.py +++ b/liteeth/mac/core/last_be.py @@ -3,7 +3,7 @@ from liteeth.mac.common import * 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() @@ -26,7 +26,7 @@ class LiteEthMACTXLastBE(Module): 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), diff --git a/liteeth/mac/frontend/sram.py b/liteeth/mac/frontend/sram.py index 1ddbea290..fcb698ade 100644 --- a/liteeth/mac/frontend/sram.py +++ b/liteeth/mac/frontend/sram.py @@ -6,7 +6,7 @@ from migen.bank.eventmanager import * 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) @@ -131,7 +131,7 @@ class LiteEthMACSRAMWriter(Module, AutoCSR): 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 diff --git a/liteeth/mac/frontend/wishbone.py b/liteeth/mac/frontend/wishbone.py index b2baf3727..c6cf67186 100644 --- a/liteeth/mac/frontend/wishbone.py +++ b/liteeth/mac/frontend/wishbone.py @@ -7,8 +7,8 @@ from migen.fhdl.simplify import FullMemoryWE 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