mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
test_udp: test loopback on port 6000 (dw=8) and port 8000 (dw=32) OK on board!
This commit is contained in:
parent
974169218f
commit
310040b43b
1 changed files with 32 additions and 31 deletions
|
@ -41,9 +41,7 @@ def generate_packet(seed, length):
|
|||
seed += 1
|
||||
return r, seed
|
||||
|
||||
fpga_ip = "192.168.1.40"
|
||||
udp_port = 6000
|
||||
test_size = 1*MB
|
||||
def test(fpga_ip, udp_port, test_size):
|
||||
tx_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
rx_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
rx_sock.bind(("", udp_port))
|
||||
|
@ -77,3 +75,6 @@ try:
|
|||
receive_thread.join(0.1)
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
test("192.168.1.40", 6000, 128*KB)
|
||||
test("192.168.1.40", 8000, 128*KB)
|
||||
|
|
Loading…
Reference in a new issue