849f2341759b476db9fa75a0fe26c26003bcf0f5
[litex.git] / liteeth / __init__.py
1 from liteeth.common import *
2 from liteeth.generic.arbiter import Arbiter
3 from liteeth.generic.dispatcher import Dispatcher
4 from liteeth.mac import LiteEthMAC
5 from liteeth.arp import LiteEthARP
6 from liteeth.ip import LiteEthIP
7
8 class LiteEthIPStack(Module, AutoCSR):
9 def __init__(self, phy, mac_address, ip_address):
10 self.phy = phy
11 self.submodules.mac = mac = LiteEthMAC(phy, 8, interface="crossbar", with_hw_preamble_crc=True)
12 self.submodules.arp = arp = LiteEthARP(mac, mac_address, ip_address)
13 self.submodules.ip = ip = LiteEthIP(mac, mac_address, ip_address, arp.table)
14 self.sink, self.source = self.ip.sink, self.ip.source