Skip to content
Snippets Groups Projects
Commit 6d7b67c0 authored by Daniel van der Schuur's avatar Daniel van der Schuur
Browse files

Added scripts for single board generated stream at WSRT

parent 716f6356
No related branches found
No related tags found
No related merge requests found
# Display current design name
python $UPE/peripherals/util_system_info.py --unb 31 --fn 0 -n 2
# Get memory map, revert to factory
python $UPE/peripherals/util_system_info.py --unb 31 --fn 0 -n 4
python $UPE/peripherals/util_wdi.py --unb 31 --fn 0 -n 0
sleep 4
# Display current design name
python $UPE/peripherals/util_system_info.py --unb 31 --fn 0 -n 2
# Get factory memory map, load application image
python $UPE/peripherals/util_system_info.py --unb 31 --fn 0 -n 4
python $UPE/peripherals/util_epcs.py --unb 31 --fn 0 -n 8
sleep 4
# Display current design name
python $UPE/peripherals/util_system_info.py --unb 31 --fn 0 -n 2
# Get application image memory map
python $UPE/peripherals/util_system_info.py --unb 31 --fn 0 -n 4
## Set destination MAC and IP Address to em2 adapter of ARTS-0/dop41
python $RADIOHDL/applications/arts/designs/arts_unb1_bg_offload/tb/python/pi_arts_unb1_bg_offload.py --unb 31 --fn 0 --reg eth_dst_mac=22095312726200,ip_dst_addr=174311427
# Enable the block generator
python $UPE/peripherals/util_diag_block_gen.py --unb 31 --fn 0 -n 5
import subprocess
import time
########################################################################
# Execute ifconfig twice with a one second interval to find the number
# of packets received per second.
########################################################################
cmd = 'ifconfig'
args = 'em2'
cmd_output = []
rx_packets_str = []
rx_packets = []
rx_bytes_str = []
rx_bytes = []
for i in range(2):
p = subprocess.Popen([cmd, args], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
cmd_output.append(out)
time.sleep(1)
for i in range(2):
string_list = cmd_output[i].split()
rx_packets_str.append(string_list[17])
rx_bytes_str.append(string_list[19])
rx_packets.append(int(rx_packets_str[i])) #.split(':')[1]))
rx_bytes.append(int(rx_bytes_str[i])) #.split(':')[1]))
packets_per_second = rx_packets[1]-rx_packets[0]
gigabits_per_second = (float(rx_bytes[1]-rx_bytes[0])*8)/1000000000
print '\n', packets_per_second, 'packets per second'
print gigabits_per_second, 'Gbps\n'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment