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