nmigen.compat.genlib.cdc: add PulseSynchronizer.
This commit is contained in:
parent
fcbabfeefc
commit
5ae87916ec
|
@ -2,12 +2,13 @@ import warnings
|
||||||
|
|
||||||
from ..._utils import deprecated
|
from ..._utils import deprecated
|
||||||
from ...lib.cdc import FFSynchronizer as NativeFFSynchronizer
|
from ...lib.cdc import FFSynchronizer as NativeFFSynchronizer
|
||||||
|
from ...lib.cdc import PulseSynchronizer as NativePulseSynchronizer
|
||||||
from ...hdl.ast import *
|
from ...hdl.ast import *
|
||||||
from ..fhdl.module import CompatModule
|
from ..fhdl.module import CompatModule
|
||||||
from ..fhdl.structure import If
|
from ..fhdl.structure import If
|
||||||
|
|
||||||
|
|
||||||
__all__ = ["MultiReg", "GrayCounter", "GrayDecoder"]
|
__all__ = ["MultiReg", "PulseSynchronizer", "GrayCounter", "GrayDecoder"]
|
||||||
|
|
||||||
|
|
||||||
class MultiReg(NativeFFSynchronizer):
|
class MultiReg(NativeFFSynchronizer):
|
||||||
|
@ -27,6 +28,12 @@ class MultiReg(NativeFFSynchronizer):
|
||||||
self.odomain = odomain
|
self.odomain = odomain
|
||||||
|
|
||||||
|
|
||||||
|
@deprecated("instead of `migen.genlib.cdc.PulseSynchronizer`, use `nmigen.lib.cdc.PulseSynchronizer`")
|
||||||
|
class PulseSynchronizer(NativePulseSynchronizer):
|
||||||
|
def __init__(self, idomain, odomain):
|
||||||
|
super().__init__(i_domain=idomain, o_domain=odomain)
|
||||||
|
|
||||||
|
|
||||||
@deprecated("instead of `migen.genlib.cdc.GrayCounter`, use `nmigen.lib.coding.GrayEncoder`")
|
@deprecated("instead of `migen.genlib.cdc.GrayCounter`, use `nmigen.lib.coding.GrayEncoder`")
|
||||||
class GrayCounter(CompatModule):
|
class GrayCounter(CompatModule):
|
||||||
def __init__(self, width):
|
def __init__(self, width):
|
||||||
|
|
Loading…
Reference in a new issue