clean up
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 30 Jan 2015 18:34:13 +0000 (19:34 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 30 Jan 2015 18:34:13 +0000 (19:34 +0100)
16 files changed:
liteeth/__init__.py
liteeth/mac/__init__.py
liteeth/mac/common.py [deleted file]
liteeth/mac/core/__init__.py
liteeth/mac/core/crc.py
liteeth/mac/core/last_be.py
liteeth/mac/core/preamble.py
liteeth/mac/frontend/sram.py
liteeth/mac/frontend/wishbone.py
liteeth/test/arp_tb.py
liteeth/test/mac_core_tb.py
liteeth/test/mac_wishbone_tb.py
liteeth/test/model/arp.py
liteeth/test/model/ip.py
liteeth/test/model/mac.py
liteeth/test/model/phy.py

index 849f2341759b476db9fa75a0fe26c26003bcf0f5..3a218059862918223bed014a76804cd0cb55e4ec 100644 (file)
@@ -1,6 +1,4 @@
 from liteeth.common import *
-from liteeth.generic.arbiter import Arbiter
-from liteeth.generic.dispatcher import Dispatcher
 from liteeth.mac import LiteEthMAC
 from liteeth.arp import LiteEthARP
 from liteeth.ip import LiteEthIP
index 30c6746b202a9f5948dec2f5a12bbdfc3d00125e..6176190ce720d8681e6a52a5c87e2529259112a7 100644 (file)
@@ -37,7 +37,7 @@ class LiteEthMAC(Module, AutoCSR):
                                Record.connect(self.depacketizer.source, self.crossbar.master.sink)
                        ]
                elif interface == "wishbone":
