parent
8c30147e39
commit
8f659b6cd6
3 changed files with 23 additions and 11 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import warnings
|
||||
|
||||
from ...tools import deprecated
|
||||
from ...lib.cdc import MultiReg
|
||||
from ...lib.cdc import MultiReg as NativeMultiReg
|
||||
from ...hdl.ast import *
|
||||
from ..fhdl.module import CompatModule
|
||||
from ..fhdl.structure import If
|
||||
|
|
@ -8,6 +10,16 @@ from ..fhdl.structure import If
|
|||
__all__ = ["MultiReg", "GrayCounter", "GrayDecoder"]
|
||||
|
||||
|
||||
class MultiReg(NativeMultiReg):
|
||||
def __init__(self, i, o, odomain="sync", n=2, reset=0):
|
||||
if odomain != "sync":
|
||||
warnings.warn("instead of `MultiReg(..., odomain={!r})`, "
|
||||
"use `MultiReg(..., o_domain={!r})`"
|
||||
.format(odomain, odomain),
|
||||
DeprecationWarning, stacklevel=2)
|
||||
super().__init__(i, o, o_domain=odomain, n=n, reset=reset)
|
||||
|
||||
|
||||
@deprecated("instead of `migen.genlib.cdc.GrayCounter`, use `nmigen.lib.coding.GrayEncoder`")
|
||||
class GrayCounter(CompatModule):
|
||||
def __init__(self, width):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue