litex/liteeth/mac/__init__.py

18 lines
672 B
Python
Raw Normal View History

2015-01-28 03:14:01 -05:00
from liteeth.common import *
from liteeth.mac.core import LiteEthMACCore
from liteeth.mac.frontend import wishbone
class LiteEthMAC(Module, AutoCSR):
def __init__(self, phy, interface="wishbone", dw, endianness="be",
with_hw_preamble_crc=True):
self.submodules.core = LiteEthMACCore(phy, endianness, with_hw_preamble)
2015-01-27 17:59:06 -05:00
if interface == "wishbone":
2015-01-28 03:14:01 -05:00
self.interface = wishbone.LiteETHMACWishboneInterface(), dw, nrxslots, ntxslots)
elif interface == "dma":
2015-01-27 17:59:06 -05:00
raise NotImplementedError
2015-01-28 03:14:01 -05:00
elif interface == "core":
self.sink = self.core.sink
self.source = self.core.source
2015-01-27 17:59:06 -05:00
else:
2015-01-28 03:14:01 -05:00
raise ValueError("EthMAC only supports Wishbone, DMA or core interfaces")