compat.genlib.resetsync: add shim for AsyncResetSynchronizer.
This commit is contained in:
parent
2fb85a6170
commit
6cd9f7db19
2 changed files with 18 additions and 2 deletions
16
nmigen/compat/genlib/resetsync.py
Normal file
16
nmigen/compat/genlib/resetsync.py
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue