From 726fd3ab429a624d82190c117e4aac180b08b876 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 13 Apr 2015 10:39:46 +0200 Subject: [PATCH] liteeth: pep8 (E203) --- misoclib/com/liteeth/core/arp/__init__.py | 6 +-- misoclib/com/liteeth/generic/__init__.py | 4 +- misoclib/com/liteeth/phy/gmii_mii.py | 4 +- misoclib/com/liteeth/test/model/dumps.py | 56 +++++++++++------------ 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/misoclib/com/liteeth/core/arp/__init__.py b/misoclib/com/liteeth/core/arp/__init__.py index 50bd9a5b..5d010a1b 100644 --- a/misoclib/com/liteeth/core/arp/__init__.py +++ b/misoclib/com/liteeth/core/arp/__init__.py @@ -112,9 +112,9 @@ class LiteEthARPRX(Module): reply = Signal() request = Signal() self.comb += Case(depacketizer.source.opcode, { - arp_opcode_request : [request.eq(1)], - arp_opcode_reply : [reply.eq(1)], - "default" : [] + arp_opcode_request: [request.eq(1)], + arp_opcode_reply: [reply.eq(1)], + "default": [] }) self.comb += [ source.ip_address.eq(depacketizer.source.sender_ip), diff --git a/misoclib/com/liteeth/generic/__init__.py b/misoclib/com/liteeth/generic/__init__.py index cff32b0a..1c549828 100644 --- a/misoclib/com/liteeth/generic/__init__.py +++ b/misoclib/com/liteeth/generic/__init__.py @@ -24,9 +24,9 @@ class BufferizeEndpoints(ModuleTransformer): for name, endpoint in endpoints.items(): if not self.names or name in self.names: if isinstance(endpoint, Sink): - sinks.update({name : endpoint}) + sinks.update({name: endpoint}) elif isinstance(endpoint, Source): - sources.update({name : endpoint}) + sources.update({name: endpoint}) # add buffer on sinks for name, sink in sinks.items(): diff --git a/misoclib/com/liteeth/phy/gmii_mii.py b/misoclib/com/liteeth/phy/gmii_mii.py index 3c65168b..c207c8b1 100644 --- a/misoclib/com/liteeth/phy/gmii_mii.py +++ b/misoclib/com/liteeth/phy/gmii_mii.py @@ -10,8 +10,8 @@ from misoclib.com.liteeth.phy.mii import LiteEthPHYMIITX, LiteEthPHYMIIRX from misoclib.com.liteeth.phy.gmii import LiteEthPHYGMIITX, LiteEthPHYGMIIRX modes = { - "GMII" : 0, - "MII" : 1 + "GMII": 0, + "MII": 1 } tx_pads_layout = [("tx_er", 1), ("tx_en", 1), ("tx_data", 8)] diff --git a/misoclib/com/liteeth/test/model/dumps.py b/misoclib/com/liteeth/test/model/dumps.py index 91a61c67..5ea6bf6b 100644 --- a/misoclib/com/liteeth/test/model/dumps.py +++ b/misoclib/com/liteeth/test/model/dumps.py @@ -20,15 +20,15 @@ arp_request = format_dump(""" 00 22 19 22 54 9e a9 fe 64 62""") arp_request_infos = { - "sender_mac" : 0x00123f979201, - "target_mac" : 0x00221922549e, - "ethernet_type" : 0x806, - "hwtype" : 0x1, - "opcode" : 0x1, - "protosize" : 0x4, - "proto" : 0x800, - "sender_ip" : 0xa9feff42, - "target_ip" : 0xa9fe6462 + "sender_mac": 0x00123f979201, + "target_mac": 0x00221922549e, + "ethernet_type": 0x806, + "hwtype": 0x1, + "opcode": 0x1, + "protosize": 0x4, + "proto": 0x800, + "sender_ip": 0xa9feff42, + "target_ip": 0xa9fe6462 } @@ -39,15 +39,15 @@ arp_reply = format_dump(""" 00 00 00 00 00 00 00 00 00 00 00 00""") arp_reply_infos = { - "sender_mac" : 0x00221922549e, - "target_mac" : 0x00123f979201, - "ethernet_type" : 0x806, - "hwtype" : 0x1, - "opcode" : 0x2, - "protosize" : 0x4, - "proto" : 0x800, - "sender_ip" : 0xa9fe6462, - "target_ip" : 0xa9feff42 + "sender_mac": 0x00221922549e, + "target_mac": 0x00123f979201, + "ethernet_type": 0x806, + "hwtype": 0x1, + "opcode": 0x2, + "protosize": 0x4, + "proto": 0x800, + "sender_ip": 0xa9fe6462, + "target_ip": 0xa9feff42 } 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""") udp_infos = { - "sender_mac" : 0x00140b333327, - "target_mac" : 0xd07ab596cd0a, - "protocol" : 0x11, - "sender_ip" : 0xc0a80165, - "target_ip" : 0xb27b0d78, - "src_port" : 0xa63f, - "dst_port" : 0x690f + "sender_mac": 0x00140b333327, + "target_mac": 0xd07ab596cd0a, + "protocol": 0x11, + "sender_ip": 0xc0a80165, + "target_ip": 0xb27b0d78, + "src_port": 0xa63f, + "dst_port": 0x690f } ping_request = format_dump(""" @@ -77,9 +77,9 @@ ping_request = format_dump(""" 77 61 62 63 64 65 66 67 68 69""") ping_request_infos = { - "code" : 0x0, - "msgtype" : 0x8, - "quench" : 0x2002100 + "code": 0x0, + "msgtype": 0x8, + "quench": 0x2002100 } ping_reply = format_dump(""" -- 2.30.2