diff --git a/applications/arts/designs/arts_unb1_bg_offload/tb/sh/arts_sc1_bg_offload_single_board_dop41.sh b/applications/arts/designs/arts_unb1_bg_offload/tb/sh/arts_sc1_bg_offload_single_board_dop41.sh new file mode 100644 index 0000000000000000000000000000000000000000..765045d33d38c99484d16179cac87065dd8bfc84 --- /dev/null +++ b/applications/arts/designs/arts_unb1_bg_offload/tb/sh/arts_sc1_bg_offload_single_board_dop41.sh @@ -0,0 +1,27 @@ +# 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 diff --git a/applications/arts/designs/arts_unb1_bg_offload/tb/sh/em2_packet_rate.py b/applications/arts/designs/arts_unb1_bg_offload/tb/sh/em2_packet_rate.py new file mode 100644 index 0000000000000000000000000000000000000000..ea146890f0599da2a00ca846f4e01e234d055706 --- /dev/null +++ b/applications/arts/designs/arts_unb1_bg_offload/tb/sh/em2_packet_rate.py @@ -0,0 +1,35 @@ +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' +