lib.io: use keyword-only arguments in Pin().
authorwhitequark <whitequark@whitequark.org>
Wed, 16 Oct 2019 19:50:04 +0000 (19:50 +0000)
committerwhitequark <whitequark@whitequark.org>
Wed, 16 Oct 2019 19:50:04 +0000 (19:50 +0000)
nmigen/build/res.py
nmigen/lib/io.py

index bdd3f0aeb68af599f0343ea4ce328338bcb0a0a0..afcf41cc562c85f92a0a5612b10697fdc67eb8fd 100644 (file)
@@ -134,7 +134,7 @@ class ResourceManager:
                 if dir == "-":
                     pin = None
                 else:
-                    pin = Pin(len(phys), dir, xdr, name=name)
+                    pin = Pin(len(phys), dir, xdr=xdr, name=name)
 
                 for phys_name in phys_names:
                     if phys_name in self._phys_reqd:
index d2969b0522a9644fcea4b1432bdd433afc5bdb40..7c950ae7d3c8f2aea3d3f9b21b0391e543c707fa 100644 (file)
@@ -97,7 +97,7 @@ class Pin(Record):
         cannot change direction more than once per cycle, so at most one output enable signal
         is present.
     """
-    def __init__(self, width, dir, xdr=0, name=None, src_loc_at=0):
+    def __init__(self, width, dir, *, xdr=0, name=None, src_loc_at=0):
         self.width = width
         self.dir   = dir
         self.xdr   = xdr