core: Add buffers to IP and ICMP
This commit is contained in:
parent
4eec8419d0
commit
1b09112237
|
@ -10,6 +10,7 @@ from litex.soc.interconnect.packet import PacketFIFO
|
|||
|
||||
from liteeth.common import *
|
||||
from liteeth.packet import Depacketizer, Packetizer
|
||||
from litex.soc.interconnect.stream import BufferizeEndpoints, DIR_SOURCE, DIR_SINK
|
||||
|
||||
# ICMP TX ------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -160,6 +161,9 @@ class LiteEthICMP(LiteXModule):
|
|||
def __init__(self, ip, ip_address, dw=8, fifo_depth=128):
|
||||
self.tx = tx = LiteEthICMPTX(ip_address, dw)
|
||||
self.rx = rx = LiteEthICMPRX(ip_address, dw)
|
||||
|
||||
rx = BufferizeEndpoints({"source": DIR_SOURCE}, pipe_valid=True, pipe_ready=False)(rx)
|
||||
|
||||
self.echo = echo = LiteEthICMPEcho(dw, fifo_depth=fifo_depth)
|
||||
self.comb += [
|
||||
rx.source.connect(echo.sink),
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
from litex.gen import *
|
||||
|
||||
from litex.soc.interconnect.stream import BufferizeEndpoints, DIR_SOURCE, DIR_SINK
|
||||
from liteeth.common import *
|
||||
from liteeth.crossbar import LiteEthCrossbar
|
||||
|
||||
|
@ -261,6 +262,9 @@ class LiteEthIP(LiteXModule):
|
|||
def __init__(self, mac, mac_address, ip_address, arp_table, with_broadcast=True, dw=8):
|
||||
self.tx = tx = LiteEthIPTX(mac_address, ip_address, arp_table, dw=dw)
|
||||
self.rx = rx = LiteEthIPRX(mac_address, ip_address, with_broadcast, dw=dw)
|
||||
|
||||
rx = BufferizeEndpoints({"source": DIR_SOURCE}, pipe_valid=True, pipe_ready=False)(rx)
|
||||
|
||||
mac_port = mac.crossbar.get_port(ethernet_type_ip, dw)
|
||||
self.comb += [
|
||||
tx.source.connect(mac_port.sink),
|
||||
|
|
Loading…
Reference in New Issue