From: whitequark Date: Thu, 12 Sep 2019 13:48:45 +0000 (+0000) Subject: lib.cdc: adjust ResetSynchronizer for new CDC primitive conventions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c87633b3b8a9d4969b5c16733730a40b8f263170;p=nmigen.git lib.cdc: adjust ResetSynchronizer for new CDC primitive conventions. Refs #97. --- diff --git a/nmigen/compat/genlib/resetsync.py b/nmigen/compat/genlib/resetsync.py index 218dc8a..afd26fb 100644 --- a/nmigen/compat/genlib/resetsync.py +++ b/nmigen/compat/genlib/resetsync.py @@ -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 diff --git a/nmigen/lib/cdc.py b/nmigen/lib/cdc.py index 83b90d8..6d22714 100644 --- a/nmigen/lib/cdc.py +++ b/nmigen/lib/cdc.py @@ -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