Fix "is not" literal SyntaxWarning

Signed-off-by: Joel Stanley <joel@jms.id.au>
This commit is contained in:
Joel Stanley 2021-02-16 21:56:37 +10:30
parent 0c003c8ee7
commit 6daff12f50
2 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ class LiteEthUDPCrossbar(LiteEthCrossbar):
# tx
tx_stream = user_port.sink
if cd is not "sys":
if cd != "sys":
tx_cdc = stream.AsyncFIFO(eth_udp_user_description(user_port.dw), 4)
tx_cdc = ClockDomainsRenamer({"write": cd, "read": "sys"})(tx_cdc)
self.submodules += tx_cdc
@ -69,7 +69,7 @@ class LiteEthUDPCrossbar(LiteEthCrossbar):
self.submodules += rx_converter
self.comb += rx_stream.connect(rx_converter.sink)
rx_stream = rx_converter.source
if cd is not "sys":
if cd != "sys":
rx_cdc = stream.AsyncFIFO(eth_udp_user_description(user_port.dw), 4)
rx_cdc = ClockDomainsRenamer({"write": "sys", "read": cd})(rx_cdc)
self.submodules += rx_cdc

View File

@ -9,7 +9,7 @@ import re
# Helpers ------------------------------------------------------------------------------------------
def format_dump(dump):
return [int(s, 16) for s in re.split(r'[;,\s\n]\s*', dump) if s is not ""]
return [int(s, 16) for s in re.split(r'[;,\s\n]\s*', dump) if s != ""]
def verify_packet(packet, infos):