{,_}tools→{,_}utils

In context of nMigen, "tools" means "parts of toolchain", so it is
confusing to have a completely unrelated module also called "tools".
This commit is contained in:
whitequark 2019-10-13 18:53:38 +00:00
parent ccd28b40c2
commit 2f9dab361f
39 changed files with 43 additions and 43 deletions

View file

@ -1,19 +1,19 @@
from ... import tools
from ... import utils
from ...hdl import ast
from ..._tools import deprecated
from ..._utils import deprecated
__all__ = ["log2_int", "bits_for", "value_bits_sign"]
@deprecated("instead of `log2_int`, use `nmigen.tools.log2_int`")
@deprecated("instead of `log2_int`, use `nmigen.utils.log2_int`")
def log2_int(n, need_pow2=True):
return tools.log2_int(n, need_pow2)
return utils.log2_int(n, need_pow2)
@deprecated("instead of `bits_for`, use `nmigen.tools.bits_for`")
@deprecated("instead of `bits_for`, use `nmigen.utils.bits_for`")
def bits_for(n, require_sign_bit=False):
return tools.bits_for(n, require_sign_bit)
return utils.bits_for(n, require_sign_bit)
@deprecated("instead of `value_bits_sign(v)`, use `v.shape()`")

View file

@ -2,7 +2,7 @@ from ...hdl.ast import *
from ...hdl.xfrm import ResetInserter as NativeResetInserter
from ...hdl.xfrm import EnableInserter as NativeEnableInserter
from ...hdl.xfrm import DomainRenamer as NativeDomainRenamer
from ..._tools import deprecated
from ..._utils import deprecated
__all__ = ["ResetInserter", "CEInserter", "ClockDomainsRenamer"]

View file

@ -1,6 +1,6 @@
from collections.abc import Iterable
from ..._tools import flatten, deprecated
from ..._utils import flatten, deprecated
from ...hdl import dsl, ir

View file

@ -1,6 +1,6 @@
import warnings
from ..._tools import deprecated, extend
from ..._utils import deprecated, extend
from ...hdl.ast import *
from ...hdl.ir import Elaboratable
from ...hdl.mem import Memory as NativeMemory

View file

@ -1,6 +1,6 @@
from collections import OrderedDict
from ..._tools import deprecated, extend
from ..._utils import deprecated, extend
from ...hdl import ast
from ...hdl.ast import (DUID, Value, Signal, Mux, Slice as _Slice, Cat, Repl, Const, C,
ClockSignal, ResetSignal,