use mininal imports
This commit is contained in:
parent
09dad1b520
commit
9a7039ef72
|
@ -1,7 +1,7 @@
|
|||
from liteeth.common import *
|
||||
from liteeth.frontend.etherbone import LiteEthEtherbone
|
||||
|
||||
from targets.base import BaseSoC
|
||||
from liteeth.frontend.etherbone import LiteEthEtherbone
|
||||
|
||||
|
||||
class EtherboneSoC(BaseSoC):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from liteeth.common import *
|
||||
from liteeth.frontend.tty import LiteEthTTY
|
||||
|
||||
from targets.base import BaseSoC
|
||||
from liteeth.frontend.tty import LiteEthTTY
|
||||
|
||||
|
||||
class TTYSoC(BaseSoC):
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
from liteeth.common import *
|
||||
|
||||
from litex.soc.interconnect.stream_packet import Buffer
|
||||
|
||||
from targets.base import BaseSoC
|
||||
|
||||
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
import math
|
||||
from collections import OrderedDict
|
||||
from math import ceil
|
||||
|
||||
from litex.gen import *
|
||||
from litex.gen.genlib.resetsync import AsyncResetSynchronizer
|
||||
from litex.gen.genlib.record import *
|
||||
from litex.gen.genlib.fsm import FSM, NextState
|
||||
from litex.gen.genlib.misc import chooser, WaitTimer
|
||||
|
||||
from litex.soc.interconnect.stream import *
|
||||
from litex.soc.interconnect.stream_packet import *
|
||||
from litex.soc.interconnect.csr import *
|
||||
|
||||
from litex.soc.interconnect.stream_packet import Header, HeaderField
|
||||
|
||||
|
||||
def reverse_bytes(signal):
|
||||
n = (len(signal)+7)//8
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
from liteeth.common import *
|
||||
|
||||
from litex.gen.genlib.misc import WaitTimer
|
||||
from litex.soc.interconnect.stream_packet import Depacketizer, Packetizer
|
||||
|
||||
|
||||
_arp_table_layout = [
|
||||
("reply", 1),
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
from liteeth.common import *
|
||||
|
||||
from litex.soc.interconnect.stream_packet import Depacketizer, Packetizer, Buffer
|
||||
|
||||
|
||||
# icmp tx
|
||||
|
||||
class LiteEthICMPPacketizer(Packetizer):
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
from liteeth.common import *
|
||||
from liteeth.crossbar import LiteEthCrossbar
|
||||
|
||||
from litex.soc.interconnect.stream_packet import Depacketizer, Packetizer
|
||||
|
||||
|
||||
# ip crossbar
|
||||
|
||||
class LiteEthIPV4MasterPort:
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
from liteeth.common import *
|
||||
from liteeth.crossbar import LiteEthCrossbar
|
||||
|
||||
from litex.soc.interconnect.stream_packet import Depacketizer, Packetizer
|
||||
|
||||
|
||||
class LiteEthMACDepacketizer(Depacketizer):
|
||||
def __init__(self):
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
from liteeth.common import *
|
||||
from functools import reduce
|
||||
from operator import xor
|
||||
from collections import OrderedDict
|
||||
|
||||
from liteeth.common import *
|
||||
|
||||
from litex.gen.genlib.misc import chooser, WaitTimer
|
||||
|
||||
|
||||
class LiteEthMACCRCEngine(Module):
|
||||
|
|
|
@ -7,7 +7,7 @@ class LiteEthMACGap(Module):
|
|||
|
||||
# # #
|
||||
|
||||
gap = math.ceil(eth_interpacket_gap/(dw//8))
|
||||
gap = ceil(eth_interpacket_gap/(dw//8))
|
||||
counter = Signal(max=gap)
|
||||
counter_reset = Signal()
|
||||
counter_ce = Signal()
|
||||
|
|
|
@ -8,7 +8,7 @@ class LiteEthMACPaddingInserter(Module):
|
|||
|
||||
# # #
|
||||
|
||||
padding_limit = math.ceil(padding/(dw/8))-1
|
||||
padding_limit = ceil(padding/(dw/8))-1
|
||||
|
||||
counter = Signal(16, reset=1)
|
||||
counter_done = Signal()
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
from liteeth.common import *
|
||||
|
||||
from litex.gen.genlib.misc import chooser
|
||||
|
||||
|
||||
class LiteEthMACPreambleInserter(Module):
|
||||
def __init__(self, dw):
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
from liteeth.common import *
|
||||
from liteeth.crossbar import LiteEthCrossbar
|
||||
|
||||
from litex.soc.interconnect.stream_packet import Depacketizer, Packetizer, Buffer
|
||||
|
||||
|
||||
# udp crossbar
|
||||
|
||||
class LiteEthUDPMasterPort:
|
||||
|
|
|
@ -2,6 +2,9 @@ from collections import OrderedDict
|
|||
|
||||
from liteeth.common import *
|
||||
|
||||
from litex.soc.interconnect.stream_packet import Arbiter, Dispatcher
|
||||
|
||||
|
||||
class LiteEthCrossbar(Module):
|
||||
def __init__(self, master_port, dispatch_param):
|
||||
self.users = OrderedDict()
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from liteeth.common import *
|
||||
|
||||
from litex.soc.interconnect import wishbone
|
||||
from litex.soc.interconnect.stream_packet import *
|
||||
|
||||
# etherbone packet
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
from litex.gen.genlib.io import DDROutput
|
||||
|
||||
from liteeth.common import *
|
||||
|
||||
from litex.gen.genlib.io import DDROutput
|
||||
from litex.gen.genlib.resetsync import AsyncResetSynchronizer
|
||||
|
||||
|
||||
class LiteEthPHYGMIITX(Module):
|
||||
def __init__(self, pads, pads_register=True):
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
from liteeth.common import *
|
||||
from liteeth.phy.gmii import LiteEthPHYGMIICRG
|
||||
from liteeth.phy.mii import LiteEthPHYMIITX, LiteEthPHYMIIRX
|
||||
from liteeth.phy.gmii import LiteEthPHYGMIITX, LiteEthPHYGMIIRX
|
||||
|
||||
from litex.gen.genlib.io import DDROutput
|
||||
from litex.gen.genlib.cdc import PulseSynchronizer
|
||||
|
||||
from litex.soc.interconnect.stream import Multiplexer, Demultiplexer
|
||||
|
||||
from liteeth.common import *
|
||||
from liteeth.phy.gmii import LiteEthPHYGMIICRG
|
||||
from liteeth.phy.mii import LiteEthPHYMIITX, LiteEthPHYMIIRX
|
||||
from liteeth.phy.gmii import LiteEthPHYGMIITX, LiteEthPHYGMIIRX
|
||||
|
||||
modes = {
|
||||
"GMII": 0,
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
from liteeth.common import *
|
||||
|
||||
from litex.gen.genlib.resetsync import AsyncResetSynchronizer
|
||||
|
||||
|
||||
def converter_description(dw):
|
||||
payload_layout = [("data", dw)]
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
from liteeth.common import *
|
||||
|
||||
from litex.gen.genlib.resetsync import AsyncResetSynchronizer
|
||||
|
||||
|
||||
def converter_description(dw):
|
||||
payload_layout = [("data", dw)]
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
# RGMII PHY for Spartan-6
|
||||
from liteeth.common import *
|
||||
|
||||
from litex.gen.genlib.io import DDROutput
|
||||
from litex.gen.genlib.misc import WaitTimer
|
||||
from litex.gen.genlib.fsm import FSM, NextState
|
||||
|
||||
from liteeth.common import *
|
||||
from litex.gen.genlib.resetsync import AsyncResetSynchronizer
|
||||
|
||||
|
||||
class LiteEthPHYRGMIITX(Module):
|
||||
|
|
Loading…
Reference in New Issue