_tools: extract most utility methods to a private package.

We don't want to guarantee backwards compatibility for most of them.
This commit is contained in:
whitequark 2019-10-12 22:27:43 +00:00
parent a97003d57a
commit da48c05bdf
22 changed files with 106 additions and 103 deletions

View file

@ -1,6 +1,6 @@
from ... import tools
from ...hdl import ast
from ...tools import deprecated
from ..._tools import deprecated
__all__ = ["log2_int", "bits_for", "value_bits_sign"]

View file

@ -1,6 +1,6 @@
from collections.abc import Iterable
from ...tools import flatten, deprecated
from ..._tools import flatten, deprecated
from ...hdl import dsl, ir
@ -97,7 +97,7 @@ class _CompatModuleClockDomains(_CompatModuleProxy):
class CompatModule(ir.Elaboratable):
_Elaboratable__silence = True
# Actually returns nmigen.fhdl.Module, not a Fragment.
# Actually returns another nMigen Elaboratable (nmigen.dsl.Module), not a Fragment.
def get_fragment(self):
assert not self.get_fragment_called
self.get_fragment_called = True

View file

@ -1,6 +1,6 @@
import warnings
from ...tools import deprecated, extend
from ..._tools 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 ..._tools import deprecated, extend
from ...hdl import ast
from ...hdl.ast import (DUID, Value, Signal, Mux, Slice as _Slice, Cat, Repl, Const, C,
ClockSignal, ResetSignal,