litex/liteeth/core/__init__.py

20 lines
896 B
Python
Raw Normal View History

2015-02-04 13:57:20 -05:00
from liteeth.common import *
from liteeth.generic import *
2015-02-04 13:57:20 -05:00
from liteeth.mac import LiteEthMAC
from liteeth.core.arp import LiteEthARP
from liteeth.core.ip import LiteEthIP
2015-02-04 15:15:01 -05:00
from liteeth.core.udp import LiteEthUDP
2015-02-05 19:38:30 -05:00
from liteeth.core.icmp import LiteEthICMP
2015-02-04 13:57:20 -05:00
class LiteEthIPCore(Module, AutoCSR):
def __init__(self, phy, mac_address, ip_address, clk_freq):
2015-02-04 15:15:01 -05:00
self.submodules.mac = LiteEthMAC(phy, 8, interface="crossbar", with_hw_preamble_crc=True)
self.submodules.arp = LiteEthARP(self.mac, mac_address, ip_address, clk_freq)
2015-02-04 15:15:01 -05:00
self.submodules.ip = LiteEthIP(self.mac, mac_address, ip_address, self.arp.table)
2015-02-05 19:38:30 -05:00
self.submodules.icmp = LiteEthICMP(self.ip, ip_address)
2015-02-04 15:15:01 -05:00
class LiteEthUDPIPCore(LiteEthIPCore):
2015-02-09 05:19:26 -05:00
def __init__(self, phy, mac_address, ip_address, clk_freq):
LiteEthIPCore.__init__(self, phy, mac_address, ip_address, clk_freq)
2015-02-09 05:19:26 -05:00
self.submodules.udp = LiteEthUDP(self.ip, ip_address)