From a170acda0f211bdb183d3c78bba19261af931af9 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 24 Jun 2019 11:20:36 +0200 Subject: [PATCH] change MAC location (next to phy/core/frontend), keep import retro-compatibility --- liteeth/core/__init__.py | 3 +-- liteeth/core/mac.py | 1 + liteeth/{core => }/mac/__init__.py | 6 +++--- liteeth/{core => }/mac/common.py | 0 liteeth/{core => }/mac/core.py | 2 +- liteeth/{core => }/mac/crc.py | 0 liteeth/{core => }/mac/gap.py | 0 liteeth/{core => }/mac/last_be.py | 0 liteeth/{core => }/mac/padding.py | 0 liteeth/{core => }/mac/preamble.py | 0 liteeth/{core => }/mac/sram.py | 0 liteeth/{core => }/mac/wishbone.py | 2 +- 12 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 liteeth/core/mac.py rename liteeth/{core => }/mac/__init__.py (91%) rename liteeth/{core => }/mac/common.py (100%) rename liteeth/{core => }/mac/core.py (98%) rename liteeth/{core => }/mac/crc.py (100%) rename liteeth/{core => }/mac/gap.py (100%) rename liteeth/{core => }/mac/last_be.py (100%) rename liteeth/{core => }/mac/padding.py (100%) rename liteeth/{core => }/mac/preamble.py (100%) rename liteeth/{core => }/mac/sram.py (100%) rename liteeth/{core => }/mac/wishbone.py (97%) diff --git a/liteeth/core/__init__.py b/liteeth/core/__init__.py index be7eabe..5c1509f 100644 --- a/liteeth/core/__init__.py +++ b/liteeth/core/__init__.py @@ -1,11 +1,10 @@ from liteeth.common import * -from liteeth.core.mac import LiteEthMAC +from liteeth.mac import LiteEthMAC from liteeth.core.arp import LiteEthARP from liteeth.core.ip import LiteEthIP from liteeth.core.udp import LiteEthUDP from liteeth.core.icmp import LiteEthICMP - class LiteEthIPCore(Module, AutoCSR): def __init__(self, phy, mac_address, ip_address, clk_freq, with_icmp=True): self.submodules.mac = LiteEthMAC(phy, 8, interface="crossbar", with_preamble_crc=True) diff --git a/liteeth/core/mac.py b/liteeth/core/mac.py new file mode 100644 index 0000000..efff4f4 --- /dev/null +++ b/liteeth/core/mac.py @@ -0,0 +1 @@ +from liteeth.mac import * # retro-compatibility # FIXME: remove \ No newline at end of file diff --git a/liteeth/core/mac/__init__.py b/liteeth/mac/__init__.py similarity index 91% rename from liteeth/core/mac/__init__.py rename to liteeth/mac/__init__.py index cac1765..8929406 100644 --- a/liteeth/core/mac/__init__.py +++ b/liteeth/mac/__init__.py @@ -1,7 +1,7 @@ from liteeth.common import * -from liteeth.core.mac.common import * -from liteeth.core.mac.core import LiteEthMACCore -from liteeth.core.mac.wishbone import LiteEthMACWishboneInterface +from liteeth.mac.common import * +from liteeth.mac.core import LiteEthMACCore +from liteeth.mac.wishbone import LiteEthMACWishboneInterface class LiteEthMAC(Module, AutoCSR): diff --git a/liteeth/core/mac/common.py b/liteeth/mac/common.py similarity index 100% rename from liteeth/core/mac/common.py rename to liteeth/mac/common.py diff --git a/liteeth/core/mac/core.py b/liteeth/mac/core.py similarity index 98% rename from liteeth/core/mac/core.py rename to liteeth/mac/core.py index b25d2f6..d6276c3 100644 --- a/liteeth/core/mac/core.py +++ b/liteeth/mac/core.py @@ -1,5 +1,5 @@ from liteeth.common import * -from liteeth.core.mac import gap, preamble, crc, padding, last_be +from liteeth.mac import gap, preamble, crc, padding, last_be from liteeth.phy.model import LiteEthPHYModel from migen.genlib.cdc import PulseSynchronizer diff --git a/liteeth/core/mac/crc.py b/liteeth/mac/crc.py similarity index 100% rename from liteeth/core/mac/crc.py rename to liteeth/mac/crc.py diff --git a/liteeth/core/mac/gap.py b/liteeth/mac/gap.py similarity index 100% rename from liteeth/core/mac/gap.py rename to liteeth/mac/gap.py diff --git a/liteeth/core/mac/last_be.py b/liteeth/mac/last_be.py similarity index 100% rename from liteeth/core/mac/last_be.py rename to liteeth/mac/last_be.py diff --git a/liteeth/core/mac/padding.py b/liteeth/mac/padding.py similarity index 100% rename from liteeth/core/mac/padding.py rename to liteeth/mac/padding.py diff --git a/liteeth/core/mac/preamble.py b/liteeth/mac/preamble.py similarity index 100% rename from liteeth/core/mac/preamble.py rename to liteeth/mac/preamble.py diff --git a/liteeth/core/mac/sram.py b/liteeth/mac/sram.py similarity index 100% rename from liteeth/core/mac/sram.py rename to liteeth/mac/sram.py diff --git a/liteeth/core/mac/wishbone.py b/liteeth/mac/wishbone.py similarity index 97% rename from liteeth/core/mac/wishbone.py rename to liteeth/mac/wishbone.py index d920db4..ad73f25 100644 --- a/liteeth/core/mac/wishbone.py +++ b/liteeth/mac/wishbone.py @@ -1,7 +1,7 @@ from migen.fhdl.simplify import FullMemoryWE from liteeth.common import * -from liteeth.core.mac import sram +from liteeth.mac import sram from litex.soc.interconnect import wishbone