liteeth: pep8 (E203)
This commit is contained in:
parent
8dc817dd70
commit
726fd3ab42
|
@ -112,9 +112,9 @@ class LiteEthARPRX(Module):
|
||||||
reply = Signal()
|
reply = Signal()
|
||||||
request = Signal()
|
request = Signal()
|
||||||
self.comb += Case(depacketizer.source.opcode, {
|
self.comb += Case(depacketizer.source.opcode, {
|
||||||
arp_opcode_request : [request.eq(1)],
|
arp_opcode_request: [request.eq(1)],
|
||||||
arp_opcode_reply : [reply.eq(1)],
|
arp_opcode_reply: [reply.eq(1)],
|
||||||
"default" : []
|
"default": []
|
||||||
})
|
})
|
||||||
self.comb += [
|
self.comb += [
|
||||||
source.ip_address.eq(depacketizer.source.sender_ip),
|
source.ip_address.eq(depacketizer.source.sender_ip),
|
||||||
|
|
|
@ -24,9 +24,9 @@ class BufferizeEndpoints(ModuleTransformer):
|
||||||
for name, endpoint in endpoints.items():
|
for name, endpoint in endpoints.items():
|
||||||
if not self.names or name in self.names:
|
if not self.names or name in self.names:
|
||||||
if isinstance(endpoint, Sink):
|
if isinstance(endpoint, Sink):
|
||||||
sinks.update({name : endpoint})
|
sinks.update({name: endpoint})
|
||||||
elif isinstance(endpoint, Source):
|
elif isinstance(endpoint, Source):
|
||||||
sources.update({name : endpoint})
|
sources.update({name: endpoint})
|
||||||
|
|
||||||
# add buffer on sinks
|
# add buffer on sinks
|
||||||
for name, sink in sinks.items():
|
for name, sink in sinks.items():
|
||||||
|
|
|
@ -10,8 +10,8 @@ from misoclib.com.liteeth.phy.mii import LiteEthPHYMIITX, LiteEthPHYMIIRX
|
||||||
from misoclib.com.liteeth.phy.gmii import LiteEthPHYGMIITX, LiteEthPHYGMIIRX
|
from misoclib.com.liteeth.phy.gmii import LiteEthPHYGMIITX, LiteEthPHYGMIIRX
|
||||||
|
|
||||||
modes = {
|
modes = {
|
||||||
"GMII" : 0,
|
"GMII": 0,
|
||||||
"MII" : 1
|
"MII": 1
|
||||||
}
|
}
|
||||||
|
|
||||||
tx_pads_layout = [("tx_er", 1), ("tx_en", 1), ("tx_data", 8)]
|
tx_pads_layout = [("tx_er", 1), ("tx_en", 1), ("tx_data", 8)]
|
||||||
|
|
|
@ -20,15 +20,15 @@ arp_request = format_dump("""
|
||||||
00 22 19 22 54 9e a9 fe 64 62""")
|
00 22 19 22 54 9e a9 fe 64 62""")
|
||||||
|
|
||||||
arp_request_infos = {
|
arp_request_infos = {
|
||||||
"sender_mac" : 0x00123f979201,
|
"sender_mac": 0x00123f979201,
|
||||||
"target_mac" : 0x00221922549e,
|
"target_mac": 0x00221922549e,
|
||||||
"ethernet_type" : 0x806,
|
"ethernet_type": 0x806,
|
||||||
"hwtype" : 0x1,
|
"hwtype": 0x1,
|
||||||
"opcode" : 0x1,
|
"opcode": 0x1,
|
||||||
"protosize" : 0x4,
|
"protosize": 0x4,
|
||||||
"proto" : 0x800,
|
"proto": 0x800,
|
||||||
"sender_ip" : 0xa9feff42,
|
"sender_ip": 0xa9feff42,
|
||||||
"target_ip" : 0xa9fe6462
|
"target_ip": 0xa9fe6462
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,15 +39,15 @@ arp_reply = format_dump("""
|
||||||
00 00 00 00 00 00 00 00 00 00 00 00""")
|
00 00 00 00 00 00 00 00 00 00 00 00""")
|
||||||
|
|
||||||
arp_reply_infos = {
|
arp_reply_infos = {
|
||||||
"sender_mac" : 0x00221922549e,
|
"sender_mac": 0x00221922549e,
|
||||||
"target_mac" : 0x00123f979201,
|
"target_mac": 0x00123f979201,
|
||||||
"ethernet_type" : 0x806,
|
"ethernet_type": 0x806,
|
||||||
"hwtype" : 0x1,
|
"hwtype": 0x1,
|
||||||
"opcode" : 0x2,
|
"opcode": 0x2,
|
||||||
"protosize" : 0x4,
|
"protosize": 0x4,
|
||||||
"proto" : 0x800,
|
"proto": 0x800,
|
||||||
"sender_ip" : 0xa9fe6462,
|
"sender_ip": 0xa9fe6462,
|
||||||
"target_ip" : 0xa9feff42
|
"target_ip": 0xa9feff42
|
||||||
}
|
}
|
||||||
|
|
||||||
udp = format_dump("""
|
udp = format_dump("""
|
||||||
|
@ -60,13 +60,13 @@ aa 9b 4e 4d f9 2e 51 52 fe ff 65 31 3a 71 34 3a
|
||||||
34 3a 55 54 7e 62 31 3a 79 31 3a 71 65""")
|
34 3a 55 54 7e 62 31 3a 79 31 3a 71 65""")
|
||||||
|
|
||||||
udp_infos = {
|
udp_infos = {
|
||||||
"sender_mac" : 0x00140b333327,
|
"sender_mac": 0x00140b333327,
|
||||||
"target_mac" : 0xd07ab596cd0a,
|
"target_mac": 0xd07ab596cd0a,
|
||||||
"protocol" : 0x11,
|
"protocol": 0x11,
|
||||||
"sender_ip" : 0xc0a80165,
|
"sender_ip": 0xc0a80165,
|
||||||
"target_ip" : 0xb27b0d78,
|
"target_ip": 0xb27b0d78,
|
||||||
"src_port" : 0xa63f,
|
"src_port": 0xa63f,
|
||||||
"dst_port" : 0x690f
|
"dst_port": 0x690f
|
||||||
}
|
}
|
||||||
|
|
||||||
ping_request = format_dump("""
|
ping_request = format_dump("""
|
||||||
|
@ -77,9 +77,9 @@ ping_request = format_dump("""
|
||||||
77 61 62 63 64 65 66 67 68 69""")
|
77 61 62 63 64 65 66 67 68 69""")
|
||||||
|
|
||||||
ping_request_infos = {
|
ping_request_infos = {
|
||||||
"code" : 0x0,
|
"code": 0x0,
|
||||||
"msgtype" : 0x8,
|
"msgtype": 0x8,
|
||||||
"quench" : 0x2002100
|
"quench": 0x2002100
|
||||||
}
|
}
|
||||||
|
|
||||||
ping_reply = format_dump("""
|
ping_reply = format_dump("""
|
||||||
|
|
Loading…
Reference in New Issue