lib.cdc: adjust ResetSynchronizer for new CDC primitive conventions.
authorwhitequark <whitequark@whitequark.org>
Thu, 12 Sep 2019 13:48:45 +0000 (13:48 +0000)
committerwhitequark <whitequark@whitequark.org>
Thu, 12 Sep 2019 13:48:45 +0000 (13:48 +0000)
Refs #97.

nmigen/compat/genlib/resetsync.py
nmigen/lib/cdc.py

index 218dc8ac2fbc9b2f2ab8094c1032443646fdffbc..afd26fbbf8af66a3e8d2e707d5c996a78850c4b5 100644 (file)
@@ -10,7 +10,7 @@ __all__ = ["AsyncResetSynchronizer"]
             "a clock domain name as an argument, not a clock domain object")
 class CompatResetSynchronizer(NativeResetSynchronizer):
     def __init__(self, cd, async_reset):
-        super().__init__(async_reset, cd.name)
+        super().__init__(async_reset, domain=cd.name)
 
 
 AsyncResetSynchronizer = CompatResetSynchronizer
index 83b90d85449e0cf572e4dbfa4c2f4b52eb880504..6d2271445dc0aa7b3ed9b773d7750611a0759cec 100644 (file)
@@ -70,7 +70,7 @@ class MultiReg(Elaboratable):
 
 
 class ResetSynchronizer(Elaboratable):
-    def __init__(self, arst, domain="sync", n=2):
+    def __init__(self, arst, *, domain="sync", n=2):
         self.arst = arst
         self.domain = domain