From 1925ba176fa7c37050c5b8e17b7fd2bd26462a18 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 23 Feb 2018 13:38:19 +0100 Subject: [PATCH] replace litex.gen imports with migen imports --- litex/boards/targets/arty.py | 4 ++-- litex/boards/targets/de0nano.py | 3 ++- litex/boards/targets/kc705.py | 4 ++-- litex/boards/targets/minispartan6.py | 5 +++-- litex/boards/targets/nexys4ddr.py | 4 ++-- litex/boards/targets/nexys_video.py | 4 ++-- litex/boards/targets/sim.py | 5 +++-- litex/boards/targets/simple.py | 4 ++-- litex/build/altera/common.py | 6 +++--- litex/build/altera/quartus.py | 2 +- litex/build/generic_platform.py | 9 +++++---- litex/build/lattice/common.py | 8 ++++---- litex/build/lattice/diamond.py | 4 ++-- litex/build/lattice/icestorm.py | 2 +- litex/build/sim/platform.py | 5 +++-- litex/build/sim/verilator.py | 3 ++- litex/build/xilinx/common.py | 12 ++++++------ litex/build/xilinx/ise.py | 3 ++- litex/build/xilinx/vivado.py | 3 ++- litex/gen/__init__.py | 10 ---------- litex/gen/fhdl/verilog.py | 10 +++++----- litex/gen/sim/__init__.py | 2 +- litex/gen/sim/core.py | 18 +++++++++--------- litex/gen/sim/vcd.py | 2 +- litex/soc/cores/code_8b10b.py | 2 +- litex/soc/cores/cordic.py | 2 +- litex/soc/cores/cpu/lm32/core.py | 2 +- litex/soc/cores/cpu/mor1kx/core.py | 2 +- litex/soc/cores/cpu/picorv32/core.py | 2 +- litex/soc/cores/dna.py | 3 ++- litex/soc/cores/frequency_meter.py | 6 +++--- litex/soc/cores/gpio.py | 4 ++-- litex/soc/cores/identifier.py | 2 +- litex/soc/cores/nor_flash_16.py | 4 ++-- litex/soc/cores/spi.py | 3 ++- litex/soc/cores/spi_flash.py | 4 ++-- litex/soc/cores/timer.py | 2 +- litex/soc/cores/uart.py | 6 +++--- litex/soc/cores/xadc.py | 3 ++- litex/soc/integration/cpu_interface.py | 2 +- litex/soc/integration/sdram_init.py | 2 +- litex/soc/integration/soc_core.py | 2 +- litex/soc/integration/soc_sdram.py | 6 +++--- litex/soc/interconnect/axi.py | 7 ++++--- litex/soc/interconnect/csr.py | 6 +++--- litex/soc/interconnect/csr_bus.py | 8 ++++---- litex/soc/interconnect/csr_eventmanager.py | 4 ++-- litex/soc/interconnect/stream.py | 18 +++++++++--------- litex/soc/interconnect/stream_packet.py | 8 ++++---- litex/soc/interconnect/stream_sim.py | 3 ++- litex/soc/interconnect/wishbone.py | 10 +++++----- litex/soc/interconnect/wishbone2csr.py | 4 ++-- litex/soc/interconnect/wishbonebridge.py | 8 ++++---- test/test_bitslip.py | 4 ++-- test/test_code_8b10b.py | 2 +- test/test_gearbox.py | 4 ++-- test/test_targets.py | 2 +- 57 files changed, 141 insertions(+), 138 deletions(-) diff --git a/litex/boards/targets/arty.py b/litex/boards/targets/arty.py index c3e5dd70..1fdbfd5e 100755 --- a/litex/boards/targets/arty.py +++ b/litex/boards/targets/arty.py @@ -2,8 +2,8 @@ import argparse -from litex.gen import * -from litex.gen.genlib.resetsync import AsyncResetSynchronizer +from migen import * +from migen.genlib.resetsync import AsyncResetSynchronizer from litex.boards.platforms import arty diff --git a/litex/boards/targets/de0nano.py b/litex/boards/targets/de0nano.py index 17da0e72..813241a9 100755 --- a/litex/boards/targets/de0nano.py +++ b/litex/boards/targets/de0nano.py @@ -2,7 +2,8 @@ import argparse -from litex.gen import * +from migen import * + from litex.boards.platforms import de0nano from litex.soc.integration.soc_sdram import * diff --git a/litex/boards/targets/kc705.py b/litex/boards/targets/kc705.py index 541d3dea..86ebe291 100755 --- a/litex/boards/targets/kc705.py +++ b/litex/boards/targets/kc705.py @@ -2,8 +2,8 @@ import argparse -from litex.gen import * -from litex.gen.genlib.resetsync import AsyncResetSynchronizer +from migen import * +from migen.genlib.resetsync import AsyncResetSynchronizer from litex.boards.platforms import kc705 diff --git a/litex/boards/targets/minispartan6.py b/litex/boards/targets/minispartan6.py index 7c622367..6cff5bee 100755 --- a/litex/boards/targets/minispartan6.py +++ b/litex/boards/targets/minispartan6.py @@ -3,8 +3,9 @@ import argparse from fractions import Fraction -from litex.gen import * -from litex.gen.genlib.resetsync import AsyncResetSynchronizer +from migen import * +from migen.genlib.resetsync import AsyncResetSynchronizer + from litex.boards.platforms import minispartan6 from litex.soc.integration.soc_sdram import * diff --git a/litex/boards/targets/nexys4ddr.py b/litex/boards/targets/nexys4ddr.py index c0ece9e1..ee13a6ef 100755 --- a/litex/boards/targets/nexys4ddr.py +++ b/litex/boards/targets/nexys4ddr.py @@ -2,8 +2,8 @@ import argparse -from litex.gen import * -from litex.gen.genlib.resetsync import AsyncResetSynchronizer +from migen import * +from migen.genlib.resetsync import AsyncResetSynchronizer from litex.boards.platforms import nexys4ddr diff --git a/litex/boards/targets/nexys_video.py b/litex/boards/targets/nexys_video.py index daa9c980..b0265187 100755 --- a/litex/boards/targets/nexys_video.py +++ b/litex/boards/targets/nexys_video.py @@ -2,8 +2,8 @@ import argparse -from litex.gen import * -from litex.gen.genlib.resetsync import AsyncResetSynchronizer +from migen import * +from migen.genlib.resetsync import AsyncResetSynchronizer from litex.boards.platforms import nexys_video diff --git a/litex/boards/targets/sim.py b/litex/boards/targets/sim.py index a10479d2..1cd08bd6 100755 --- a/litex/boards/targets/sim.py +++ b/litex/boards/targets/sim.py @@ -3,9 +3,10 @@ import argparse import importlib -from litex.gen import * +from migen import * +from migen.genlib.io import CRG + from litex.boards.platforms import sim -from litex.gen.genlib.io import CRG from litex.soc.integration.soc_sdram import * from litex.soc.integration.builder import * diff --git a/litex/boards/targets/simple.py b/litex/boards/targets/simple.py index 88c8afd3..ccc8cbc3 100755 --- a/litex/boards/targets/simple.py +++ b/litex/boards/targets/simple.py @@ -3,8 +3,8 @@ import argparse import importlib -from litex.gen import * -from litex.gen.genlib.io import CRG +from migen import * +from migen.genlib.io import CRG from litex.soc.integration.soc_core import * from litex.soc.integration.builder import * diff --git a/litex/build/altera/common.py b/litex/build/altera/common.py index 07b6ef76..fafb4983 100644 --- a/litex/build/altera/common.py +++ b/litex/build/altera/common.py @@ -1,6 +1,6 @@ -from litex.gen.fhdl.module import Module -from litex.gen.fhdl.specials import Instance -from litex.gen.genlib.io import DifferentialInput, DifferentialOutput +from migen.fhdl.module import Module +from migen.fhdl.specials import Instance +from migen.genlib.io import DifferentialInput, DifferentialOutput class AlteraDifferentialInputImpl(Module): diff --git a/litex/build/altera/quartus.py b/litex/build/altera/quartus.py index af34b2eb..4dae8edf 100644 --- a/litex/build/altera/quartus.py +++ b/litex/build/altera/quartus.py @@ -4,7 +4,7 @@ import os import subprocess -from litex.gen.fhdl.structure import _Fragment +from migen.fhdl.structure import _Fragment from litex.build.generic_platform import Pins, IOStandard, Misc from litex.build import tools diff --git a/litex/build/generic_platform.py b/litex/build/generic_platform.py index 1ab5935e..83c0825a 100644 --- a/litex/build/generic_platform.py +++ b/litex/build/generic_platform.py @@ -1,9 +1,10 @@ import os -from litex.gen.fhdl.structure import Signal -from litex.gen.genlib.record import Record -from litex.gen.genlib.io import CRG -from litex.gen.fhdl import verilog +from migen.fhdl.structure import Signal +from migen.genlib.record import Record +from migen.genlib.io import CRG +from migen.fhdl import verilog + from litex.build import tools diff --git a/litex/build/lattice/common.py b/litex/build/lattice/common.py index 0050e414..b6d8ec1a 100644 --- a/litex/build/lattice/common.py +++ b/litex/build/lattice/common.py @@ -1,7 +1,7 @@ -from litex.gen.fhdl.module import Module -from litex.gen.fhdl.specials import Instance -from litex.gen.genlib.io import * -from litex.gen.genlib.resetsync import AsyncResetSynchronizer +from migen.fhdl.module import Module +from migen.fhdl.specials import Instance +from migen.genlib.io import * +from migen.genlib.resetsync import AsyncResetSynchronizer class DiamondAsyncResetSynchronizerImpl(Module): diff --git a/litex/build/lattice/diamond.py b/litex/build/lattice/diamond.py index bfc72fbb..d0594ec9 100644 --- a/litex/build/lattice/diamond.py +++ b/litex/build/lattice/diamond.py @@ -6,8 +6,8 @@ import sys import subprocess import shutil -from litex.gen.fhdl.structure import _Fragment -from litex.gen.fhdl.verilog import DummyAttrTranslate +from migen.fhdl.structure import _Fragment +from migen.fhdl.verilog import DummyAttrTranslate from litex.build.generic_platform import * from litex.build import tools diff --git a/litex/build/lattice/icestorm.py b/litex/build/lattice/icestorm.py index 98510102..5fd21ff2 100644 --- a/litex/build/lattice/icestorm.py +++ b/litex/build/lattice/icestorm.py @@ -5,7 +5,7 @@ import os import sys import subprocess -from litex.gen.fhdl.structure import _Fragment +from migen.fhdl.structure import _Fragment from litex.build.generic_platform import * from litex.build import tools diff --git a/litex/build/sim/platform.py b/litex/build/sim/platform.py index f76532a4..19ab63eb 100644 --- a/litex/build/sim/platform.py +++ b/litex/build/sim/platform.py @@ -1,5 +1,6 @@ -from litex.gen.fhdl.structure import Signal -from litex.gen.genlib.record import Record +from migen.fhdl.structure import Signal +from migen.genlib.record import Record + from litex.build.generic_platform import GenericPlatform from litex.build.sim import common, verilator diff --git a/litex/build/sim/verilator.py b/litex/build/sim/verilator.py index a2e39b47..72b7d5e9 100644 --- a/litex/build/sim/verilator.py +++ b/litex/build/sim/verilator.py @@ -5,7 +5,8 @@ import os import subprocess -from litex.gen.fhdl.structure import _Fragment +from migen.fhdl.structure import _Fragment + from litex.build import tools from litex.build.generic_platform import * diff --git a/litex/build/xilinx/common.py b/litex/build/xilinx/common.py index 4c59a998..57ae8931 100644 --- a/litex/build/xilinx/common.py +++ b/litex/build/xilinx/common.py @@ -11,12 +11,12 @@ try: except ImportError: _have_colorama = False -from litex.gen.fhdl.structure import * -from litex.gen.fhdl.specials import Instance -from litex.gen.fhdl.module import Module -from litex.gen.genlib.cdc import * -from litex.gen.genlib.resetsync import AsyncResetSynchronizer -from litex.gen.genlib.io import * +from migen.fhdl.structure import * +from migen.fhdl.specials import Instance +from migen.fhdl.module import Module +from migen.genlib.cdc import * +from migen.genlib.resetsync import AsyncResetSynchronizer +from migen.genlib.io import * from litex.build import tools diff --git a/litex/build/xilinx/ise.py b/litex/build/xilinx/ise.py index 171fbef0..2d51e695 100644 --- a/litex/build/xilinx/ise.py +++ b/litex/build/xilinx/ise.py @@ -2,7 +2,8 @@ import os import subprocess import sys -from litex.gen.fhdl.structure import _Fragment +from migen.fhdl.structure import _Fragment + from litex.build.generic_platform import * from litex.build import tools from litex.build.xilinx import common diff --git a/litex/build/xilinx/vivado.py b/litex/build/xilinx/vivado.py index ea5eb011..5201dc5f 100644 --- a/litex/build/xilinx/vivado.py +++ b/litex/build/xilinx/vivado.py @@ -5,7 +5,8 @@ import os import subprocess import sys -from litex.gen.fhdl.structure import _Fragment +from migen.fhdl.structure import _Fragment + from litex.build.generic_platform import * from litex.build import tools from litex.build.xilinx import common diff --git a/litex/gen/__init__.py b/litex/gen/__init__.py index 2cd38253..7d751ff9 100644 --- a/litex/gen/__init__.py +++ b/litex/gen/__init__.py @@ -1,11 +1 @@ -from litex.gen.fhdl.structure import * -from litex.gen.fhdl.module import * -from litex.gen.fhdl.specials import * -from litex.gen.fhdl.bitcontainer import * -from litex.gen.fhdl.decorators import * -from litex.gen.fhdl.simplify import * - from litex.gen.sim import * - -from litex.gen.genlib.record import * -from litex.gen.genlib.fsm import * diff --git a/litex/gen/fhdl/verilog.py b/litex/gen/fhdl/verilog.py index 8ce67bc0..9ed17b0e 100644 --- a/litex/gen/fhdl/verilog.py +++ b/litex/gen/fhdl/verilog.py @@ -2,11 +2,11 @@ from functools import partial from operator import itemgetter import collections -from litex.gen.fhdl.structure import * -from litex.gen.fhdl.structure import _Operator, _Slice, _Assign, _Fragment -from litex.gen.fhdl.tools import * -from litex.gen.fhdl.namer import build_namespace -from litex.gen.fhdl.conv_output import ConvOutput +from migen.fhdl.structure import * +from migen.fhdl.structure import _Operator, _Slice, _Assign, _Fragment +from migen.fhdl.tools import * +from migen.fhdl.namer import build_namespace +from migen.fhdl.conv_output import ConvOutput _reserved_keywords = { diff --git a/litex/gen/sim/__init__.py b/litex/gen/sim/__init__.py index 853486a6..e04060e1 100644 --- a/litex/gen/sim/__init__.py +++ b/litex/gen/sim/__init__.py @@ -1 +1 @@ -from litex.gen.sim.core import Simulator, run_simulation, passive +from migen.sim.core import Simulator, run_simulation, passive diff --git a/litex/gen/sim/core.py b/litex/gen/sim/core.py index 2ab9b4bd..e3db45f6 100644 --- a/litex/gen/sim/core.py +++ b/litex/gen/sim/core.py @@ -3,18 +3,18 @@ import collections import inspect from functools import wraps -from litex.gen.fhdl.structure import * -from litex.gen.fhdl.structure import (_Value, _Statement, +from migen.fhdl.structure import * +from migen.fhdl.structure import (_Value, _Statement, _Operator, _Slice, _ArrayProxy, _Assign, _Fragment) -from litex.gen.fhdl.bitcontainer import value_bits_sign -from litex.gen.fhdl.tools import (list_targets, list_signals, +from migen.fhdl.bitcontainer import value_bits_sign +from migen.fhdl.tools import (list_targets, list_signals, insert_resets, lower_specials) -from litex.gen.fhdl.simplify import MemoryToArray -from litex.gen.fhdl.specials import _MemoryLocation -from litex.gen.fhdl.module import Module -from litex.gen.genlib.resetsync import AsyncResetSynchronizer -from litex.gen.sim.vcd import VCDWriter, DummyVCDWriter +from migen.fhdl.simplify import MemoryToArray +from migen.fhdl.specials import _MemoryLocation +from migen.fhdl.module import Module +from migen.genlib.resetsync import AsyncResetSynchronizer +from migen.sim.vcd import VCDWriter, DummyVCDWriter class ClockState: diff --git a/litex/gen/sim/vcd.py b/litex/gen/sim/vcd.py index db369a6d..25441b14 100644 --- a/litex/gen/sim/vcd.py +++ b/litex/gen/sim/vcd.py @@ -4,7 +4,7 @@ import os from collections import OrderedDict import shutil -from litex.gen.fhdl.namer import build_namespace +from migen.fhdl.namer import build_namespace def vcd_codes(): diff --git a/litex/soc/cores/code_8b10b.py b/litex/soc/cores/code_8b10b.py index 16d167c9..2e942853 100644 --- a/litex/soc/cores/code_8b10b.py +++ b/litex/soc/cores/code_8b10b.py @@ -12,7 +12,7 @@ Note: This encoding is *not* used by DVI/HDMI (that uses a *different* 8b/10b scheme called TMDS). """ -from litex.gen import * +from migen import * def disparity(word, nbits): diff --git a/litex/soc/cores/cordic.py b/litex/soc/cores/cordic.py index c5db7e1d..14a92853 100644 --- a/litex/soc/cores/cordic.py +++ b/litex/soc/cores/cordic.py @@ -17,7 +17,7 @@ from math import atan, atanh, log, sqrt, pi -from litex.gen import * +from migen import * class TwoQuadrantCordic(Module): diff --git a/litex/soc/cores/cpu/lm32/core.py b/litex/soc/cores/cpu/lm32/core.py index 743a61f6..03d99efc 100644 --- a/litex/soc/cores/cpu/lm32/core.py +++ b/litex/soc/cores/cpu/lm32/core.py @@ -1,6 +1,6 @@ import os -from litex.gen import * +from migen import * from litex.soc.interconnect import wishbone diff --git a/litex/soc/cores/cpu/mor1kx/core.py b/litex/soc/cores/cpu/mor1kx/core.py index 87230059..f607d044 100644 --- a/litex/soc/cores/cpu/mor1kx/core.py +++ b/litex/soc/cores/cpu/mor1kx/core.py @@ -1,6 +1,6 @@ import os -from litex.gen import * +from migen import * from litex.soc.interconnect import wishbone diff --git a/litex/soc/cores/cpu/picorv32/core.py b/litex/soc/cores/cpu/picorv32/core.py index 9a0af3a3..dbce1c64 100644 --- a/litex/soc/cores/cpu/picorv32/core.py +++ b/litex/soc/cores/cpu/picorv32/core.py @@ -1,6 +1,6 @@ import os -from litex.gen import * +from migen import * from litex.soc.interconnect import wishbone diff --git a/litex/soc/cores/dna.py b/litex/soc/cores/dna.py index 324659d7..8e8ea641 100644 --- a/litex/soc/cores/dna.py +++ b/litex/soc/cores/dna.py @@ -1,6 +1,7 @@ # Copyright 2014-2015 Robert Jordens -from litex.gen import * +from migen import * + from litex.soc.interconnect.csr import * diff --git a/litex/soc/cores/frequency_meter.py b/litex/soc/cores/frequency_meter.py index 8b35c514..3e6159ee 100644 --- a/litex/soc/cores/frequency_meter.py +++ b/litex/soc/cores/frequency_meter.py @@ -1,6 +1,6 @@ -from litex.gen import * -from litex.gen.genlib.cdc import MultiReg, GrayCounter -from litex.gen.genlib.cdc import GrayDecoder +from migen import * +from migen.genlib.cdc import MultiReg, GrayCounter +from migen.genlib.cdc import GrayDecoder from litex.soc.interconnect.csr import * diff --git a/litex/soc/cores/gpio.py b/litex/soc/cores/gpio.py index 463e1e20..89ccd54d 100644 --- a/litex/soc/cores/gpio.py +++ b/litex/soc/cores/gpio.py @@ -1,5 +1,5 @@ -from litex.gen import * -from litex.gen.genlib.cdc import MultiReg +from migen import * +from migen.genlib.cdc import MultiReg from litex.soc.interconnect.csr import * diff --git a/litex/soc/cores/identifier.py b/litex/soc/cores/identifier.py index 07fc08ef..377600fd 100644 --- a/litex/soc/cores/identifier.py +++ b/litex/soc/cores/identifier.py @@ -1,4 +1,4 @@ -from litex.gen import * +from migen import * class Identifier(Module): diff --git a/litex/soc/cores/nor_flash_16.py b/litex/soc/cores/nor_flash_16.py index 3027882a..fa6e0c08 100644 --- a/litex/soc/cores/nor_flash_16.py +++ b/litex/soc/cores/nor_flash_16.py @@ -1,5 +1,5 @@ -from litex.gen import * -from litex.gen.genlib.fsm import FSM, NextState +from migen import * +from migen.genlib.fsm import FSM, NextState from litex.soc.interconnect import wishbone diff --git a/litex/soc/cores/spi.py b/litex/soc/cores/spi.py index bda81f04..caa470dd 100644 --- a/litex/soc/cores/spi.py +++ b/litex/soc/cores/spi.py @@ -1,6 +1,7 @@ from itertools import product -from litex.gen import * +from migen import * + from litex.soc.interconnect.csr import * diff --git a/litex/soc/cores/spi_flash.py b/litex/soc/cores/spi_flash.py index 14df3a4d..4447e9f9 100644 --- a/litex/soc/cores/spi_flash.py +++ b/litex/soc/cores/spi_flash.py @@ -1,5 +1,5 @@ -from litex.gen import * -from litex.gen.genlib.misc import timeline +from migen import * +from migen.genlib.misc import timeline from litex.soc.interconnect import wishbone from litex.soc.interconnect.csr import AutoCSR, CSRStorage, CSRStatus diff --git a/litex/soc/cores/timer.py b/litex/soc/cores/timer.py index d98a85e9..fdfefde2 100644 --- a/litex/soc/cores/timer.py +++ b/litex/soc/cores/timer.py @@ -1,4 +1,4 @@ -from litex.gen import * +from migen import * from litex.soc.interconnect.csr import * from litex.soc.interconnect.csr_eventmanager import * diff --git a/litex/soc/cores/uart.py b/litex/soc/cores/uart.py index a32b6e5b..0b7d5b53 100644 --- a/litex/soc/cores/uart.py +++ b/litex/soc/cores/uart.py @@ -1,6 +1,6 @@ -from litex.gen import * -from litex.gen.genlib.record import Record -from litex.gen.genlib.cdc import MultiReg +from migen import * +from migen.genlib.record import Record +from migen.genlib.cdc import MultiReg from litex.soc.interconnect.csr import * from litex.soc.interconnect.csr_eventmanager import * diff --git a/litex/soc/cores/xadc.py b/litex/soc/cores/xadc.py index e990a29e..1b044d6f 100644 --- a/litex/soc/cores/xadc.py +++ b/litex/soc/cores/xadc.py @@ -1,6 +1,7 @@ # Copyright 2014-2015 Robert Jordens -from litex.gen import * +from migen import * + from litex.soc.interconnect.csr import * diff --git a/litex/soc/integration/cpu_interface.py b/litex/soc/integration/cpu_interface.py index fd1e4afb..185d674c 100644 --- a/litex/soc/integration/cpu_interface.py +++ b/litex/soc/integration/cpu_interface.py @@ -1,6 +1,6 @@ import os -from litex.gen import * +from migen import * from litex.soc.interconnect.csr import CSRStatus diff --git a/litex/soc/integration/sdram_init.py b/litex/soc/integration/sdram_init.py index 1f73c1ec..8ca1db00 100644 --- a/litex/soc/integration/sdram_init.py +++ b/litex/soc/integration/sdram_init.py @@ -1,4 +1,4 @@ -from litex.gen import log2_int +from migen import log2_int def get_sdram_phy_header(sdram_phy_settings): diff --git a/litex/soc/integration/soc_core.py b/litex/soc/integration/soc_core.py index 02fe0c9c..7f6dd75a 100644 --- a/litex/soc/integration/soc_core.py +++ b/litex/soc/integration/soc_core.py @@ -1,6 +1,6 @@ from operator import itemgetter -from litex.gen import * +from migen import * from litex.soc.cores import identifier, timer, uart from litex.soc.cores.cpu import lm32, mor1kx, picorv32 diff --git a/litex/soc/integration/soc_sdram.py b/litex/soc/integration/soc_sdram.py index 4969bd59..1c9064c2 100644 --- a/litex/soc/integration/soc_sdram.py +++ b/litex/soc/integration/soc_sdram.py @@ -1,5 +1,5 @@ -from litex.gen import * -from litex.gen.genlib.record import * +from migen import * +from migen.genlib.record import * from litex.soc.interconnect import wishbone from litex.soc.interconnect.csr import AutoCSR @@ -79,7 +79,7 @@ class SoCSDRAM(SoCCore): # Remove this workaround when fixed by Xilinx. from litex.build.xilinx.vivado import XilinxVivadoToolchain if isinstance(self.platform.toolchain, XilinxVivadoToolchain): - from litex.gen.fhdl.simplify import FullMemoryWE + from migen.fhdl.simplify import FullMemoryWE self.submodules.l2_cache = FullMemoryWE()(l2_cache) else: self.submodules.l2_cache = l2_cache diff --git a/litex/soc/interconnect/axi.py b/litex/soc/interconnect/axi.py index 3d3570b7..27c45fde 100644 --- a/litex/soc/interconnect/axi.py +++ b/litex/soc/interconnect/axi.py @@ -6,8 +6,9 @@ import math -from litex.gen import * -from litex.gen.genlib.record import * +from migen import * +from migen.genlib.record import * + from litex.soc.interconnect import csr_bus # Layout of AXI4 Lite Bus @@ -179,7 +180,7 @@ class AXILite2CSR(Module): ) -from litex.gen.sim import run_simulation +from migen.sim import run_simulation from litex.soc.interconnect import csr, csr_bus def test_axilite2csr(): diff --git a/litex/soc/interconnect/csr.py b/litex/soc/interconnect/csr.py index b34802fc..94153369 100644 --- a/litex/soc/interconnect/csr.py +++ b/litex/soc/interconnect/csr.py @@ -24,9 +24,9 @@ class, which provides ``get_csrs`` and ``get_memories`` methods that scan for CSR and memory attributes and return their list. """ -from litex.gen import * -from litex.gen.util.misc import xdir -from litex.gen.fhdl.tracer import get_obj_var_name +from migen import * +from migen.util.misc import xdir +from migen.fhdl.tracer import get_obj_var_name class _CSRBase(DUID): diff --git a/litex/soc/interconnect/csr_bus.py b/litex/soc/interconnect/csr_bus.py index 86a9dad4..74a84b44 100644 --- a/litex/soc/interconnect/csr_bus.py +++ b/litex/soc/interconnect/csr_bus.py @@ -6,10 +6,10 @@ The CSR-2 bus is a low-bandwidth, resource-sensitive bus designed for accessing the configuration and status registers of cores from software. """ -from litex.gen import * -from litex.gen.genlib.record import * -from litex.gen.genlib.misc import chooser -from litex.gen.util.misc import xdir +from migen import * +from migen.genlib.record import * +from migen.genlib.misc import chooser +from migen.util.misc import xdir from litex.soc.interconnect import csr from litex.soc.interconnect.csr import CSRStorage diff --git a/litex/soc/interconnect/csr_eventmanager.py b/litex/soc/interconnect/csr_eventmanager.py index 07a32c33..9ec31229 100644 --- a/litex/soc/interconnect/csr_eventmanager.py +++ b/litex/soc/interconnect/csr_eventmanager.py @@ -6,8 +6,8 @@ controllers. from functools import reduce from operator import or_ -from litex.gen import * -from litex.gen.util.misc import xdir +from migen import * +from migen.util.misc import xdir from litex.soc.interconnect.csr import * diff --git a/litex/soc/interconnect/stream.py b/litex/soc/interconnect/stream.py index fea05b43..5a070ea7 100644 --- a/litex/soc/interconnect/stream.py +++ b/litex/soc/interconnect/stream.py @@ -1,16 +1,16 @@ -from litex.gen import * -from litex.gen.genlib.record import * -from litex.gen.genlib import fifo +from migen import * +from migen.genlib.record import * +from migen.genlib import fifo (DIR_SINK, DIR_SOURCE) = range(2) -def _make_m2s(layout, reset_less=False): +def _make_m2s(layout): r = [] for f in layout: if isinstance(f[1], (int, tuple)): - r.append((f[0], f[1], DIR_M_TO_S, reset_less)) + r.append((f[0], f[1], DIR_M_TO_S)) else: - r.append((f[0], _make_m2s(f[1], reset_less))) + r.append((f[0], _make_m2s(f[1]))) return r @@ -34,8 +34,8 @@ class EndpointDescription: ("ready", 1, DIR_S_TO_M), ("first", 1, DIR_M_TO_S), ("last", 1, DIR_M_TO_S), - ("payload", _make_m2s(self.payload_layout, True)), - ("param", _make_m2s(self.param_layout, True)) + ("payload", _make_m2s(self.payload_layout)), + ("param", _make_m2s(self.param_layout)) ] return full_layout @@ -359,7 +359,7 @@ class StrideConverter(Module): # XXX from copy import copy -from litex.gen.util.misc import xdir +from migen.util.misc import xdir def _rawbits_layout(l): if isinstance(l, int): diff --git a/litex/soc/interconnect/stream_packet.py b/litex/soc/interconnect/stream_packet.py index 8e4dff15..cd178e0b 100644 --- a/litex/soc/interconnect/stream_packet.py +++ b/litex/soc/interconnect/stream_packet.py @@ -1,7 +1,7 @@ -from litex.gen import * -from litex.gen.genlib.roundrobin import * -from litex.gen.genlib.record import * -from litex.gen.genlib.fsm import FSM, NextState +from migen import * +from migen.genlib.roundrobin import * +from migen.genlib.record import * +from migen.genlib.fsm import FSM, NextState from litex.soc.interconnect import stream diff --git a/litex/soc/interconnect/stream_sim.py b/litex/soc/interconnect/stream_sim.py index 7b686307..eacb5c5b 100644 --- a/litex/soc/interconnect/stream_sim.py +++ b/litex/soc/interconnect/stream_sim.py @@ -2,7 +2,8 @@ import random import math from copy import deepcopy -from litex.gen import * +from migen import * + from litex.soc.interconnect import stream # TODO: clean up code below diff --git a/litex/soc/interconnect/wishbone.py b/litex/soc/interconnect/wishbone.py index 2f2798c7..8f3437c1 100644 --- a/litex/soc/interconnect/wishbone.py +++ b/litex/soc/interconnect/wishbone.py @@ -1,11 +1,11 @@ from functools import reduce from operator import or_ -from litex.gen import * -from litex.gen.genlib import roundrobin -from litex.gen.genlib.record import * -from litex.gen.genlib.misc import split, displacer, chooser -from litex.gen.genlib.fsm import FSM, NextState +from migen import * +from migen.genlib import roundrobin +from migen.genlib.record import * +from migen.genlib.misc import split, displacer, chooser +from migen.genlib.fsm import FSM, NextState from litex.soc.interconnect import csr diff --git a/litex/soc/interconnect/wishbone2csr.py b/litex/soc/interconnect/wishbone2csr.py index 25efdc6f..1d7171a3 100644 --- a/litex/soc/interconnect/wishbone2csr.py +++ b/litex/soc/interconnect/wishbone2csr.py @@ -1,5 +1,5 @@ -from litex.gen import * -from litex.gen.genlib.misc import timeline +from migen import * +from migen.genlib.misc import timeline from litex.soc.interconnect import csr_bus, wishbone diff --git a/litex/soc/interconnect/wishbonebridge.py b/litex/soc/interconnect/wishbonebridge.py index b9f9d109..06feeffd 100644 --- a/litex/soc/interconnect/wishbonebridge.py +++ b/litex/soc/interconnect/wishbonebridge.py @@ -1,8 +1,8 @@ -from litex.gen import * +from migen import * -from litex.gen.genlib.misc import chooser, WaitTimer -from litex.gen.genlib.record import Record -from litex.gen.genlib.fsm import FSM, NextState +from migen.genlib.misc import chooser, WaitTimer +from migen.genlib.record import Record +from migen.genlib.fsm import FSM, NextState from litex.soc.interconnect import wishbone from litex.soc.interconnect import stream diff --git a/test/test_bitslip.py b/test/test_bitslip.py index 8927f0c0..ef801157 100644 --- a/test/test_bitslip.py +++ b/test/test_bitslip.py @@ -1,8 +1,8 @@ import unittest import random -from litex.gen import * -from litex.gen.genlib.misc import BitSlip +from migen import * +from migen.genlib.misc import BitSlip class BitSlipModel: diff --git a/test/test_code_8b10b.py b/test/test_code_8b10b.py index 56d84715..38ad433f 100644 --- a/test/test_code_8b10b.py +++ b/test/test_code_8b10b.py @@ -2,7 +2,7 @@ import unittest import random from collections import namedtuple -from litex.gen import * +from migen import * from litex.soc.cores import code_8b10b diff --git a/test/test_gearbox.py b/test/test_gearbox.py index c8ecfad6..9ec2ad2d 100644 --- a/test/test_gearbox.py +++ b/test/test_gearbox.py @@ -1,8 +1,8 @@ import unittest import random -from litex.gen import * -from litex.gen.genlib.cdc import Gearbox +from migen import * +from migen.genlib.cdc import Gearbox # TODO: # connect two gearbox together: diff --git a/test/test_targets.py b/test/test_targets.py index 89c1b28e..591353ec 100644 --- a/test/test_targets.py +++ b/test/test_targets.py @@ -1,7 +1,7 @@ import unittest import os -from litex.gen import * +from migen import * from litex.soc.integration.builder import * -- 2.30.2