mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
replace litex.gen imports with migen imports
This commit is contained in:
parent
43164b9a2c
commit
1925ba176f
57 changed files with 141 additions and 138 deletions
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.resetsync import AsyncResetSynchronizer
|
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||||
|
|
||||||
from litex.boards.platforms import arty
|
from litex.boards.platforms import arty
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.boards.platforms import de0nano
|
from litex.boards.platforms import de0nano
|
||||||
|
|
||||||
from litex.soc.integration.soc_sdram import *
|
from litex.soc.integration.soc_sdram import *
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.resetsync import AsyncResetSynchronizer
|
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||||
|
|
||||||
from litex.boards.platforms import kc705
|
from litex.boards.platforms import kc705
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
import argparse
|
import argparse
|
||||||
from fractions import Fraction
|
from fractions import Fraction
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.resetsync import AsyncResetSynchronizer
|
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||||
|
|
||||||
from litex.boards.platforms import minispartan6
|
from litex.boards.platforms import minispartan6
|
||||||
|
|
||||||
from litex.soc.integration.soc_sdram import *
|
from litex.soc.integration.soc_sdram import *
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.resetsync import AsyncResetSynchronizer
|
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||||
|
|
||||||
from litex.boards.platforms import nexys4ddr
|
from litex.boards.platforms import nexys4ddr
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.resetsync import AsyncResetSynchronizer
|
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||||
|
|
||||||
from litex.boards.platforms import nexys_video
|
from litex.boards.platforms import nexys_video
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
import argparse
|
import argparse
|
||||||
import importlib
|
import importlib
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
from migen.genlib.io import CRG
|
||||||
|
|
||||||
from litex.boards.platforms import sim
|
from litex.boards.platforms import sim
|
||||||
from litex.gen.genlib.io import CRG
|
|
||||||
|
|
||||||
from litex.soc.integration.soc_sdram import *
|
from litex.soc.integration.soc_sdram import *
|
||||||
from litex.soc.integration.builder import *
|
from litex.soc.integration.builder import *
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
import argparse
|
import argparse
|
||||||
import importlib
|
import importlib
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.io import CRG
|
from migen.genlib.io import CRG
|
||||||
|
|
||||||
from litex.soc.integration.soc_core import *
|
from litex.soc.integration.soc_core import *
|
||||||
from litex.soc.integration.builder import *
|
from litex.soc.integration.builder import *
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from litex.gen.fhdl.module import Module
|
from migen.fhdl.module import Module
|
||||||
from litex.gen.fhdl.specials import Instance
|
from migen.fhdl.specials import Instance
|
||||||
from litex.gen.genlib.io import DifferentialInput, DifferentialOutput
|
from migen.genlib.io import DifferentialInput, DifferentialOutput
|
||||||
|
|
||||||
|
|
||||||
class AlteraDifferentialInputImpl(Module):
|
class AlteraDifferentialInputImpl(Module):
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
import os
|
import os
|
||||||
import subprocess
|
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.generic_platform import Pins, IOStandard, Misc
|
||||||
from litex.build import tools
|
from litex.build import tools
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from litex.gen.fhdl.structure import Signal
|
from migen.fhdl.structure import Signal
|
||||||
from litex.gen.genlib.record import Record
|
from migen.genlib.record import Record
|
||||||
from litex.gen.genlib.io import CRG
|
from migen.genlib.io import CRG
|
||||||
from litex.gen.fhdl import verilog
|
from migen.fhdl import verilog
|
||||||
|
|
||||||
from litex.build import tools
|
from litex.build import tools
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from litex.gen.fhdl.module import Module
|
from migen.fhdl.module import Module
|
||||||
from litex.gen.fhdl.specials import Instance
|
from migen.fhdl.specials import Instance
|
||||||
from litex.gen.genlib.io import *
|
from migen.genlib.io import *
|
||||||
from litex.gen.genlib.resetsync import AsyncResetSynchronizer
|
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||||
|
|
||||||
|
|
||||||
class DiamondAsyncResetSynchronizerImpl(Module):
|
class DiamondAsyncResetSynchronizerImpl(Module):
|
||||||
|
|
|
@ -6,8 +6,8 @@ import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from litex.gen.fhdl.structure import _Fragment
|
from migen.fhdl.structure import _Fragment
|
||||||
from litex.gen.fhdl.verilog import DummyAttrTranslate
|
from migen.fhdl.verilog import DummyAttrTranslate
|
||||||
|
|
||||||
from litex.build.generic_platform import *
|
from litex.build.generic_platform import *
|
||||||
from litex.build import tools
|
from litex.build import tools
|
||||||
|
|
|
@ -5,7 +5,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from litex.gen.fhdl.structure import _Fragment
|
from migen.fhdl.structure import _Fragment
|
||||||
|
|
||||||
from litex.build.generic_platform import *
|
from litex.build.generic_platform import *
|
||||||
from litex.build import tools
|
from litex.build import tools
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from litex.gen.fhdl.structure import Signal
|
from migen.fhdl.structure import Signal
|
||||||
from litex.gen.genlib.record import Record
|
from migen.genlib.record import Record
|
||||||
|
|
||||||
from litex.build.generic_platform import GenericPlatform
|
from litex.build.generic_platform import GenericPlatform
|
||||||
from litex.build.sim import common, verilator
|
from litex.build.sim import common, verilator
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from litex.gen.fhdl.structure import _Fragment
|
from migen.fhdl.structure import _Fragment
|
||||||
|
|
||||||
from litex.build import tools
|
from litex.build import tools
|
||||||
from litex.build.generic_platform import *
|
from litex.build.generic_platform import *
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,12 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
_have_colorama = False
|
_have_colorama = False
|
||||||
|
|
||||||
from litex.gen.fhdl.structure import *
|
from migen.fhdl.structure import *
|
||||||
from litex.gen.fhdl.specials import Instance
|
from migen.fhdl.specials import Instance
|
||||||
from litex.gen.fhdl.module import Module
|
from migen.fhdl.module import Module
|
||||||
from litex.gen.genlib.cdc import *
|
from migen.genlib.cdc import *
|
||||||
from litex.gen.genlib.resetsync import AsyncResetSynchronizer
|
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||||
from litex.gen.genlib.io import *
|
from migen.genlib.io import *
|
||||||
|
|
||||||
from litex.build import tools
|
from litex.build import tools
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from litex.gen.fhdl.structure import _Fragment
|
from migen.fhdl.structure import _Fragment
|
||||||
|
|
||||||
from litex.build.generic_platform import *
|
from litex.build.generic_platform import *
|
||||||
from litex.build import tools
|
from litex.build import tools
|
||||||
from litex.build.xilinx import common
|
from litex.build.xilinx import common
|
||||||
|
|
|
@ -5,7 +5,8 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from litex.gen.fhdl.structure import _Fragment
|
from migen.fhdl.structure import _Fragment
|
||||||
|
|
||||||
from litex.build.generic_platform import *
|
from litex.build.generic_platform import *
|
||||||
from litex.build import tools
|
from litex.build import tools
|
||||||
from litex.build.xilinx import common
|
from litex.build.xilinx import common
|
||||||
|
|
|
@ -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.sim import *
|
||||||
|
|
||||||
from litex.gen.genlib.record import *
|
|
||||||
from litex.gen.genlib.fsm import *
|
|
||||||
|
|
|
@ -2,11 +2,11 @@ from functools import partial
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
from litex.gen.fhdl.structure import *
|
from migen.fhdl.structure import *
|
||||||
from litex.gen.fhdl.structure import _Operator, _Slice, _Assign, _Fragment
|
from migen.fhdl.structure import _Operator, _Slice, _Assign, _Fragment
|
||||||
from litex.gen.fhdl.tools import *
|
from migen.fhdl.tools import *
|
||||||
from litex.gen.fhdl.namer import build_namespace
|
from migen.fhdl.namer import build_namespace
|
||||||
from litex.gen.fhdl.conv_output import ConvOutput
|
from migen.fhdl.conv_output import ConvOutput
|
||||||
|
|
||||||
|
|
||||||
_reserved_keywords = {
|
_reserved_keywords = {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
from litex.gen.sim.core import Simulator, run_simulation, passive
|
from migen.sim.core import Simulator, run_simulation, passive
|
||||||
|
|
|
@ -3,18 +3,18 @@ import collections
|
||||||
import inspect
|
import inspect
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
from litex.gen.fhdl.structure import *
|
from migen.fhdl.structure import *
|
||||||
from litex.gen.fhdl.structure import (_Value, _Statement,
|
from migen.fhdl.structure import (_Value, _Statement,
|
||||||
_Operator, _Slice, _ArrayProxy,
|
_Operator, _Slice, _ArrayProxy,
|
||||||
_Assign, _Fragment)
|
_Assign, _Fragment)
|
||||||
from litex.gen.fhdl.bitcontainer import value_bits_sign
|
from migen.fhdl.bitcontainer import value_bits_sign
|
||||||
from litex.gen.fhdl.tools import (list_targets, list_signals,
|
from migen.fhdl.tools import (list_targets, list_signals,
|
||||||
insert_resets, lower_specials)
|
insert_resets, lower_specials)
|
||||||
from litex.gen.fhdl.simplify import MemoryToArray
|
from migen.fhdl.simplify import MemoryToArray
|
||||||
from litex.gen.fhdl.specials import _MemoryLocation
|
from migen.fhdl.specials import _MemoryLocation
|
||||||
from litex.gen.fhdl.module import Module
|
from migen.fhdl.module import Module
|
||||||
from litex.gen.genlib.resetsync import AsyncResetSynchronizer
|
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||||
from litex.gen.sim.vcd import VCDWriter, DummyVCDWriter
|
from migen.sim.vcd import VCDWriter, DummyVCDWriter
|
||||||
|
|
||||||
|
|
||||||
class ClockState:
|
class ClockState:
|
||||||
|
|
|
@ -4,7 +4,7 @@ import os
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from litex.gen.fhdl.namer import build_namespace
|
from migen.fhdl.namer import build_namespace
|
||||||
|
|
||||||
|
|
||||||
def vcd_codes():
|
def vcd_codes():
|
||||||
|
|
|
@ -12,7 +12,7 @@ Note: This encoding is *not* used by DVI/HDMI (that uses a *different* 8b/10b
|
||||||
scheme called TMDS).
|
scheme called TMDS).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
|
|
||||||
def disparity(word, nbits):
|
def disparity(word, nbits):
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
from math import atan, atanh, log, sqrt, pi
|
from math import atan, atanh, log, sqrt, pi
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
|
|
||||||
class TwoQuadrantCordic(Module):
|
class TwoQuadrantCordic(Module):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.soc.interconnect import wishbone
|
from litex.soc.interconnect import wishbone
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.soc.interconnect import wishbone
|
from litex.soc.interconnect import wishbone
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.soc.interconnect import wishbone
|
from litex.soc.interconnect import wishbone
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright 2014-2015 Robert Jordens <jordens@gmail.com>
|
# Copyright 2014-2015 Robert Jordens <jordens@gmail.com>
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.soc.interconnect.csr import *
|
from litex.soc.interconnect.csr import *
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.cdc import MultiReg, GrayCounter
|
from migen.genlib.cdc import MultiReg, GrayCounter
|
||||||
from litex.gen.genlib.cdc import GrayDecoder
|
from migen.genlib.cdc import GrayDecoder
|
||||||
|
|
||||||
from litex.soc.interconnect.csr import *
|
from litex.soc.interconnect.csr import *
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.cdc import MultiReg
|
from migen.genlib.cdc import MultiReg
|
||||||
|
|
||||||
from litex.soc.interconnect.csr import *
|
from litex.soc.interconnect.csr import *
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
|
|
||||||
class Identifier(Module):
|
class Identifier(Module):
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.fsm import FSM, NextState
|
from migen.genlib.fsm import FSM, NextState
|
||||||
|
|
||||||
from litex.soc.interconnect import wishbone
|
from litex.soc.interconnect import wishbone
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from itertools import product
|
from itertools import product
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.soc.interconnect.csr import *
|
from litex.soc.interconnect.csr import *
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.misc import timeline
|
from migen.genlib.misc import timeline
|
||||||
|
|
||||||
from litex.soc.interconnect import wishbone
|
from litex.soc.interconnect import wishbone
|
||||||
from litex.soc.interconnect.csr import AutoCSR, CSRStorage, CSRStatus
|
from litex.soc.interconnect.csr import AutoCSR, CSRStorage, CSRStatus
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.soc.interconnect.csr import *
|
from litex.soc.interconnect.csr import *
|
||||||
from litex.soc.interconnect.csr_eventmanager import *
|
from litex.soc.interconnect.csr_eventmanager import *
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.record import Record
|
from migen.genlib.record import Record
|
||||||
from litex.gen.genlib.cdc import MultiReg
|
from migen.genlib.cdc import MultiReg
|
||||||
|
|
||||||
from litex.soc.interconnect.csr import *
|
from litex.soc.interconnect.csr import *
|
||||||
from litex.soc.interconnect.csr_eventmanager import *
|
from litex.soc.interconnect.csr_eventmanager import *
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright 2014-2015 Robert Jordens <jordens@gmail.com>
|
# Copyright 2014-2015 Robert Jordens <jordens@gmail.com>
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.soc.interconnect.csr import *
|
from litex.soc.interconnect.csr import *
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.soc.interconnect.csr import CSRStatus
|
from litex.soc.interconnect.csr import CSRStatus
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from litex.gen import log2_int
|
from migen import log2_int
|
||||||
|
|
||||||
|
|
||||||
def get_sdram_phy_header(sdram_phy_settings):
|
def get_sdram_phy_header(sdram_phy_settings):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.soc.cores import identifier, timer, uart
|
from litex.soc.cores import identifier, timer, uart
|
||||||
from litex.soc.cores.cpu import lm32, mor1kx, picorv32
|
from litex.soc.cores.cpu import lm32, mor1kx, picorv32
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.record import *
|
from migen.genlib.record import *
|
||||||
|
|
||||||
from litex.soc.interconnect import wishbone
|
from litex.soc.interconnect import wishbone
|
||||||
from litex.soc.interconnect.csr import AutoCSR
|
from litex.soc.interconnect.csr import AutoCSR
|
||||||
|
@ -79,7 +79,7 @@ class SoCSDRAM(SoCCore):
|
||||||
# Remove this workaround when fixed by Xilinx.
|
# Remove this workaround when fixed by Xilinx.
|
||||||
from litex.build.xilinx.vivado import XilinxVivadoToolchain
|
from litex.build.xilinx.vivado import XilinxVivadoToolchain
|
||||||
if isinstance(self.platform.toolchain, 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)
|
self.submodules.l2_cache = FullMemoryWE()(l2_cache)
|
||||||
else:
|
else:
|
||||||
self.submodules.l2_cache = l2_cache
|
self.submodules.l2_cache = l2_cache
|
||||||
|
|
|
@ -6,8 +6,9 @@
|
||||||
|
|
||||||
import math
|
import math
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.record import *
|
from migen.genlib.record import *
|
||||||
|
|
||||||
from litex.soc.interconnect import csr_bus
|
from litex.soc.interconnect import csr_bus
|
||||||
|
|
||||||
# Layout of AXI4 Lite 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
|
from litex.soc.interconnect import csr, csr_bus
|
||||||
|
|
||||||
def test_axilite2csr():
|
def test_axilite2csr():
|
||||||
|
|
|
@ -24,9 +24,9 @@ class, which provides ``get_csrs`` and ``get_memories`` methods that scan for
|
||||||
CSR and memory attributes and return their list.
|
CSR and memory attributes and return their list.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.util.misc import xdir
|
from migen.util.misc import xdir
|
||||||
from litex.gen.fhdl.tracer import get_obj_var_name
|
from migen.fhdl.tracer import get_obj_var_name
|
||||||
|
|
||||||
|
|
||||||
class _CSRBase(DUID):
|
class _CSRBase(DUID):
|
||||||
|
|
|
@ -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.
|
the configuration and status registers of cores from software.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.record import *
|
from migen.genlib.record import *
|
||||||
from litex.gen.genlib.misc import chooser
|
from migen.genlib.misc import chooser
|
||||||
from litex.gen.util.misc import xdir
|
from migen.util.misc import xdir
|
||||||
|
|
||||||
from litex.soc.interconnect import csr
|
from litex.soc.interconnect import csr
|
||||||
from litex.soc.interconnect.csr import CSRStorage
|
from litex.soc.interconnect.csr import CSRStorage
|
||||||
|
|
|
@ -6,8 +6,8 @@ controllers.
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
from operator import or_
|
from operator import or_
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.util.misc import xdir
|
from migen.util.misc import xdir
|
||||||
|
|
||||||
from litex.soc.interconnect.csr import *
|
from litex.soc.interconnect.csr import *
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.record import *
|
from migen.genlib.record import *
|
||||||
from litex.gen.genlib import fifo
|
from migen.genlib import fifo
|
||||||
|
|
||||||
(DIR_SINK, DIR_SOURCE) = range(2)
|
(DIR_SINK, DIR_SOURCE) = range(2)
|
||||||
|
|
||||||
def _make_m2s(layout, reset_less=False):
|
def _make_m2s(layout):
|
||||||
r = []
|
r = []
|
||||||
for f in layout:
|
for f in layout:
|
||||||
if isinstance(f[1], (int, tuple)):
|
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:
|
else:
|
||||||
r.append((f[0], _make_m2s(f[1], reset_less)))
|
r.append((f[0], _make_m2s(f[1])))
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@ class EndpointDescription:
|
||||||
("ready", 1, DIR_S_TO_M),
|
("ready", 1, DIR_S_TO_M),
|
||||||
("first", 1, DIR_M_TO_S),
|
("first", 1, DIR_M_TO_S),
|
||||||
("last", 1, DIR_M_TO_S),
|
("last", 1, DIR_M_TO_S),
|
||||||
("payload", _make_m2s(self.payload_layout, True)),
|
("payload", _make_m2s(self.payload_layout)),
|
||||||
("param", _make_m2s(self.param_layout, True))
|
("param", _make_m2s(self.param_layout))
|
||||||
]
|
]
|
||||||
return full_layout
|
return full_layout
|
||||||
|
|
||||||
|
@ -359,7 +359,7 @@ class StrideConverter(Module):
|
||||||
# XXX
|
# XXX
|
||||||
|
|
||||||
from copy import copy
|
from copy import copy
|
||||||
from litex.gen.util.misc import xdir
|
from migen.util.misc import xdir
|
||||||
|
|
||||||
def _rawbits_layout(l):
|
def _rawbits_layout(l):
|
||||||
if isinstance(l, int):
|
if isinstance(l, int):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.roundrobin import *
|
from migen.genlib.roundrobin import *
|
||||||
from litex.gen.genlib.record import *
|
from migen.genlib.record import *
|
||||||
from litex.gen.genlib.fsm import FSM, NextState
|
from migen.genlib.fsm import FSM, NextState
|
||||||
|
|
||||||
from litex.soc.interconnect import stream
|
from litex.soc.interconnect import stream
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@ import random
|
||||||
import math
|
import math
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.soc.interconnect import stream
|
from litex.soc.interconnect import stream
|
||||||
|
|
||||||
# TODO: clean up code below
|
# TODO: clean up code below
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
from operator import or_
|
from operator import or_
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib import roundrobin
|
from migen.genlib import roundrobin
|
||||||
from litex.gen.genlib.record import *
|
from migen.genlib.record import *
|
||||||
from litex.gen.genlib.misc import split, displacer, chooser
|
from migen.genlib.misc import split, displacer, chooser
|
||||||
from litex.gen.genlib.fsm import FSM, NextState
|
from migen.genlib.fsm import FSM, NextState
|
||||||
|
|
||||||
from litex.soc.interconnect import csr
|
from litex.soc.interconnect import csr
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.misc import timeline
|
from migen.genlib.misc import timeline
|
||||||
|
|
||||||
from litex.soc.interconnect import csr_bus, wishbone
|
from litex.soc.interconnect import csr_bus, wishbone
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.gen.genlib.misc import chooser, WaitTimer
|
from migen.genlib.misc import chooser, WaitTimer
|
||||||
from litex.gen.genlib.record import Record
|
from migen.genlib.record import Record
|
||||||
from litex.gen.genlib.fsm import FSM, NextState
|
from migen.genlib.fsm import FSM, NextState
|
||||||
|
|
||||||
from litex.soc.interconnect import wishbone
|
from litex.soc.interconnect import wishbone
|
||||||
from litex.soc.interconnect import stream
|
from litex.soc.interconnect import stream
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import unittest
|
import unittest
|
||||||
import random
|
import random
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.misc import BitSlip
|
from migen.genlib.misc import BitSlip
|
||||||
|
|
||||||
|
|
||||||
class BitSlipModel:
|
class BitSlipModel:
|
||||||
|
|
|
@ -2,7 +2,7 @@ import unittest
|
||||||
import random
|
import random
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.soc.cores import code_8b10b
|
from litex.soc.cores import code_8b10b
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import unittest
|
import unittest
|
||||||
import random
|
import random
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
from litex.gen.genlib.cdc import Gearbox
|
from migen.genlib.cdc import Gearbox
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# connect two gearbox together:
|
# connect two gearbox together:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import unittest
|
import unittest
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from litex.gen import *
|
from migen import *
|
||||||
|
|
||||||
from litex.soc.integration.builder import *
|
from litex.soc.integration.builder import *
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue