Host code for the current cloudFPGA project
This directory contains the CPU software counter part of the HLS application built into the role of the cFp_HelloKale project.
The _cFp_HelloKale project was developed for the bring-up and the testing of the FMKU2595 module when it is equipped with a Xilinx XCKU060 FPGA. As such, the role of cFp_HelloKale implements a set of TCP-, UDP- and DDR4-oriented tests and functions that can be called or exercised from a remote host.
It is good practise to ping your FPGA instance before trying to run any further test.
If not, refer to section How to build the project in this file and generate a new bitfile for the current cloudFPGA project.
Follow the procedure described in the section How to deploy a cloudFPGA instance and write down your 'instance_ip' address and your 'instance_id'.
You can ping
your FPGA instance with the following command:
$ ping <instance_ip> (e.g. ping 10.12.200.21)
Netcat (often abbreviated to nc
) is a computer networking utility for reading from and
writing to a network connection using TCP or UDP. If the tool is installed on your machine,
you can use it to test the establishment of a connection with your FPGA instance when it is
programmed with a cFp_HelloKale bitstream.
Enter the following command and type in a stream of characters at the console. That stream will be echoed back by the FPGA instance.
$ nc <image_ip> 8803 (e.g. nc 10.12.200.163 8803)
Enter the following command and type in a stream of characters at the console. That stream will be echoed back by the FPGA instance.
$ nc -u <image_ip> 8803 (e.g. nc -u 10.12.200.163 8803)
Socat is considered an advanced version of the Netcat tool. It offers more functionality, such as permitting multiple clients to listen on a port, or reusing connections.
Enter the following command and type in a stream of characters at the console. That stream will be echoed back by the FPGA instance.
$ socat - TCP4:<image_ip>:8803 (e.g. socat - TCP4:10.12.200.163:8803)
Enter the following command and type in a stream of characters at the console. That stream will be echoed back by the FPGA instance.
$ socat - UDP4:<image_ip>:8803 (e.g. socat - UDP4:10.12.200.163:8803)
Iperf is a tool for network performance measurement and tuning. If the tool is installed on your machine, you can use it to measure the throughput between the host and an FPGA instance that is programmed with a cFp_HelloKale bitstream.
Enter the following command to connect with your FPGA instance on TCP port 8800.
$ iperf --help
$ iperf -c <11.22.33.44> -p 8800
------------------------------------------------------------
Client connecting to <11.22.33.44>, TCP port 8800
TCP window size: 117 KByte (default)
------------------------------------------------------------
[ 3] local 10.2.0.10 port 52074 connected with <11.22.33.44> port 8800
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-30.0 sec 1.20 GBytes 345 Mbits/sec
Enter the following command to connect with your FPGA instance on UDP port 8800.
$ iperf --help
$ iperf -c <11.22.33.44> -p 8800 -u
------------------------------------------------------------
Client connecting to <11.22.33.44>, UDP port 8800
Sending 1470 byte datagrams, IPG target: 11215.21 us (kalman adjust)
UDP buffer size: 208 KByte (default)
------------------------------------------------------------
[ 3] local 10.2.0.10 port 37878 connected with <11.22.33.44> port 8800
[ 3] WARNING: did not receive ack of last datagram after 10 tries.
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 1.25 MBytes 1.05 Mbits/sec
[ 3] Sent 892 datagrams
If you want to experiment with socket communications between a host and a cloudFPGA module, visit the HOST/py directory which contains a set of Python scripts with socket programming examples for interacting with the role of the cFp_HelloKale project.