-                       self.submodules.interface = wishbone.LiteEthMACWishboneInterface(dw, 2, 2)
+                       self.submodules.interface = LiteEthMACWishboneInterface(dw, 2, 2)
                        self.comb += [
                                Record.connect(self.interface.source, self.core.sink),
                                Record.connect(self.core.source, self.interface.sink)
diff --git a/liteeth/mac/common.py b/liteeth/mac/common.py
deleted file mode 100644 (file)
index e69de29..0000000
index e8fa5a27768b988954487e32cb79028b3b4e2ff1..7a420de1120b157ea456081e5665174f7929065a 100644 (file)
@@ -1,5 +1,4 @@
 from liteeth.common import *
-from liteeth.mac.common import *
 from liteeth.mac.core import preamble, crc, last_be
 
 class LiteEthMACCore(Module, AutoCSR):
index e04e303bfcab950cc520afbb8e51a52a10c595e1..b14d0a125c17344656ade22c30dbeb226d8034f5 100644 (file)
@@ -1,5 +1,4 @@
 from liteeth.common import *
-from liteeth.mac.common import *
 
 class LiteEthMACCRCEngine(Module):
        """Cyclic Redundancy Check Engine
index ce39be2cac0580be988ec42ee724a94e96fbe74b..7d82b934b3bb5704aeeb998d4355fc05fe8f4018 100644 (file)
@@ -1,5 +1,4 @@
 from liteeth.common import *
-from liteeth.mac.common import *
 
 class LiteEthMACTXLastBE(Module):
        def __init__(self, dw):
index 4f7705469e9612d99817f02dd214d18a6701f02b..1b9f033c676e51bc549cb378fb46f2f0277720aa 100644 (file)
@@ -1,5 +1,4 @@
 from liteeth.common import *
-from liteeth.mac.common import *
 
 class LiteEthMACPreambleInserter(Module):
        def __init__(self, dw):
index fcb698ade7c227e646c11aaa879488086dad2362..eefb9a6234880a9fe461c6e9eeaf9db550d658e7 100644 (file)
@@ -1,5 +1,4 @@
 from liteeth.common import *
-from liteeth.mac.common import *
 
 from migen.bank.description import *
 from migen.bank.eventmanager import *
index c6cf671868f9d13046dfc611ac2854f9bb16b874..71b467dfa0f1953bff70a52d60c4a36861db47f5 100644 (file)
@@ -1,5 +1,4 @@
 from liteeth.common import *
-from liteeth.mac.common import *
 from liteeth.mac.frontend import sram
 
 from migen.bus import wishbone
index 89f6fe9cf9aff7e6337c31b963d7c13002a93be6..534cf0769cf168269c94bf37f4712784bbd81b86 100644 (file)
@@ -15,9 +15,9 @@ mac_address = 0x12345678abcd
 
 class TB(Module):
        def __init__(self):
-               self.submodules.phy_model = phy.PHY(8, debug=True)
-               self.submodules.mac_model = mac.MAC(self.phy_model, debug=True, loopback=False)
-               self.submodules.arp_model = arp.ARP(self.mac_model, mac_address, ip_address, debug=True)
+               self.submodules.phy_model = phy.PHY(8, debug=False)
+               self.submodules.mac_model = mac.MAC(self.phy_model, debug=False, loopback=False)
+               self.submodules.arp_model = arp.ARP(self.mac_model, mac_address, ip_address, debug=False)
 
                self.submodules.mac = LiteEthMAC(self.phy_model, dw=8, with_hw_preamble_crc=True)
                self.submodules.arp = LiteEthARP(self.mac, mac_address, ip_address)
index 3b9e5a8dab5e1838f07254fbec2fa2722c220498..6fbaa6f7e6bfcd6a7d9669c400741472e583b472 100644 (file)
@@ -12,7 +12,7 @@ from liteeth.test.model import phy, mac
 class TB(Module):
        def __init__(self):
                self.submodules.phy_model = phy.PHY(8, debug=False)
-               self.submodules.mac_model = mac.MAC(self.phy_model, debug=True, loopback=True)
+               self.submodules.mac_model = mac.MAC(self.phy_model, debug=False, loopback=True)
                self.submodules.core = LiteEthMACCore(phy=self.phy_model, dw=8, with_hw_preamble_crc=True)
 
                self.submodules.streamer = PacketStreamer(eth_phy_description(8), last_be=1)
index 6e7462418fab40a3910b302cc07316eaf8c24ea9..ca6740ebdadd6f1deb13d4a978674ddf6f4c403a 100644 (file)
@@ -115,7 +115,7 @@ class TB(Module):
 
                while True:
                        for slot in range(2):
-                               print("slot {}:".format(slot))
+                               print("slot {}: ".format(slot), end="")
                                # fill tx memory
                                for i in range(length//4+1):
                                        dat = int.from_bytes(tx_payload[4*i:4*(i+1)], "big")
index 79ac98d0a036df1d0d6dd11ce91107237dec31ee..1dc84626564cd34dc3553e55e01d1798b6959fac 100644 (file)
@@ -1,7 +1,6 @@
-import math, binascii
+import math
 
 from liteeth.common import *
-from liteeth.mac.common import *
 from liteeth.test.common import *
 
 from liteeth.test.model import mac
index 4a8c18750f3b2f278d644b2477be522b393aad94..3b5aa6d5ce1014d5654244b268eef33e607b87ab 100644 (file)
@@ -1,7 +1,6 @@
-import math, binascii
+import math
 
 from liteeth.common import *
-from liteeth.mac.common import *
 from liteeth.test.common import *
 
 from liteeth.test.model import mac
@@ -91,7 +90,7 @@ if __name__ == "__main__":
        packet = IPPacket(packet)
        # check decoding
        packet.decode()
-       print(packet)
+       #print(packet)
        errors += verify_packet(packet, {})
        # check encoding
        packet.encode()
index 74273cb95df9d0531b3a707f57a11b66bdc26d32..f35288359376abd59de355dfd6802b2b15f73215 100644 (file)
@@ -1,7 +1,6 @@
 import math, binascii
 
 from liteeth.common import *
-from liteeth.mac.common import *
 from liteeth.test.common import *
 
 def print_mac(s):
index 296cbb84c5ef18b1cb637b82cedb3c2bae862860..9f388f5bd52c3be79da49741b4619b054561caa4 100644 (file)
@@ -1,5 +1,4 @@
 from liteeth.common import *
-from liteeth.mac.common import *
 from liteeth.test.common import *
 
 def print_phy(s):