mirror of
https://github.com/enjoy-digital/liteeth.git
synced 2025-01-03 03:43:37 -05:00
core: add separators.
This commit is contained in:
parent
bb29706e71
commit
c26281882a
4 changed files with 22 additions and 24 deletions
|
@ -1,4 +1,4 @@
|
|||
# This file is Copyright (c) 2015-2018 Florent Kermarrec <florent@enjoy-digital.fr>
|
||||
# This file is Copyright (c) 2015-2020 Florent Kermarrec <florent@enjoy-digital.fr>
|
||||
# License: BSD
|
||||
|
||||
from liteeth.common import *
|
||||
|
@ -7,6 +7,7 @@ from migen.genlib.misc import WaitTimer
|
|||
|
||||
from litex.soc.interconnect.packet import Depacketizer, Packetizer
|
||||
|
||||
# ARP Layouts --------------------------------------------------------------------------------------
|
||||
|
||||
_arp_table_layout = [
|
||||
("reply", 1),
|
||||
|
@ -15,7 +16,7 @@ _arp_table_layout = [
|
|||
("mac_address", 48)
|
||||
]
|
||||
|
||||
# arp tx
|
||||
# ARP TX -------------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthARPPacketizer(Packetizer):
|
||||
def __init__(self, dw=8):
|
||||
|
@ -86,7 +87,7 @@ class LiteEthARPTX(Module):
|
|||
)
|
||||
)
|
||||
|
||||
# arp rx
|
||||
# ARP RX -------------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthARPDepacketizer(Depacketizer):
|
||||
def __init__(self, dw=8):
|
||||
|
@ -149,7 +150,7 @@ class LiteEthARPRX(Module):
|
|||
)
|
||||
)
|
||||
|
||||
# arp table
|
||||
# ARP Table ----------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthARPTable(Module):
|
||||
def __init__(self, clk_freq, max_requests=8):
|
||||
|
@ -288,7 +289,7 @@ class LiteEthARPTable(Module):
|
|||
)
|
||||
)
|
||||
|
||||
# arp
|
||||
# ARP ----------------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthARP(Module):
|
||||
def __init__(self, mac, mac_address, ip_address, clk_freq, dw=8):
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
# This file is Copyright (c) 2015-2019 Florent Kermarrec <florent@enjoy-digital.fr>
|
||||
# This file is Copyright (c) 2015-2020 Florent Kermarrec <florent@enjoy-digital.fr>
|
||||
# License: BSD
|
||||
|
||||
from liteeth.common import *
|
||||
|
||||
from litex.soc.interconnect.packet import Depacketizer, Packetizer
|
||||
|
||||
|
||||
# icmp tx
|
||||
# ICMP TX ------------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthICMPPacketizer(Packetizer):
|
||||
def __init__(self, dw=8):
|
||||
|
@ -53,7 +52,7 @@ class LiteEthICMPTX(Module):
|
|||
)
|
||||
)
|
||||
|
||||
# icmp rx
|
||||
# ICMP RX ------------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthICMPDepacketizer(Depacketizer):
|
||||
def __init__(self, dw=8):
|
||||
|
@ -120,7 +119,7 @@ class LiteEthICMPRX(Module):
|
|||
)
|
||||
)
|
||||
|
||||
# icmp echo
|
||||
# ICMP Echo ----------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthICMPEcho(Module):
|
||||
def __init__(self, dw=8):
|
||||
|
@ -138,7 +137,7 @@ class LiteEthICMPEcho(Module):
|
|||
self.source.checksum.eq(self.buffer.source.checksum + 0x800 + (self.buffer.source.checksum >= 0xf800))
|
||||
]
|
||||
|
||||
# icmp
|
||||
# ICMP ---------------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthICMP(Module):
|
||||
def __init__(self, ip, ip_address, dw=8):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# This file is Copyright (c) 2015-2017 Florent Kermarrec <florent@enjoy-digital.fr>
|
||||
# This file is Copyright (c) 2015-2020 Florent Kermarrec <florent@enjoy-digital.fr>
|
||||
# License: BSD
|
||||
|
||||
from liteeth.common import *
|
||||
|
@ -6,8 +6,7 @@ from liteeth.crossbar import LiteEthCrossbar
|
|||
|
||||
from litex.soc.interconnect.packet import Depacketizer, Packetizer
|
||||
|
||||
|
||||
# ip crossbar
|
||||
# IP Crossbar --------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthIPV4MasterPort:
|
||||
def __init__(self, dw):
|
||||
|
@ -39,7 +38,7 @@ class LiteEthIPV4Crossbar(LiteEthCrossbar):
|
|||
self.users[protocol] = port
|
||||
return port
|
||||
|
||||
# ip checksum
|
||||
# IP Checksum --------------------------------------------------------------------------------------
|
||||
|
||||
@ResetInserter()
|
||||
@CEInserter()
|
||||
|
@ -81,7 +80,7 @@ class LiteEthIPV4Checksum(Module):
|
|||
self.done.eq(counter == n_cycles)
|
||||
]
|
||||
|
||||
# ip tx
|
||||
# IP TX --------------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthIPV4Packetizer(Packetizer):
|
||||
def __init__(self, dw=8):
|
||||
|
@ -175,7 +174,7 @@ class LiteEthIPTX(Module):
|
|||
)
|
||||
)
|
||||
|
||||
# ip rx
|
||||
# IP RX --------------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthIPV4Depacketizer(Depacketizer):
|
||||
def __init__(self, dw=8):
|
||||
|
@ -252,7 +251,7 @@ class LiteEthIPRX(Module):
|
|||
)
|
||||
)
|
||||
|
||||
# ip
|
||||
# IP -----------------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthIP(Module):
|
||||
def __init__(self, mac, mac_address, ip_address, arp_table, dw=8):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# This file is Copyright (c) 2015-2017 Florent Kermarrec <florent@enjoy-digital.fr>
|
||||
# This file is Copyright (c) 2015-2020 Florent Kermarrec <florent@enjoy-digital.fr>
|
||||
# License: BSD
|
||||
|
||||
from liteeth.common import *
|
||||
|
@ -7,8 +7,7 @@ from liteeth.crossbar import LiteEthCrossbar
|
|||
from litex.soc.interconnect import stream
|
||||
from litex.soc.interconnect.packet import Depacketizer, Packetizer
|
||||
|
||||
|
||||
# udp crossbar
|
||||
# UDP Crossbar -------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthUDPMasterPort:
|
||||
def __init__(self, dw):
|
||||
|
@ -77,7 +76,7 @@ class LiteEthUDPCrossbar(LiteEthCrossbar):
|
|||
|
||||
return user_port
|
||||
|
||||
# udp tx
|
||||
# UDP TX -------------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthUDPPacketizer(Packetizer):
|
||||
def __init__(self, dw=8):
|
||||
|
@ -124,7 +123,7 @@ class LiteEthUDPTX(Module):
|
|||
)
|
||||
)
|
||||
|
||||
# udp rx
|
||||
# UDP RX -------------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthUDPDepacketizer(Depacketizer):
|
||||
def __init__(self, dw=8):
|
||||
|
@ -190,7 +189,7 @@ class LiteEthUDPRX(Module):
|
|||
)
|
||||
)
|
||||
|
||||
# udp
|
||||
# UDP ----------------------------------------------------------------------------------------------
|
||||
|
||||
class LiteEthUDP(Module):
|
||||
def __init__(self, ip, ip_address, dw=8):
|
||||
|
|
Loading…
Reference in a new issue