Testing AAT Demo
The AAT demo is an example of trading algorithm which is running on Alveo card. After building an example, testing demo is required in order to proof that the hardware is work and being a good start for developing on other protocols.
Computer’s Preparation
In this tutorial, we will illustrate testing AAT demo on U50 and 10 Gb Ethernet card on the same computer. Connecting the Alveo card with QSFP+ that can split into 4 SFP+. Using cable 1&2 to connect on the 10 Gb Ethernet as in picture below.
Then, Download tcpreplay which is a service to fire a prepared packages into Alveo card as shown in picture below.
IP configuration
IP number of each port needs be set to match with the demo. To set IP number, we must know the interface of each port before setting IP number by typing command below
sudo lshw -C network
Then, set the IP number on each port as below by typing command
sudo ifconfig <interface> <ip number>
Re-check the IP Address on each port by command
Ifconfig
Environment Setting & Download xclbin file
Set the environment before download xclbin file and operate AAT demo as show in picture below by typing command
source /opt/xilinx/xrt/setup.sh
source /tools/Xilinx/Vitis/2021.1/settings64.sh
export PLATFORM_REPO_PATHS=’/opt/xilinx/platforms’
export XILINX_PLATFORM=’xilinx_u50_gen3x16_xdma_201920_3’
export DEVICE=’/opt/xilinx/platforms/xilinx_u50_gen3x16_xdma_201920_3/xilinx_u50_gen3x16_xdma_201920_3.xpfm’
export DM_MODE=DMA
Next, go to build folder inside of AAT demo folder. In this case, The demo is on the desktop.
Typing command cd Desktop/Accelerated_Algorithmic_Trading/build/.
Then, running AAT shell command in order to download xclbin file by command
./aat_shell_exe
After that, Download xclbin file, in this case we will use built xclbin file, to Alveo card by typing command
Download aat.xclbin
Initialize Order Port
Open new terminal for receive an order after AAT demo processes marker data through the command
nc -l 192.168.20.100 12345 -v
After running the command, the result is shown as picture below
Running AAT demo
Go back to the terminal with AAT shell demo. Now, it is a time to run the AAT demo by this command
run support/demo_setup.cfg
After running, the result of open port to sending order is shown in the Order’s Port terminal
Transmit market data
Open the 3rd terminal and navigate to the folder sample inside AAT demo folder to fire the market data to Alveo card by the command
sudo tcpreplay –intf1=<ethernet interface> –pps=2 –stats=1 cme_input_arb.pcap
After market data transmitted, AAT demo generates order packets to Order Port’s terminal as shown in picture below.
AAT Demo Status
User can see the status of each block of AAT demo by these command
ethernet getstatus
feedhandler getstatus
orderbook readdata
orderentry getstatus
In Ethernet Kernel module, we focusing on Rx Block Lock – Status(Live). In good condition, it shows “LOCKED” in this section. In the GT Power Good – GT Power Good (Live) section shows “true” as shown in picture above.
In Feed Handler Kernel module, on the lower table shows number of Bytes, packet and etc which Feed Handler Kernel processed.
OrderBook Kernel module shows the current value of the market data.
Order Entry Kernel module illustrates the roughly input and output of this module. The input is the information to create an Order packet and the output is Order packet sending to Order Port.