{"id":301,"date":"2018-02-07T10:41:31","date_gmt":"2018-02-07T10:41:31","guid":{"rendered":"http:\/\/fpganow.com\/?p=301"},"modified":"2018-02-07T10:41:31","modified_gmt":"2018-02-07T10:41:31","slug":"10-gigabit-fpga-based-network-card","status":"publish","type":"post","link":"https:\/\/fpganow.com\/index.php\/2018\/02\/07\/10-gigabit-fpga-based-network-card\/","title":{"rendered":"10 Gigabit FPGA-based Network Card"},"content":{"rendered":"<p>So here is the most simple, FPGA-based Network Interface Card that I know of.<\/p>\n<p>This application will start Port 0 of the 10 Gigabit Network interface that is provided by the<strong> PXIe-6592R<\/strong>\u00a0(<a href=\"http:\/\/www.ni.com\/en-us\/support\/model.pxie-6592.html\"><em>http:\/\/www.ni.com\/en-us\/support\/model.pxie-6592.html<\/em><\/a>) board by <strong><em>National Instruments,\u00a0<\/em><\/strong>and will allow you to do any of the following:<\/p>\n<ul class=\"ili-indent\">\n<li>Check if any new ethernet frames have been received, and display the information, including the raw bytes of any such received frame<\/li>\n<li>Send a raw ethernet frame out of Port 0<\/li>\n<\/ul>\n<p>I have included the necessary code to parse and generate the following types of packets, enabling you to communicate with another computer on your network that supports:<\/p>\n<ul class=\"ili-indent\">\n<li>Ethernet II<\/li>\n<li>ARP<\/li>\n<li>ICMP<\/li>\n<li>IPv4<\/li>\n<li>UDP<\/li>\n<\/ul>\n<p>The VI&#8217;s to do this are located in the directory &#8220;Tests\/MAC\/Protocols&#8221;, simply wire the incoming frame data to the &#8220;Parse&#8221; VI&#8217;s, or write the parameters in to the &#8220;Create&#8221; VI&#8217;s.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-303\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2018\/02\/Supported-Protocols-1.png\" alt=\"\" width=\"289\" height=\"417\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2018\/02\/Supported-Protocols-1.png 289w, https:\/\/fpganow.com\/wp-content\/uploads\/2018\/02\/Supported-Protocols-1-208x300.png 208w\" sizes=\"auto, (max-width: 289px) 100vw, 289px\" \/><\/p>\n<p><strong>How to Parse Incoming Ethernet Frames<\/strong><\/p>\n<p>For an example of how to parse an incoming frame see the &#8220;Poll RX&#8221; case inside the bottom While Loop of the &#8220;<a href=\"https:\/\/github.com\/JohnStratoudakis\/LabVIEW_Fpga\/blob\/master\/07_10_Gigabit_CLIP\/Tests\/MAC\/MAC-Tester.vi\">MAC-Tester<\/a>&#8221; vi:<\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2018\/02\/Process-ARP-1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-307 size-large\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2018\/02\/Process-ARP-1-1024x591.png\" alt=\"\" width=\"525\" height=\"303\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2018\/02\/Process-ARP-1-1024x591.png 1024w, https:\/\/fpganow.com\/wp-content\/uploads\/2018\/02\/Process-ARP-1-300x173.png 300w, https:\/\/fpganow.com\/wp-content\/uploads\/2018\/02\/Process-ARP-1-768x443.png 768w, https:\/\/fpganow.com\/wp-content\/uploads\/2018\/02\/Process-ARP-1.png 1251w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/a><\/p>\n<p><strong>How to Create Ethernet Frames<\/strong><\/p>\n<p>For an example of how to create a valid outgoing ethernet frame with a valid CRC32 on the end, see the &#8220;Transmit Packet&#8221; case inside the bottom While Loop of the &#8220;<a href=\"https:\/\/github.com\/JohnStratoudakis\/LabVIEW_Fpga\/blob\/master\/07_10_Gigabit_CLIP\/Tests\/MAC\/MAC-Tester.vi\">MAC-Tester<\/a>&#8221; vi:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-311\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2018\/02\/Transmit-UDP.png\" alt=\"\" width=\"871\" height=\"372\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2018\/02\/Transmit-UDP.png 871w, https:\/\/fpganow.com\/wp-content\/uploads\/2018\/02\/Transmit-UDP-300x128.png 300w, https:\/\/fpganow.com\/wp-content\/uploads\/2018\/02\/Transmit-UDP-768x328.png 768w\" sizes=\"auto, (max-width: 871px) 100vw, 871px\" \/><\/p>\n<p>This vi calls the &#8220;UDP-Create.vi&#8221; and wires the size &#8211; in bytes &#8211; and the frame data in 64-bit words to the transmit FIFO.<\/p>\n<p><strong>Full Source Code<\/strong><\/p>\n<p>See the source code on GitHub here:<\/p>\n<p><a href=\"https:\/\/github.com\/JohnStratoudakis\/LabVIEW_Fpga\/tree\/master\/07_10_Gigabit_CLIP\">https:\/\/github.com\/JohnStratoudakis\/LabVIEW_Fpga\/tree\/master\/07_10_Gigabit_CLIP<\/a><\/p>\n<p>See the <a href=\"https:\/\/github.com\/JohnStratoudakis\/LabVIEW_Fpga\/blob\/master\/07_10_Gigabit_CLIP\/README.md\"><strong>README.md<\/strong><\/a> for more documentation.<\/p>\n<p><strong>Next?<\/strong><\/p>\n<p>Now I have to take this code and wire it up to my MicroBlaze implementation that also sits inside the FPGA project.\u00a0 Only problem right now is that I have only figured out how to configure a 32-bit FIFO, and not a 64-bit FIFO.\u00a0 So I can either do some sort of translation inside the FPGA or hope and get lucky by configuring the FIFO to be 64 bits wide.\u00a0 Note: by FIFO, I am referring to an AXI-Stream FIFO.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So here is the most simple, FPGA-based Network Interface Card that I know of. This application will start Port 0 of the 10 Gigabit Network interface that is provided by the PXIe-6592R\u00a0(http:\/\/www.ni.com\/en-us\/support\/model.pxie-6592.html) board by National Instruments,\u00a0and will allow you to do any of the following: Check if any new ethernet frames have been received, and &#8230; <a title=\"10 Gigabit FPGA-based Network Card\" class=\"read-more\" href=\"https:\/\/fpganow.com\/index.php\/2018\/02\/07\/10-gigabit-fpga-based-network-card\/\" aria-label=\"Read more about 10 Gigabit FPGA-based Network Card\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-301","post","type-post","status-publish","format-standard","hentry","category-uncategorized","masonry-post","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/posts\/301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/comments?post=301"}],"version-history":[{"count":6,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/posts\/301\/revisions"}],"predecessor-version":[{"id":312,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/posts\/301\/revisions\/312"}],"wp:attachment":[{"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/media?parent=301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/categories?post=301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/tags?post=301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}