From 0818c292873ef26c07802b0e213665410c61f951 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 12 Feb 2015 12:16:57 +0100 Subject: [PATCH] etherbone: probing OK on hardware --- test/Makefile | 16 ++++++++++++++++ test/test_etherbone.py | 13 +++++++++++++ test/test_la.py | 3 +++ 3 files changed, 32 insertions(+) create mode 100644 test/Makefile create mode 100644 test/test_etherbone.py diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 000000000..0556486b3 --- /dev/null +++ b/test/Makefile @@ -0,0 +1,16 @@ +LEDIR = ../ +PYTHON = python3 + +CMD = PYTHONPATH=$(LEDIR) $(PYTHON) + +test_regs: + $(CMD) test_regs.py + +test_la: + $(CMD) test_la.py + +test_udp: + $(CMD) test_udp.py + +test_etherbone: + $(CMD) test_etherbone.py diff --git a/test/test_etherbone.py b/test/test_etherbone.py new file mode 100644 index 000000000..e11773b19 --- /dev/null +++ b/test/test_etherbone.py @@ -0,0 +1,13 @@ +import socket +from liteeth.test.model.etherbone import * + +SRAM_BASE = 0x02000000 + +import socket +sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + +# test probe +packet = EtherbonePacket() +packet.pf = 1 +packet.encode() +sock.sendto(bytes(packet), ("192.168.1.40", 20000)) diff --git a/test/test_la.py b/test/test_la.py index e73f3713b..8bf205fea 100644 --- a/test/test_la.py +++ b/test/test_la.py @@ -15,6 +15,9 @@ conditions = { conditions = { "core_udp_tx_fsm_state" : 1 } +conditions = { + "etherbonesocdevel_master_bus_stb" : 1 +} la.configure_term(port=0, cond=conditions) la.configure_sum("term") # Run Logic Analyzer