cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
Functions | |
def | udp_tx (sock, message, count, lock, verbose=False) |
def | udp_rx (sock, message, count, lock, verbose=False) |
def | udp_txrx_loop (sock, message, count, verbose=False) |
def | udp_txrx_ramp (sock, message, count, verbose=False) |
Variables | |
parser = argparse.ArgumentParser(description='A script to send/receive UDP data to/from an FPGA module.') | |
type | |
str | |
default | |
help | |
int | |
action | |
args = parser.parse_args() | |
ipFpga = getFpgaIpv4(args) | |
instId = getInstanceId(args) | |
ipResMngr = getResourceManagerIpv4(args) | |
portFpga = getFpgaPort(args) | |
portResMngr = getResourceManagerPort(args) | |
tuple | fpgaAssociation = (str(ipFpga), portFpga) |
int | udpSP = portFpga + 49152 |
tuple | hostAssociation = (ipSaStr, udpSP) |
udpSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
seed = args.seed | |
size = args.size | |
count = args.loop_count | |
message = str_static_gen(size) | |
verbose = args.verbose | |
int | gBytesInFlight = 0 |
lock = threading.Lock() | |
tx_thread = threading.Thread(target=udp_tx, args=(udpSock, message, count, lock, args.verbose)) | |
rx_thread = threading.Thread(target=udp_rx, args=(udpSock, message, count, lock, args.verbose)) | |
def tc_UdpEcho.udp_rx | ( | sock, | |
message, | |||
count, | |||
lock, | |||
verbose = False |
|||
) |
UDP Rx Thread. :param sock The socket to receive from. :param message The expected string message to be received. :param count The number of datagrams to receive. :param lock A semaphore to access the global variable 'gBytesInFlight'. :param verbose, Enables verbosity. :return None
Definition at line 81 of file tc_UdpEcho.py.
def tc_UdpEcho.udp_tx | ( | sock, | |
message, | |||
count, | |||
lock, | |||
verbose = False |
|||
) |
UDP Tx Thread. :param sock The socket to send to. :param message The message string to sent. :param count The number of datagrams to send. :param lock A semaphore to access the global variable 'gBytesInFlight'. :param verbose Enables verbosity. :return None
Definition at line 40 of file tc_UdpEcho.py.
def tc_UdpEcho.udp_txrx_loop | ( | sock, | |
message, | |||
count, | |||
verbose = False |
|||
) |
UDP Tx-Rx Single-Thread Loop. :param sock The socket to send/receive to/from. :param message The message string to sent. :param count The number of datagrams to send. :param verbose Enables verbosity. :return None
Definition at line 137 of file tc_UdpEcho.py.
def tc_UdpEcho.udp_txrx_ramp | ( | sock, | |
message, | |||
count, | |||
verbose = False |
|||
) |
UDP Tx-Rx Single-Thread Ramp. :param sock The socket to send/receive to/from. :param message The message string to sent. :param count The number of datagrams to send. :param verbose Enables verbosity. :return None
Definition at line 198 of file tc_UdpEcho.py.
tc_UdpEcho.action |
Definition at line 286 of file tc_UdpEcho.py.
tc_UdpEcho.args = parser.parse_args() |
Definition at line 301 of file tc_UdpEcho.py.
tc_UdpEcho.count = args.loop_count |
Definition at line 423 of file tc_UdpEcho.py.
tc_UdpEcho.default |
Definition at line 274 of file tc_UdpEcho.py.
Definition at line 346 of file tc_UdpEcho.py.
int tc_UdpEcho.gBytesInFlight = 0 |
Definition at line 437 of file tc_UdpEcho.py.
tc_UdpEcho.help |
Definition at line 275 of file tc_UdpEcho.py.
tuple tc_UdpEcho.hostAssociation = (ipSaStr, udpSP) |
Definition at line 358 of file tc_UdpEcho.py.
tc_UdpEcho.instId = getInstanceId(args) |
Definition at line 313 of file tc_UdpEcho.py.
tc_UdpEcho.int |
Definition at line 276 of file tc_UdpEcho.py.
tc_UdpEcho.ipFpga = getFpgaIpv4(args) |
Definition at line 309 of file tc_UdpEcho.py.
tc_UdpEcho.ipResMngr = getResourceManagerIpv4(args) |
Definition at line 317 of file tc_UdpEcho.py.
tc_UdpEcho.lock = threading.Lock() |
Definition at line 439 of file tc_UdpEcho.py.
tc_UdpEcho.message = str_static_gen(size) |
Definition at line 427 of file tc_UdpEcho.py.
tc_UdpEcho.portFpga = getFpgaPort(args) |
Definition at line 321 of file tc_UdpEcho.py.
tc_UdpEcho.portResMngr = getResourceManagerPort(args) |
Definition at line 325 of file tc_UdpEcho.py.
tc_UdpEcho.rx_thread = threading.Thread(target=udp_rx, args=(udpSock, message, count, lock, args.verbose)) |
Definition at line 443 of file tc_UdpEcho.py.
tc_UdpEcho.seed = args.seed |
Definition at line 408 of file tc_UdpEcho.py.
tc_UdpEcho.size = args.size |
Definition at line 414 of file tc_UdpEcho.py.
tc_UdpEcho.str |
Definition at line 274 of file tc_UdpEcho.py.
tc_UdpEcho.tx_thread = threading.Thread(target=udp_tx, args=(udpSock, message, count, lock, args.verbose)) |
Definition at line 442 of file tc_UdpEcho.py.
tc_UdpEcho.type |
Definition at line 274 of file tc_UdpEcho.py.
tc_UdpEcho.udpSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |
Definition at line 363 of file tc_UdpEcho.py.
Definition at line 357 of file tc_UdpEcho.py.
tc_UdpEcho.verbose = args.verbose |
Definition at line 431 of file tc_UdpEcho.py.