From: Florent Kermarrec Date: Thu, 22 Jun 2017 09:29:57 +0000 (+0200) Subject: soc/tools: syntax fix on comm_pcie, import in __init__.py X-Git-Tag: 24jan2021_ls180~1841 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=41a91829eb23efd7ecbe5158afcf160d08516dbb;p=litex.git soc/tools: syntax fix on comm_pcie, import in __init__.py --- diff --git a/litex/soc/tools/remote/__init__.py b/litex/soc/tools/remote/__init__.py index ec154ab9..3b5b0bbb 100644 --- a/litex/soc/tools/remote/__init__.py +++ b/litex/soc/tools/remote/__init__.py @@ -1,3 +1,5 @@ from litex.soc.tools.remote.comm_uart import CommUART +from litex.soc.tools.remote.comm_udp import CommUDP +from litex.soc.tools.remote.comm_pcie import CommPCIe from litex.soc.tools.remote.litex_server import RemoteServer from litex.soc.tools.remote.litex_client import RemoteClient diff --git a/litex/soc/tools/remote/comm_pcie.py b/litex/soc/tools/remote/comm_pcie.py index e02b21db..c3009505 100644 --- a/litex/soc/tools/remote/comm_pcie.py +++ b/litex/soc/tools/remote/comm_pcie.py @@ -1,7 +1,7 @@ import mmap -class CommPCIeLinux: +class CommPCIe: def __init__(self, bar, bar_size, debug=False): self.bar = bar self.bar_size = bar_size @@ -25,12 +25,12 @@ class CommPCIeLinux: def read(self, addr, length=None): data = [] length_int = 1 if length is None else length - for i in range(length_int): + for i in range(length_int): self.mmap.seek(addr + 4*i) value = int.from_bytes(self.mmap.read(4), "big") if self.debug: print("read {:08x} @ {:08x}".format(value, addr + 4*i)) - if length is None: + if length is None: return value data.append(value) return data