Clean up imports.
This commit: * moves lists of universally useful imports from `nmigen` to `nmigen.hdl` and `nmigen.lib`, reimporting them in `nmigen`; * replaces lots of imports from individual parts of `nmigen.hdl` with a star import from `nmigen.hdl`; * replaces imports in tests with what we expect downstream code to use; * adds some missing imports in `nmigen.formal`.
This commit is contained in:
parent
3194b5c90b
commit
9f643ce005
|
@ -2,13 +2,5 @@ from ._version import get_versions
|
|||
__version__ = get_versions()['version']
|
||||
del get_versions
|
||||
|
||||
from .hdl.ast import Value, Const, C, Mux, Cat, Repl, Array, Signal, ClockSignal, ResetSignal
|
||||
from .hdl.dsl import Module
|
||||
from .hdl.cd import ClockDomain
|
||||
from .hdl.ir import Elaboratable, Fragment, Instance
|
||||
from .hdl.mem import Memory
|
||||
from .hdl.rec import Record
|
||||
from .hdl.xfrm import ResetInserter, CEInserter
|
||||
|
||||
from .lib.cdc import MultiReg
|
||||
# from .lib.io import
|
||||
from .hdl import *
|
||||
from .lib import *
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
from .hdl.ast import AnyConst, AnySeq, Assert, Assume
|
||||
from .hdl.ast import Past, Stable, Rose, Fell
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
from .ast import Value, Const, C, Mux, Cat, Repl, Array, Signal, ClockSignal, ResetSignal
|
||||
from .dsl import Module
|
||||
from .cd import ClockDomain
|
||||
from .ir import Elaboratable, Fragment, Instance
|
||||
from .mem import Memory
|
||||
from .rec import Record
|
||||
from .xfrm import DomainRenamer, ResetInserter, CEInserter
|
|
@ -0,0 +1 @@
|
|||
from .cdc import MultiReg
|
|
@ -1,7 +1,5 @@
|
|||
from .tools import *
|
||||
from ..hdl.ast import *
|
||||
from ..hdl.cd import *
|
||||
from ..hdl.dsl import *
|
||||
from ..hdl import *
|
||||
from ..back.pysim import *
|
||||
from ..lib.cdc import *
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from .tools import *
|
||||
from ..hdl.ast import *
|
||||
from ..hdl.dsl import *
|
||||
from ..hdl.ir import *
|
||||
from ..hdl import *
|
||||
from ..formal import *
|
||||
from ..back.pysim import *
|
||||
from ..lib.coding import *
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
from .tools import *
|
||||
from ..hdl.ast import *
|
||||
from ..hdl.dsl import *
|
||||
from ..hdl.mem import *
|
||||
from ..hdl.ir import *
|
||||
from ..hdl.xfrm import *
|
||||
from ..hdl.cd import *
|
||||
from ..hdl import *
|
||||
from ..formal import *
|
||||
from ..back.pysim import *
|
||||
from ..lib.fifo import *
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from .tools import *
|
||||
from ..hdl.ast import *
|
||||
from ..hdl import *
|
||||
from ..hdl.rec import *
|
||||
from ..back.pysim import *
|
||||
from ..lib.io import *
|
||||
|
||||
|
||||
|
|
4
nmigen/vendor/fpga/lattice_ice40.py
vendored
4
nmigen/vendor/fpga/lattice_ice40.py
vendored
|
@ -3,9 +3,7 @@ import os
|
|||
import subprocess
|
||||
import tempfile
|
||||
|
||||
from ...hdl.ast import *
|
||||
from ...hdl.dsl import *
|
||||
from ...hdl.ir import *
|
||||
from ...hdl import *
|
||||
from ...build import *
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue