{"id":440,"date":"2022-05-05T09:48:00","date_gmt":"2022-05-05T02:48:00","guid":{"rendered":"https:\/\/dgway.com\/blog_E\/?p=440"},"modified":"2022-06-27T21:42:50","modified_gmt":"2022-06-27T14:42:50","slug":"testing-aat-demo","status":"publish","type":"post","link":"https:\/\/dgway.com\/blog_E\/2022\/05\/05\/testing-aat-demo\/","title":{"rendered":"Testing AAT Demo"},"content":{"rendered":"\n<p>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.<\/p>\n\n\n\n<p><strong>Computer\u2019s Preparation<\/strong><\/p>\n\n\n\n<p>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&amp;2 to connect on the 10 Gb Ethernet as in picture below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"651\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/Connection-1024x651.jpg\" alt=\"\" class=\"wp-image-441\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/Connection-1024x651.jpg 1024w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/Connection-300x191.jpg 300w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/Connection-768x488.jpg 768w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/Connection.jpg 1046w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then, Download tcpreplay which is a service to fire a prepared packages into Alveo card as shown in picture below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"27\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/1651422760954.jpg\" alt=\"\" class=\"wp-image-442\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/1651422760954.jpg 614w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/1651422760954-300x13.jpg 300w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/figure>\n\n\n\n<p><strong>IP configuration<\/strong><\/p>\n\n\n\n<p>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<\/p>\n\n\n\n<p><em><mark style=\"background-color:#abb8c3\" class=\"has-inline-color\">sudo lshw -C network<\/mark><\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"912\" height=\"846\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/InterfaceName.jpg\" alt=\"\" class=\"wp-image-443\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/InterfaceName.jpg 912w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/InterfaceName-300x278.jpg 300w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/InterfaceName-768x712.jpg 768w\" sizes=\"auto, (max-width: 912px) 100vw, 912px\" \/><\/figure>\n\n\n\n<p>Then, set the IP number on each port as below by typing command<\/p>\n\n\n\n<p><em><mark style=\"background-color:#abb8c3\" class=\"has-inline-color\">sudo ifconfig &lt;interface&gt; &lt;ip number&gt;<\/mark><\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"131\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/SetIPAddr.jpg\" alt=\"\" class=\"wp-image-444\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/SetIPAddr.jpg 979w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/SetIPAddr-300x40.jpg 300w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/SetIPAddr-768x103.jpg 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/figure>\n\n\n\n<p>Re-check the IP Address on each port by command<\/p>\n\n\n\n<p><em><mark style=\"background-color:#abb8c3\" class=\"has-inline-color\">Ifconfig<\/mark><\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"915\" height=\"946\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/Re_checkIP.jpg\" alt=\"\" class=\"wp-image-445\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/Re_checkIP.jpg 915w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/Re_checkIP-290x300.jpg 290w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/Re_checkIP-768x794.jpg 768w\" sizes=\"auto, (max-width: 915px) 100vw, 915px\" \/><\/figure>\n\n\n\n<p><strong>Environment Setting &amp; Download xclbin file<\/strong><\/p>\n\n\n\n<p>Set the environment before download xclbin file and operate AAT demo as show in picture below by typing command<\/p>\n\n\n\n<p><mark style=\"background-color:#abb8c3\" class=\"has-inline-color\"><em>source \/opt\/xilinx\/xrt\/setup.sh<\/em><br><em>source \/tools\/Xilinx\/Vitis\/2021.1\/settings64.sh<br>export PLATFORM_REPO_PATHS=\u2019\/opt\/xilinx\/platforms\u2019<br>export XILINX_PLATFORM=\u2019xilinx_u50_gen3x16_xdma_201920_3\u2019<br>export DEVICE=\u2019\/opt\/xilinx\/platforms\/xilinx_u50_gen3x16_xdma_201920_3\/xilinx_u50_gen3x16_xdma_201920_3.xpfm\u2019<br>export DM_MODE=DMA<\/em><\/mark><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"921\" height=\"445\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/SetENV.jpg\" alt=\"\" class=\"wp-image-446\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/SetENV.jpg 921w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/SetENV-300x145.jpg 300w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/SetENV-768x371.jpg 768w\" sizes=\"auto, (max-width: 921px) 100vw, 921px\" \/><\/figure>\n\n\n\n<p>Next, go to build folder inside of AAT demo folder. In this case, The demo is on the desktop.<\/p>\n\n\n\n<p>Typing command <em><mark style=\"background-color:#abb8c3\" class=\"has-inline-color\">cd Desktop\/Accelerated_Algorithmic_Trading\/build\/<\/mark><\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"894\" height=\"22\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/cd.jpg\" alt=\"\" class=\"wp-image-447\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/cd.jpg 894w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/cd-300x7.jpg 300w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/cd-768x19.jpg 768w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><\/figure>\n\n\n\n<p>Then, running AAT shell command in order to download xclbin file by command<\/p>\n\n\n\n<p><em><mark style=\"background-color:#abb8c3\" class=\"has-inline-color\">.\/aat_shell_exe<\/mark><\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"909\" height=\"128\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/aat_shell.jpg\" alt=\"\" class=\"wp-image-448\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/aat_shell.jpg 909w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/aat_shell-300x42.jpg 300w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/aat_shell-768x108.jpg 768w\" sizes=\"auto, (max-width: 909px) 100vw, 909px\" \/><\/figure>\n\n\n\n<p>After that, Download xclbin file, in this case we will use built xclbin file,&nbsp; to Alveo card by typing command<\/p>\n\n\n\n<p><em><mark style=\"background-color:#abb8c3\" class=\"has-inline-color\">Download aat.xclbin<\/mark><\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"894\" height=\"207\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/downloadXclbin.jpg\" alt=\"\" class=\"wp-image-449\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/downloadXclbin.jpg 894w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/downloadXclbin-300x69.jpg 300w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/downloadXclbin-768x178.jpg 768w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><\/figure>\n\n\n\n<p><strong>Initialize Order Port<\/strong><\/p>\n\n\n\n<p>Open new terminal for receive an order after AAT demo processes marker data through the command<\/p>\n\n\n\n<p><em><mark style=\"background-color:#abb8c3\" class=\"has-inline-color\">nc -l 192.168.20.100 12345 -v<\/mark><\/em><\/p>\n\n\n\n<p>After running the command, the result is shown as picture below<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"610\" height=\"66\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/1651423354948.jpg\" alt=\"\" class=\"wp-image-450\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/1651423354948.jpg 610w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/1651423354948-300x32.jpg 300w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/figure>\n\n\n\n<p><strong>Running AAT demo<\/strong><\/p>\n\n\n\n<p>Go back to the terminal with AAT shell demo. Now, it is a time to run the AAT demo by this command<\/p>\n\n\n\n<p><em><mark style=\"background-color:#abb8c3\" class=\"has-inline-color\">run support\/demo_setup.cfg<\/mark><\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"920\" height=\"820\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/running.jpg\" alt=\"\" class=\"wp-image-451\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/running.jpg 920w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/running-300x267.jpg 300w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/running-768x685.jpg 768w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/><\/figure>\n\n\n\n<p>After running, the result of open port to sending order is shown in the Order\u2019s Port terminal<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"587\" height=\"85\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/OpenConnection.jpg\" alt=\"\" class=\"wp-image-452\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/OpenConnection.jpg 587w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/OpenConnection-300x43.jpg 300w\" sizes=\"auto, (max-width: 587px) 100vw, 587px\" \/><\/figure>\n\n\n\n<p><strong>Transmit market data<\/strong><\/p>\n\n\n\n<p>Open the 3<sup>rd<\/sup> terminal and navigate to the folder sample inside AAT demo folder to fire the market data to Alveo card by the command<\/p>\n\n\n\n<p><em><mark style=\"background-color:#abb8c3\" class=\"has-inline-color\">sudo tcpreplay \u2013intf1=&lt;ethernet interface&gt; &#8211;pps=2 \u2013stats=1 cme_input_arb.pcap<\/mark><\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"889\" height=\"494\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/transmitMarketData.jpg\" alt=\"\" class=\"wp-image-453\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/transmitMarketData.jpg 889w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/transmitMarketData-300x167.jpg 300w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/transmitMarketData-768x427.jpg 768w\" sizes=\"auto, (max-width: 889px) 100vw, 889px\" \/><\/figure>\n\n\n\n<p>After market data transmitted, AAT demo generates order packets to Order Port\u2019s terminal as shown in picture below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"889\" height=\"322\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/FixProtocalResult.jpg\" alt=\"\" class=\"wp-image-454\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/FixProtocalResult.jpg 889w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/FixProtocalResult-300x109.jpg 300w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/FixProtocalResult-768x278.jpg 768w\" sizes=\"auto, (max-width: 889px) 100vw, 889px\" \/><\/figure>\n\n\n\n<p><strong>AAT Demo Status<\/strong><\/p>\n\n\n\n<p>User can see the status of each block of AAT demo by these command<\/p>\n\n\n\n<p><em>ethernet getstatus<\/em><br><em>feedhandler getstatus<\/em><br><em>orderbook readdata<\/em><br><em>orderentry getstatus<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"890\" height=\"703\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/EthernetKernel.jpg\" alt=\"\" class=\"wp-image-455\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/EthernetKernel.jpg 890w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/EthernetKernel-300x237.jpg 300w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/EthernetKernel-768x607.jpg 768w\" sizes=\"auto, (max-width: 890px) 100vw, 890px\" \/><\/figure>\n\n\n\n<p>In Ethernet Kernel module, we focusing on Rx Block Lock \u2013 Status(Live). In good condition, it shows \u201cLOCKED\u201d in this section. In the GT Power Good \u2013 GT Power Good (Live) section shows \u201ctrue\u201d as shown in picture above.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"590\" height=\"405\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/FeedHandlerKernel.jpg\" alt=\"\" class=\"wp-image-456\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/FeedHandlerKernel.jpg 590w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/FeedHandlerKernel-300x206.jpg 300w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><\/figure>\n\n\n\n<p>In Feed Handler Kernel module, on the lower table shows number of Bytes, packet and etc which Feed Handler Kernel processed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"891\" height=\"325\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/OrderBookKernel.jpg\" alt=\"\" class=\"wp-image-458\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/OrderBookKernel.jpg 891w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/OrderBookKernel-300x109.jpg 300w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/OrderBookKernel-768x280.jpg 768w\" sizes=\"auto, (max-width: 891px) 100vw, 891px\" \/><\/figure>\n\n\n\n<p>OrderBook Kernel module shows the current value of the market data.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"616\" height=\"767\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/OrderEntryKernel-1.jpg\" alt=\"\" class=\"wp-image-459\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/OrderEntryKernel-1.jpg 616w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/05\/OrderEntryKernel-1-241x300.jpg 241w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/figure>\n\n\n\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\u2019s Preparation In this tutorial, we will illustrate testing AAT demo on U50 and 10 Gb Ethernet card&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":441,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-440","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-accelerated-computing-tutorial"],"_links":{"self":[{"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/posts\/440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/comments?post=440"}],"version-history":[{"count":4,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/posts\/440\/revisions"}],"predecessor-version":[{"id":916,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/posts\/440\/revisions\/916"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/media\/441"}],"wp:attachment":[{"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/media?parent=440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/categories?post=440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/tags?post=440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}