{"id":815,"date":"2022-07-25T14:30:13","date_gmt":"2022-07-25T06:30:13","guid":{"rendered":"http:\/\/www.hellofpga.com\/?p=815"},"modified":"2025-05-12T17:06:19","modified_gmt":"2025-05-12T09:06:19","slug":"uart_test","status":"publish","type":"post","link":"http:\/\/www.hellofpga.com\/index.php\/2022\/07\/25\/uart_test\/","title":{"rendered":"\u57fa\u4e8eEBAZ4205\u7684PS\u5b9e\u9a8c\u516b UART\u529f\u80fd\u6f14\u793a"},"content":{"rendered":"\n<p>\u672c\u6587\u7528MIO\u548cEMIO\u4e24\u79cd\u65b9\u5f0f\u5728EBAZ4205\u77ff\u673a\u4e0a\u6f14\u793a\u4e32\u53e3\u7684hello world\u4f8b\u7a0b\uff08\u9002\u7528\u4e8e\u4e3b\u677fuart\uff0c\u548c\u8f6c\u63a5\u677fUART\uff09<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5b9e\u9a8c\u5185\u5bb9\u9002\u7528\u4e8e\u5e02\u9762\u4e0a\u529f\u80fd\u6b63\u5e38\u7684EBAZ4205\u7684\u677f\u5b50<\/strong><\/li>\n\n\n\n<li><strong>\u672c\u6b21\u5b9e\u9a8c\u9700\u8981\u8fde\u63a5\u672c\u7ad9\u70b9\u7684EBAZ4205\u8f6c\u63a5\u677f<\/strong><\/li>\n\n\n\n<li>\u672c\u6b21\u5b9e\u9a8c\u6ca1\u6709\u7528\u5230PL\u7aef\u6676\u632f<\/li>\n\n\n\n<li><strong>\u672c\u6587\u5728 vivado2018.3\u7248\u672c\u4e0a\u6f14\u793a<\/strong><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">1.\u786c\u4ef6\u8d44\u6e90\u4ecb\u7ecd  <\/h2>\n\n\n\n<p>    \u4e32\u53e3\u7684\u5b9e\u73b0\u6709\u4e24\u79cd\u65b9\u5f0f\uff0c\u65b9\u5f0f1 ebaz4205\u4e3b\u677f\u4e0a\u6709\u4e32\u53e3\u7684\u8d44\u6e90\u5f15\u51fa\uff0c\u5728\u9760\u8fd1\u6309\u952e\u7684\u5730\u65b9\uff0c\u6709\u4e00\u4e2a4\u811a\u7684\u6392\u9488\u63a5\u63d2\u4ef6\uff0c\u8fd9\u4e2a\u63a5\u63d2\u4ef6\u4e2d\u7684 tx\u548crx\u662f\u8fde\u63a5\u5230ZYNQ\u7684PS\u786c\u4ef6UART\u4e0a\u7684\u3002 \u65b9\u5f0f2\uff0cPS\u7aef\u7684UART \u901a\u8fc7EMIO\u65b9\u5f0f\u6620\u5c04\u5230\u4efb\u610fPL\u7aef\u53e3\u8fdb\u884c\u5f15\u51fa\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u662f\u7528\u7684\u6269\u5c55\u677f\uff0c\u7b2c\u4e00\u79cd\u65b9\u5f0f\u53ef\u4ee5\u6458\u53bb\u6269\u5c55\u677f\u7684\u8df3\u7ebf\u5e3d\uff0c\u7136\u540e\u7528\u675c\u90a6\u7ebf\u5c06 \u6269\u5c55\u677f\u4e0a\u7684GND\uff0cTX,RX\u548c\u4e3b\u677f\u7684 UART\u53e3\u8fde\u63a5\uff0c \u7b2c\u4e8c\u79cd\u65b9\u5f0f\u4e0b\uff0c\u8f6c\u63a5\u677f\u7684\u4e32\u53e3\u90e8\u5206\u8df3\u7ebf\u5e3d\u63d2\u4e0a\u5373\u53ef\u5b9e\u73b0\u4e32\u53e3\u7684\u901a\u8baf\u3002<\/p>\n\n\n\n<p>\uff08\u5907\u6ce8\uff0c<strong>\u65e9\u671f\u7684<\/strong>\u8f6c\u63a5\u677f\u4e0a\u7684TX \u548cRX \u7684\u4e1d\u5370\u662f\u753b\u53cd\u7684 \uff0c\u5728\u8fde\u7ebf\u65f6\u5019\u8bf7\u6ce8\u610f\uff0c TX \u548cRX \u5bf9\u5e94 \u4e3b\u82af\u7247\u7684TX,RX \uff0cFPGA\u7ba1\u811a\u8bbe\u7f6e\u53ef\u4ee5\u53c2\u8003\u8fd9\u4e2a\u4e1d\u5370\uff0c   \u4f46\u662f\u5bf9\u4e8e\u62d4\u6389\u8df3\u7ebf\u5e3d\u7684\u65f6\u5019\u5355\u72ec\u7528USB\u8f6cUART\u90e8\u5206\u6765\u8bf4  \u4e1d\u5370\u662f\u6807\u53cd\u7684\uff09<strong>\uff08\u6700\u65b0\u7684\u677f\u5b50\u4e1d\u5370\u662f\u6b63\u786e\u7684\uff09<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-thumbnail\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-150x150.png\" alt=\"\" class=\"wp-image-817\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-150x150.png 150w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-100x100.png 100w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/figure>\n\n\n\n<p>\u53ef\u80fd\u770b\u7740\u6709\u70b9\u7ed5\uff0c \u770b\u4e0b\u56fe\u539f\u7406\u56fe\u4e0a\u4e24\u4e2a\u753b\u6846\u7684\u5730\u65b9\u5c31\u80fd\u7406\u89e3\u4e86<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"222\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-8-1024x222.png\" alt=\"\" class=\"wp-image-827\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-8-1024x222.png 1024w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-8-300x65.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-8-768x166.png 768w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-8-1536x333.png 1536w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-8.png 1657w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">2. \u521b\u5efa\u5de5\u7a0b\uff08\u672c\u5904\u5c06\u540c\u65f6\u4ecb\u7ecd\u65b9\u5f0f1 ps \u76f4\u8fde\u7684uart\uff0c\u548c\u65b9\u5f0f2 emio\u8fde\u63a5\u7684uart \u7684\u521b\u5efa\u65b9\u6cd5\uff09<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>1\uff09\u65b0\u5efa\u4e00\u4e2a\u9879\u76ee\uff0c\u82af\u7247\u578b\u53f7\u9009\u62e9 XC7Z010CLG400-1(\u7565\u6389\u90e8\u5206\u8fc7\u7a0b\uff0c\u8be6\u7ec6\u56fe\u6587\u8fc7\u7a0b\u53ef\u4ee5\u53c2\u8003  <a href=\"http:\/\/www.hellofpga.com\/index.php\/2024\/02\/02\/ebaz4205-emio\/\">\u57fa\u4e8eEBAZ4205\u7684PS\u5b9e\u9a8c\u4e00 GPIO\u4e4b\u7528EMIO\u65b9\u5f0f\u70b9\u4eaeLED\uff08\u5b8c\u6574\u56fe\u6587\uff09<\/a>\uff09<\/p>\n\n\n\n<p>2) \u521b\u5efa\u4e00\u4e2aBLOCK\u8bbe\u8ba1\uff0c\u5e76\u6dfb\u52a0ZYNQ7 PROCESSING SYSTEM\u6a21\u5757\uff0c\u8f6f\u4ef6\u81ea\u52a8\u751f\u6210\u4e86\u4e00\u4e2a zynq\u7684block \u5982\u4e0b\u56fe\u6240\u793a\uff0c\u63a5\u4e0b\u6765\u8981\u505a\u4e00\u4e9b\u76f8\u5e94\u7684\u8bbe\u7f6e\uff0c\u53cc\u51fb\u4e0b\u56fe\u4e2d\u7684ZYNQ\u6838<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-3.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>3\uff09\u5728ZYNQ\u4e2d\u8bbe\u7f6e\u65f6\u949f\u529f\u80fd\uff1a<\/p>\n\n\n\n<p>\u627e\u5230 \u8bbe\u7f6e\u9879\u76ee\u4e2d\u7684 Clock Configuration \u9009\u9879\uff0c \u5728PL Fabric Clocks \u8bbe\u7f6e\u81ea\u5df1\u9700\u8981\u7684\u65f6\u949f\u9891\u7387\uff0c\u8fd9\u91cc\u4e00\u5171\u67094\u79cd\u9891\u7387\u53ef\u4ee5\u8bbe\u7f6e \u7c7b\u4f3c\u4e8e\u6211\u4eec\u7684PLL\u529f\u80fd\u3002\u8fd9\u91cc\u6211\u4eec\u8bbe\u7f6e50M\u65f6\u949f<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"583\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-50.png\" alt=\"\" class=\"wp-image-264\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-50.png 960w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-50-300x182.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-50-768x466.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>4\uff09\u5728zynq\u4e2d\u8bbe\u7f6eDDR\u529f\u80fd\uff1a<\/p>\n\n\n\n<p>\u4f9d\u6b21\u5728\u5f39\u7a97\u91cc\u627e\u5230DDR Configuration\u2192DDR Controller Configuration\u2192DDR3\uff0c\u5728Memory Part\u4e0b\u62c9\u83dc\u5355\u4e2d\u6839\u636e\u81ea\u5df1\u677f\u5b50\u4e0a\u7684DDR\u6765\u9009\u62e9\u76f8\u5e94\u7684DDR3\uff0c\u672c\u5b9e\u9a8c\u6240\u7528\u5230\u578b\u53f7\uff1aMT41K128M16JT 125\uff0c\u6570\u636e\u4f4d\u5bbd\u9009\u62e916bit \u6700\u540e\u70b9\u51fb\u201cOK\u201d,\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"493\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-5.png\" alt=\"\" class=\"wp-image-188\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-5.png 977w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-5-300x151.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-5-768x388.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>5)  \u6dfb\u52a0 uart\u529f\u80fd<\/p>\n\n\n\n<p>a \uff08\u4e3b\u677f\u76f4\u63a5\u5f15\u51fa\u65b9\u5f0f\uff09\uff0c\u7531\u4e0b\u56fe\u53ef\u77e5\uff0c ebaz4205 \u7684uart\u8fde\u63a5\u5230\u7684\u662f  \u4e3b\u677f\u7684\u529f\u80fd1\u811a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"386\" height=\"166\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-1.png\" alt=\"\" class=\"wp-image-819\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-1.png 386w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-1-300x129.png 300w\" sizes=\"auto, (max-width: 386px) 100vw, 386px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"270\" height=\"71\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-2.png\" alt=\"\" class=\"wp-image-820\"\/><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u770b\u51fa \u7528\u65b9\u5f0fA\u8fde\u63a5\uff0c\u5b9e\u9645\u8fde\u63a5\u5230 PS\u90e8\u5206\u7684MIO24 \u548cMIO 25\u7ba1\u811a\u4e0a, \u5728\u8bbe\u7f6e\u9875\u9762 \u5c06UART1\u5bf9\u5e94\u7ba1\u811a\u8bbe\u7f6e\u6210 MIO24 MIO 25\u5373\u53ef<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"333\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-3-1024x333.png\" alt=\"\" class=\"wp-image-821\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-3-1024x333.png 1024w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-3-300x98.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-3-768x250.png 768w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-3.png 1041w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>b \uff08\u4e3b\u677f \u901a\u8fc7EMIO \u8fde\u63a5\u5230\u6269\u5c55\u677f\u65b9\u5f0f\uff09<\/p>\n\n\n\n<p>\u56e0\u4e3a uart 1\u5df2\u7ecf\u88ab MIO \u65b9\u5f0fa \u5360\u7528\uff0c\u6240\u4ee5\u8fd9\u91cc EMIO \u53ea\u80fd\u8fde\u63a5\u5230 UART 0\u4e0a\u4e86<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"545\" height=\"326\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-4.png\" alt=\"\" class=\"wp-image-822\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-4.png 545w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-4-300x179.png 300w\" sizes=\"auto, (max-width: 545px) 100vw, 545px\" \/><\/figure>\n\n\n\n<p>6\uff09\u5b8c\u6210\u4e0a\u8ff0\u64cd\u4f5c\u540e\uff0c \u70b9\u51fb\u201cRun Block Automation\u201d\u5982\u4e0b\u56fe\u6240\u793a\u3002\u5728\u5f39\u51fa\u7684\u9009\u9879\u4e2d\u4fdd\u6301\u9ed8\u8ba4\uff0c\u70b9\u51fb\u201cOK\u201d\uff0c\u5373\u53ef\u5b8c\u6210\u5bf9ZYNQ7 Processing System\u7684\u914d\u7f6e\uff0c\u5e76\u7528\u9f20\u6807\u8fde\u63a5FCLK_CLK\u548c M_AXI_GP0_ACLK\uff0c\u5f97\u5230\u4e0b\u56fe<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"268\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-5.png\" alt=\"\" class=\"wp-image-823\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-5.png 738w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-5-300x109.png 300w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/figure>\n\n\n\n<p>\u5728\u4e0a\u56fe\u4e2d\u5206\u522b\u70b9\u51fbIO\u53e3\u8fdb\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<p>\u53f3\u952eUART_0\u9009\u62e9Make External\uff08\u8fd9\u4e00\u6b65\u4ec5\u4ec5 \u7528\u5230EMIO \u7684UART\u65f6\u9700\u8981\u7528\u5230\uff0c\u6269\u5c55\u677f\uff09<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"753\" height=\"247\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-6.png\" alt=\"\" class=\"wp-image-824\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-6.png 753w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-6-300x98.png 300w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/figure>\n\n\n\n<p>7\uff09source\u2192Design Source \uff0c\u53f3\u952e\u6211\u4eec\u521b\u5efa\u7684BLOCK\u5de5\u7a0b\uff0c\u70b9\u51fbcreate HDL wrapper\uff0c\u6253\u5305BLOCK\u6587\u4ef6\u5e76\u751f\u6210.v\u4ee3\u7801<\/p>\n\n\n\n<p>8) \u70b9\u51fb\u7eff\u8272\u7bad\u5934RUN \u5bf9\u4ee3\u7801\u8fdb\u884c\u7f16\u8bd1<\/p>\n\n\n\n<p>9) \u70b9\u51fbRTL \u4e2d\u7684SCHEMATIC , \u5e76\u9009\u62e9\u53f3\u8fb9\u51fa\u73b0\u7684 IO Ports \u6765\u589e\u52a0UART 0 EMIO\u90e8\u5206\u7684\u7ba1\u811a\u5b9a\u4e49(\u8fd9\u4e00\u6b65\u4e5f\u53ef\u4ee5\u5728\u7ea6\u675f\u6587\u4ef6\u4e2d\u5b9a\u4e49, \u53ef\u770b\u4e4b\u524d\u7684\u4f8b\u5b50)\uff08\u8fd9\u4e00\u6b65\u4ec5\u4ec5 \u7528\u5230EMIO \u7684UART\u65f6\u9700\u8981\u7528\u5230\uff0c\u6269\u5c55\u677f\uff09<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"482\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-7-1024x482.png\" alt=\"\" class=\"wp-image-825\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-7-1024x482.png 1024w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-7-300x141.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-7-768x361.png 768w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-7.png 1490w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>\u5c06 UART \u90e8\u5206\u7684 TX RX \u5206\u522b\u8bbe\u7f6e\u6210 H17  H16\uff0c\u7535\u538b\u5c5e\u6027\u8bbe\u7f6e\u6210 LVCMOS33\uff08\u8fd9\u4e00\u6b65\u4ec5\u4ec5 \u7528\u5230EMIO \u7684UART\u65f6\u9700\u8981\u7528\u5230\uff0c\u6269\u5c55\u677f\uff09<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"983\" height=\"292\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-9.png\" alt=\"\" class=\"wp-image-828\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-9.png 983w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-9-300x89.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-9-768x228.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>10) \u751f\u6210bit\u6587\u4ef6 :\u6309\u4e0bGenerate Bitstream \u5b8c\u6210\u7efc\u5408\u4ee5\u53ca\u751f\u6210bit\u6587\u4ef6\uff08\u4f1a\u5f39\u51fa\u7a97\u53e3\u8981\u6c42\u4fdd\u5b58 \u7ea6\u675f\u89c4\u5219\u6587\u4ef6\uff09<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"303\" height=\"203\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-18.png\" alt=\"\" class=\"wp-image-204\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-18.png 303w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-18-300x201.png 300w\" sizes=\"auto, (max-width: 303px) 100vw, 303px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5.SDK\u7a0b\u5e8f\u7f16\u5199<\/h2>\n\n\n\n<p>1\uff09File\u2192Export\u2192Export hardware\u2026\uff0c\u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\u52fe\u9009\u201cinclude bitstream\u201d\uff0c\u70b9\u51fb\u201cOK\u201d\u786e\u8ba4\uff0c\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"425\" height=\"466\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-10.png\" alt=\"\" class=\"wp-image-829\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-10.png 425w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-10-274x300.png 274w\" sizes=\"auto, (max-width: 425px) 100vw, 425px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"332\" height=\"252\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-24.png\" alt=\"\" class=\"wp-image-211\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-24.png 332w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-24-300x228.png 300w\" sizes=\"auto, (max-width: 332px) 100vw, 332px\" \/><\/figure>\n\n\n\n<p>2\uff09File\u2192Lauch SDK\uff0c\u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\uff0c\u4fdd\u5b58\u9ed8\u8ba4\uff0c\u70b9\u51fb\u201cOK\u201d\uff0c\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"361\" height=\"285\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-21.png\" alt=\"\" class=\"wp-image-212\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-21.png 361w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-21-300x237.png 300w\" sizes=\"auto, (max-width: 361px) 100vw, 361px\" \/><\/figure>\n\n\n\n<p>\u7cfb\u7edf\u5c06\u81ea\u52a8\u6253\u5f00SDK\u5f00\u53d1\u73af\u5883<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"748\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-22.png\" alt=\"\" class=\"wp-image-213\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-22.png 998w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-22-300x225.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-22-768x576.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>3\uff09\u65b0\u5efa\u4e00\u4e2a\u5de5\u7a0b file\u2192new\u2192Application Project\uff0c\u6765\u65b0\u5efa\u4e00\u4e2a\u201cApplication Project\u201d\uff0c\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"546\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-23.png\" alt=\"\" class=\"wp-image-214\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-23.png 624w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-23-300x263.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>4\uff09\u5728\u65b0\u5efa\u5de5\u7a0b\u540d\u4e2d\u8f93\u5165\u81ea\u5df1\u7684\u5de5\u7a0b\u540d\u79f0(UART)\uff0c\u70b9\u51fbNEXT<\/p>\n\n\n\n<p>5)\u9009\u62e9\u4e00\u4e2a\u7a7a\u5de5\u7a0b,\u70b9\u51fb\u5b8c\u6210<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"421\" height=\"194\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-73.png\" alt=\"\" class=\"wp-image-330\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-73.png 421w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-73-300x138.png 300w\" sizes=\"auto, (max-width: 421px) 100vw, 421px\" \/><\/figure>\n\n\n\n<p>6) \u5728\u7a7a\u5de5\u7a0b\u4e2d\u521b\u5efa\u6211\u4eec\u81ea\u5df1\u7684\u4ee3\u7801<\/p>\n\n\n\n<p>\u5c55\u5f00\u6211\u4eec\u521b\u5efa\u7684\u5de5\u7a0b,\u5728src\u76ee\u5f55\u4e0a\u53f3\u952e\uff0c\u9009\u62e9New-&gt;Source File\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"362\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-76.png\" alt=\"\" class=\"wp-image-333\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-76.png 640w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-76-300x170.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>\u5728\u5f39\u51fa\u7684\u7a97\u53e3\u4e2d\u521b\u5efa\u4e00\u4e2amain.c\u6587\u4ef6<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"528\" height=\"422\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-77.png\" alt=\"\" class=\"wp-image-334\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-77.png 528w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-77-300x240.png 300w\" sizes=\"auto, (max-width: 528px) 100vw, 528px\" \/><\/figure>\n\n\n\n<p>7\uff09\u4e66\u5199\u81ea\u5df1\u7684\u4ee3\u7801<\/p>\n\n\n\n<p>7.1<strong>\u5c0f\u8d34\u58eb\uff1a<\/strong><\/p>\n\n\n\n<p>\u5728\u521d\u6b21\u5199PS\u90e8\u5206\u7684\u4ee3\u7801\u65f6\uff0c\u5982GPIO\u4ee3\u7801 \u548cUART\u4ee3\u7801\uff0c\u4e0d\u77e5\u9053\u600e\u4e48\u5199\u7684\u60c5\u51b5\u4e0b\uff0c\u5176\u5b9e\u53ef\u4ee5\u901a\u8fc7\u6253\u5f00 BSP\u5de5\u7a0b\u4e0b\u7684 system.mss\u6587\u4ef6\uff0c \u7136\u540e\u5728\u53f3\u8fb9\u5bfc\u5165\u9700\u8981\u7684\u53c2\u8003\u4f8b\u7a0b\uff0c \u7136\u540e\u5c06\u4f8b\u7a0b\u4e2d\u81ea\u5df1\u9700\u8981\u7684\u90e8\u5206\uff08\u5982GPIO\u521d\u59cb\u5316\uff0c\u6216\u8005UART\u7684\u5199\u548c\u8bfb\u4ee3\u7801COPY\u5230\u81ea\u5df1\u5de5\u7a0b\u7684main\u51fd\u6570\u4e2d\uff09<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"607\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-11-1024x607.png\" alt=\"\" class=\"wp-image-830\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-11-1024x607.png 1024w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-11-300x178.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-11-768x455.png 768w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-11.png 1116w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>7.2 \u590d\u5236 \u4e0b\u5217\u4ee3\u7801 \u5230 main.c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#include \"xparameters.h\"\n#include \"xuartps.h\"\n#include \"xil_printf.h\"\n\nXUartPs Uart_Ps_0;\t\t\/* The instance of the UART Driver *\/\nXUartPs Uart_Ps_1;\t\t\/* The instance of the UART Driver *\/\n\nint UART_init(){\n\tXUartPs_Config *Config;\n\tint Status;\n\n\tConfig = XUartPs_LookupConfig(XPAR_XUARTPS_0_DEVICE_ID);\n\tStatus = XUartPs_CfgInitialize(&amp;Uart_Ps_0, Config, Config-&gt;BaseAddress);\n\tXUartPs_SetBaudRate(&amp;Uart_Ps_0, 115200);\n\n\tConfig = XUartPs_LookupConfig(XPAR_XUARTPS_1_DEVICE_ID);\n\tStatus = XUartPs_CfgInitialize(&amp;Uart_Ps_1, Config, Config-&gt;BaseAddress);\n\tXUartPs_SetBaudRate(&amp;Uart_Ps_1, 115200);\n\n\treturn Status;\n}\n\nvoid UartPs_HelloWorld()\n{\n\tu8 HelloWorld[] = \"Hello World  \";\n\tint SentCount = 0;\n\n\twhile (SentCount &lt; (sizeof(HelloWorld) - 1)) {\n\t\t XUartPs_Send(&amp;Uart_Ps_0, &amp;HelloWorld[SentCount], 1);\n\t\t XUartPs_Send(&amp;Uart_Ps_1, &amp;HelloWorld[SentCount], 1);\n\t\tSentCount++;\n\t}\n}\n\nint main(void)\n{\n\tint Delay;\n\tUART_init();\n\twhile(1){\n\t\tUartPs_HelloWorld();\n\t\tfor (Delay = 0; Delay &lt; 100000000; Delay++);\n\t}\n}\n<\/pre>\n\n\n\n<p>\u6211\u8fd9\u8fb9\u53c2\u8003\u4e86\u5b98\u65b9\u7684\u4ee3\u7801\uff0c \u5e76\u505a\u4e86\u4e00\u5b9a\u7684\u5220\u51cf\uff08\u5220\u9664\u4e86\u4e0d\u5fc5\u8981\u7684\u521d\u59cb\u5316\u9a8c\u8bc1\u7b49\uff09\uff0c\u5e76\u5c06UART 0,\u548cUART 1\u4e00\u8d77\u8fdb\u884c\u4e86\u521d\u59cb\u5316\uff0c \u5e76\u4e14\u5728helloworld\u7684\u4ee3\u7801\u4e2d\uff0c\u4e24\u4e2a\u7aef\u53e3 \u540c\u65f6\u8fdb\u884chelloworld\u7684\u5b57\u7b26\u4e32\u8f93\u51fa\uff0c\u53cd\u590d\u5faa\u73af\u3002\uff08\u5b9e\u9645\u505a\u5de5\u7a0b\u7684\u65f6\u5019 \uff0c\u9700\u8981\u7528\u5230\u54ea\u8def\uff0c\u5355\u72ec\u521d\u59cb\u5316\u5c31\u597d\uff0c\u4e0d\u7528\u4e24\u8fb9\u90fd\u8c03\u7528\uff09<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>8.\u4ee3\u7801\u4e0b\u8f7d\u9a8c\u8bc1<\/p>\n\n\n\n<p>\u5148\u5bf9  RUN AS \u7684\u73af\u5883\u8fdb\u884c\u914d\u7f6e<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"754\" height=\"679\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-12.png\" alt=\"\" class=\"wp-image-833\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-12.png 754w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-12-300x270.png 300w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/figure>\n\n\n\n<p>\u5728\u5f39\u51fa\u7684\u7a97\u53e3\u4e2d \u5bf94\u4e2a \u65b9\u6846\u90fd\u8fdb\u884c\u52fe\u9009\u64cd\u4f5c\uff0c\u4ee5\u786e\u4fdd\u6bcf\u6b21\u8fd0\u884c\u90fd\u4f1a\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf\uff0c\u5e76\u4e14\u91cd\u65b0\u7f16\u7a0bFPGA\uff0c \u8fd9\u6837\u5c31\u4e0d\u4f1a\u51fa\u73b0\u4e0b\u8f7d\u7a0b\u5e8fdebug\u7684\u65f6\u5019\u6982\u7387\u6027\u4e0d\u5de5\u4f5c\u7684\u95ee\u9898\u4e86\uff08\u4e0d\u52fe\u9009\u60c5\u51b5\u4e0b\uff0c\u677f\u5b50\u672c\u8eab\u8fd0\u884c\u7a0b\u5e8f\u7684\u65f6\u5019\uff0c\u518d\u91cd\u65b0debug\u4f1a\u6982\u7387\u6027\u51fa\u73b0\u4e0b\u8f7d\u62a5\u9519\u7684\u60c5\u51b5\uff09<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"617\" height=\"187\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-13.png\" alt=\"\" class=\"wp-image-834\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-13.png 617w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-13-300x91.png 300w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/figure>\n\n\n\n<p>\u8bbe\u7f6e\u597d\u4e4b\u540e\uff0c\u9009\u62e9<code>Run As<\/code>&nbsp;-&gt;&nbsp;<code>Launch on Hardware (System Debugger)<\/code>&nbsp;\u6216\u8005 Launch on Hardware (GDB).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"178\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-14.png\" alt=\"\" class=\"wp-image-835\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-14.png 780w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-14-300x68.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-14-768x175.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>\u7ecf\u8fc7\u4e0a\u8ff0\u64cd\u4f5c\u540e\uff0c\u4e24\u4e2a\u4e32\u53e3\u5c31\u4f1a\u540c\u65f6\u6b63\u5e38\u8f93\u51fa\u6570\u636e\u4e86\uff0c\u6b64\u65f6\u7528\u4e32\u53e3\u52a9\u624b\u53bb\u67e5\u770b\uff0c\u53ef\u4ee5\u770b\u5230 \u7cfb\u7edf\u518d\u4e0d\u505c\u7684\u53d1\u9001 hello world\u5b57\u7b26\u4e32\uff08\u4e32\u53e3\u6ce2\u7279\u7387 115200\uff09<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"474\" height=\"211\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-15.png\" alt=\"\" class=\"wp-image-836\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-15.png 474w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/image-15-300x134.png 300w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u5f53\u7528\u8df3\u7ebf\u5e3d\u76f4\u63a5\u8fde\u63a5\u7684\u65f6\u5019\u7528\u7684\u662fEMIO \u7684\u4e32\u53e3<\/strong><\/p>\n\n\n\n<p><strong>\u5f53\u7528\u675c\u90a6\u7ebf\u53bb\u8fde\u63a5\u4e3b\u677f\u4e0aUART \u7684\u65f6\u5019\u7528\u7684\u662fMIO\u7684\u4e32\u53e3<\/strong><\/p>\n\n\n\n<p>\u5907\u6ce8 ZYNQ\u82af\u7247\u529f\u80fd\u975e\u5e38\u5f3a\u5927\uff0c\u4e0a\u8ff0\u4ec5\u8fdb\u884c\u7b80\u5355\u7684helloworld\u6f14\u793a\uff0c \u5b9e\u9645\u4e32\u53e3\u529f\u80fd\u8fd8\u53ef\u4ee5\u8c03\u7528\u4e2d\u65ad\uff0c\u8c03\u7528FIFO\u7b49\uff0c\u8fd9\u4e2a\u5404\u81ea\u81ea\u884c\u5b66\u4e60\u5c1d\u8bd5\u4e86\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u672c\u7ae0\u8282\u7684\u5de5\u7a0b\uff1a<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u672c\u6587\u7684\u5b8c\u6574\u5de5\u7a0b\u4e0b\u8f7d:&nbsp;<a href=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/07\/15_EBAZ4205_PS_UART_TEST.zip\">EBAZ4205_PS_UART_TEST<\/a><\/strong><\/li>\n\n\n\n<li><strong>VIVADO\u7684\u7248\u672c\uff1a2018.3<\/strong><\/li>\n\n\n\n<li><strong>\u5de5\u7a0b\u9002\u7528\u4e3b\u677f: EBAZ4205\u4e3b\u677f+\u8f6c\u63a5\u677f<\/strong><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u7528MIO\u548cEMIO\u4e24\u79cd\u65b9\u5f0f\u5728EBAZ4205\u77ff\u673a\u4e0a\u6f14\u793a\u4e32\u53e3\u7684hello world\u4f8b\u7a0b\uff08\u9002\u7528\u4e8e\u4e3b\u677fuart\uff0c\u548c\u8f6c\u63a5\u677fUART\uff09<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-815","post","type-post","status-publish","format-standard","hentry","category-ebaz4205"],"views":1324,"_links":{"self":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts\/815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/comments?post=815"}],"version-history":[{"count":19,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts\/815\/revisions"}],"predecessor-version":[{"id":9923,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts\/815\/revisions\/9923"}],"wp:attachment":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/media?parent=815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/categories?post=815"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/tags?post=815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}