compat.genlib.resetsync: add shim for AsyncResetSynchronizer.
This commit is contained in:
parent
2fb85a6170
commit
6cd9f7db19
|
@ -173,8 +173,8 @@ Compatibility summary
|
|||
- (−) `layout_get` **brk**
|
||||
- (−) `layout_partial` **brk**
|
||||
- (−) `Record` id
|
||||
- (−) `resetsync` ?
|
||||
- (−) `AsyncResetSynchronizer` ?
|
||||
- (+) `resetsync` ?
|
||||
- (+) `AsyncResetSynchronizer` **obs** → `.lib.cdc.ResetSynchronizer`
|
||||
- (−) `roundrobin` ?
|
||||
- (−) `SP_WITHDRAW`/`SP_CE` ?
|
||||
- (−) `RoundRobin` ?
|
||||
|
|
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…
Reference in a new issue