compat.genlib.resetsync: add shim for AsyncResetSynchronizer.

This commit is contained in:
whitequark 2019-01-26 18:24:12 +00:00
parent 2fb85a6170
commit 6cd9f7db19
2 changed files with 18 additions and 2 deletions

View file

@ -0,0 +1,16 @@
from ...tools import deprecated
from ...lib.cdc import ResetSynchronizer as NativeResetSynchronizer
__all__ = ["AsyncResetSynchronizer"]
@deprecated("instead of `migen.genlib.resetsync.AsyncResetSynchronizer`, "
"use `nmigen.lib.cdc.ResetSynchronizer`; note that ResetSynchronizer accepts "
"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)
AsyncResetSynchronizer = CompatResetSynchronizer