{"id":3919,"date":"2023-04-28T10:07:50","date_gmt":"2023-04-28T02:07:50","guid":{"rendered":"http:\/\/www.hellofpga.com\/?p=3919"},"modified":"2024-10-18T22:58:08","modified_gmt":"2024-10-18T14:58:08","slug":"smart_zynq_axi_gpio-2","status":"publish","type":"post","link":"http:\/\/www.hellofpga.com\/index.php\/2023\/04\/28\/smart_zynq_axi_gpio-2\/","title":{"rendered":"\u57fa\u4e8eSmart ZYNQ (SP\/SP2\/SL \u7248) \u7684PS\u5b9e\u9a8c\u4e8c GPIO\u4e4b\u7528AXI-GPIO\u65b9\u5f0f\u70b9\u4eaeLED \uff08\u5b8c\u6574\u56fe\u6587\uff09"},"content":{"rendered":"\n<p>\u5728\u4e0a\u4e00\u8282\u4e2d\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86\u5982\u4f55\u901a\u8fc7 EMIO \u65b9\u5f0f\u8c03\u7528 GPIO \u6765\u70b9\u4eae LED\u3002\u672c\u8282\u5c06\u8f6c\u5411\u4f7f\u7528 AXI GPIO \u65b9\u5f0f\u6765\u5b9e\u73b0\u76f8\u540c\u7684\u529f\u80fd\u3002<\/p>\n\n\n\n<p>(\u8fd9\u79cd\u65b9\u5f0f\u4f1a\u5360\u7528PL\u7684\u8d44\u6e90\uff0c\u4e00\u822c\u63a8\u8350\u7528EMIO\u7684\u65b9\u5f0f \uff0c\u4f1a\u66f4\u8282\u7701\u8d44\u6e90)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6b64\u7ae0\u8282\u5185\u5bb9\u9002\u7528\u4e8eSmart ZYNQ SP SP2\u548c SL \u7248\u7684\u677f\u5b50 ( \u4e0d\u5305\u542bSmart ZYNQ \u6807\u51c6\u7248 )\uff0c\u5982\u662f\u6807\u51c6\u7248\u6216\u672c\u7ad9\u5176\u4ed6\u677f\u5b50\u8bf7\u770b\u5bf9\u5e94\u677f\u5b50\u76ee\u5f55<\/strong><\/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\"><strong>\u4e00\u3001\u521b\u5efaVivado\u5de5\u7a0b<\/strong><\/h2>\n\n\n\n<p>1) \u5177\u4f53\u6b65\u9aa4 \u65b0\u5efa\u4e00\u4e2aVIVADO \u5de5\u7a0b\uff0c\u6253\u5f00\u8f6f\u4ef6 \u9009\u4e2dCreate Project, \u5982\u4e0b\u56fe\u6240\u793a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"230\" height=\"136\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/07\/Create-Project.png\" alt=\"\" class=\"wp-image-35\"\/><\/figure>\n\n\n\n<p>2\uff09\u70b9\u51fbNEXT \uff0c\u5728\u51fa\u73b0\u7684\u7b2c\u4e8c\u4e2a\u5bf9\u8bdd\u6846\u201cProject name\u201d\u4e2d\u8f93\u5165\u5de5\u7a0b\u540d\uff1b\u5728\u201cProject location\u201d\u4e2d\u9009\u62e9\u4fdd\u5b58\u8def\u5f84\uff1b\u52fe\u9009\u201cCreate project subdirectory\u201d\uff0c\u6700\u540e\u70b9\u51fb\u201cNext\u201d&nbsp;<strong>\u5907\u6ce8\uff0c\u6240\u6709\u7684\u8def\u5f84\u5747\u4e0d\u80fd\u51fa\u73b0\u4e2d\u6587\u540d\u79f0<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"625\" height=\"187\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-33.png\" alt=\"\" class=\"wp-image-3926\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-33.png 625w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-33-300x90.png 300w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/figure>\n\n\n\n<p>3)\u70b9\u51fb RTL PROJECT \u9009\u9879\uff0c\u70b9\u51fbNEXT<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"681\" height=\"466\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/07\/image.png\" alt=\"\" class=\"wp-image-40\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/07\/image.png 681w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/07\/image-300x205.png 300w\" sizes=\"auto, (max-width: 681px) 100vw, 681px\" \/><\/figure>\n\n\n\n<p>4\uff09 \u7b2c\u56db\u6b65Add Sources \u9009\u9879\u76f4\u63a5\u7559\u7a7a\uff0cNEXT<\/p>\n\n\n\n<p>5\uff09\u7b2c\u4e94\u6b65Add Constraints \u9009\u9879\u76f4\u63a5\u7559\u7a7a\uff0cNEXT<\/p>\n\n\n\n<p>6\uff09\u9009\u62e9\u82af\u7247\u578b\u53f7&nbsp;XC7Z020CLG484-1<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"635\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/40fe2010bc01c1ed8650aa64b79d7059_image-3-1024x846-1.png\" alt=\"\" class=\"wp-image-3923\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/40fe2010bc01c1ed8650aa64b79d7059_image-3-1024x846-1.png 768w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/40fe2010bc01c1ed8650aa64b79d7059_image-3-1024x846-1-300x248.png 300w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>7\uff09\u786e\u8ba4\u6240\u9009\u4fe1\u606f \u70b9\u51fb\u201cFinish\u201d\uff0c\u5b8c\u6210vivado\u7684\u5de5\u7a0b\u521b\u5efa<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"859\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-4-1024x859.png\" alt=\"\" class=\"wp-image-3802\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-4-1024x859.png 1024w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-4-300x252.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-4-768x644.png 768w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-4.png 1175w\" 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\"><strong>\u4e8c\u3001\u521b\u5efa\u4e00\u4e2aBLOCK\u8bbe\u8ba1<\/strong><\/h2>\n\n\n\n<p>1\uff09IP INTEGRATOR\u2192Create Block Design\uff0c\u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\u8f93\u5165\u8bbe\u8ba1\u540d\uff0c\u6700\u540e\u70b9\u51fb\u201cOK\u201d\uff0c\u5982\u4e0b\u56fe\u6240\u793a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"599\" height=\"283\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-1.png\" alt=\"\" class=\"wp-image-183\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-1.png 599w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-1-300x142.png 300w\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" \/><\/figure>\n\n\n\n<p>2)\u5728\u53f3\u4fa7\u7684\u7a97\u53e3\u91cc \uff0c\u70b9\u51fb\u52a0\u53f7\uff0c\u5728\u9009\u62e9\u6846\u91cc\u641c\u7d22ZYNQ\uff0c\u5e76\u627e\u5230ZYNQ7 PROCESSING SYSTEM \uff0c\u53cc\u51fb\u5e76\u6253\u5f00<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"477\" height=\"271\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-2.png\" alt=\"\" class=\"wp-image-184\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-2.png 477w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-2-300x170.png 300w\" sizes=\"auto, (max-width: 477px) 100vw, 477px\" \/><\/figure>\n\n\n\n<p>3\uff09\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 loading=\"lazy\" decoding=\"async\" width=\"505\" height=\"266\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-3.png\" alt=\"\" class=\"wp-image-186\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-3.png 505w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-3-300x158.png 300w\" sizes=\"auto, (max-width: 505px) 100vw, 505px\" \/><\/figure>\n\n\n\n<p>4\uff09\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\uff1aMT41K256M16RE-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=\"788\" height=\"453\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/01\/image-58.png\" alt=\"\" class=\"wp-image-2437\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/01\/image-58.png 788w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/01\/image-58-300x172.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/01\/image-58-768x442.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>5) \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<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"667\" height=\"283\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-8.png\" alt=\"\" class=\"wp-image-191\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-8.png 667w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-8-300x127.png 300w\" sizes=\"auto, (max-width: 667px) 100vw, 667px\" \/><\/figure>\n\n\n\n<p>6\uff09\u518d\u7528\u540c\u6837\u7684\u65b9\u6cd5\u589e\u52a0GPIO\u8d44\u6e90 \u70b9\u51fb\u52a0\u53f7\uff0c\u5728\u8bbe\u7f6e\u91cc\u641c\u7d22GPIO\u5e76\u6dfb\u52a0\uff0c\u7136\u540e\u53cc\u51fb\u5e76\u6253\u5f00\u751f\u6210\u7684GPIO\u8d44\u6e90\u8fdb\u884c\u8bbe\u7f6e<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"444\" height=\"261\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-6.png\" alt=\"\" class=\"wp-image-189\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-6.png 444w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-6-300x176.png 300w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/figure>\n\n\n\n<p>7\uff09\u5728GPIO\u7684\u8bbe\u7f6e\u680f\u91cc\u5c06\u8f93\u5165\u8f93\u51fa\u5c5e\u6027\u6539\u6210\u5168\u90e8\u8f93\u51faALL Outputs ,\u56e0\u4e3a\u6211\u4eec\u677f\u5b50\u4e0a\u53ea\u67092\u4e2aLED\u706f\uff0c\u6240\u4ee5\u5c06GPIO Width\u4f4d\u5bbd\u8bbe\u7f6e\u62102\u4f4d\uff0c\u70b9\u51fbOK<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"641\" height=\"359\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-34.png\" alt=\"\" class=\"wp-image-1047\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-34.png 641w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-34-300x168.png 300w\" sizes=\"auto, (max-width: 641px) 100vw, 641px\" \/><\/figure>\n\n\n\n<p>8\uff09\u70b9\u51fb \u4e0a\u65b9\u7684Run Connection Automation \uff0c\u5e76\u5c06GPIO \u548cS_AXI\u524d\u9762\u7684\u52fe\u90fd\u9009\u4e2d\uff0c\u5982\u4e0b\u56fe\u6240\u793a \u70b9\u51fbOK<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"462\" height=\"353\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-9.png\" alt=\"\" class=\"wp-image-192\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-9.png 462w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-9-300x229.png 300w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/figure>\n\n\n\n<p>9\uff09\u8f6f\u4ef6\u5c06\u81ea\u52a8\u5e2e\u6211\u4eec\u5b8c\u6574\u6240\u6709\u5fc5\u8981\u7684\u8fde\u7ebf\uff0c\u4ee5\u53ca\u6dfb\u52a0\u5fc5\u8981\u7684\u6a21\u5757<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"370\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-35-1024x370.png\" alt=\"\" class=\"wp-image-1048\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-35-1024x370.png 1024w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-35-300x108.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-35-768x278.png 768w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-35.png 1120w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>10\uff09\u5728\u6846\u56fe\u4e2d\u53cc\u51fbGPIO\u8f93\u51fa\u7684\u7ba1\u811a\uff0c\u5e76\u91cd\u65b0\u547d\u540d\u4e3aLED\uff0c\u65b9\u4fbf\u540e\u9762\u8f6f\u4ef6\u7f16\u7a0b<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"358\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-36-1024x358.png\" alt=\"\" class=\"wp-image-1049\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-36-1024x358.png 1024w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-36-300x105.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-36-768x268.png 768w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-36-1536x537.png 1536w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-36.png 1600w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>11\uff09source\u2192Design Source \uff0c\u53f3\u952e\u6211\u4eec\u521b\u5efa\u7684BLOCK\u5de5\u7a0b\uff0c\u70b9\u51fbcreate HDL wrapper\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"446\" height=\"271\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-12.png\" alt=\"\" class=\"wp-image-195\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-12.png 446w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-12-300x182.png 300w\" sizes=\"auto, (max-width: 446px) 100vw, 446px\" \/><\/figure>\n\n\n\n<p>\u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u91cc\u4fdd\u6301\u9ed8\u8ba4<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"492\" height=\"281\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-13.png\" alt=\"\" class=\"wp-image-196\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-13.png 492w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-13-300x171.png 300w\" sizes=\"auto, (max-width: 492px) 100vw, 492px\" \/><\/figure>\n\n\n\n<p>\u8f6f\u4ef6\u81ea\u52a8\u4e3a\u6211\u4eec\u751f\u6210HDL\u6587\u4ef6<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"375\" height=\"210\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-14.png\" alt=\"\" class=\"wp-image-197\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-14.png 375w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-14-300x168.png 300w\" sizes=\"auto, (max-width: 375px) 100vw, 375px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001\u521b\u5efa\u7ea6\u675f\u6587\u4ef6\uff0c\u5e76\u4e14\u5b9a\u4e49\u7ba1\u811a<\/strong><\/h2>\n\n\n\n<p>1\uff09Add Source \u2192 Add or create constraints \u70b9Next<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"588\" height=\"300\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-15.png\" alt=\"\" class=\"wp-image-199\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-15.png 588w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-15-300x153.png 300w\" sizes=\"auto, (max-width: 588px) 100vw, 588px\" \/><\/figure>\n\n\n\n<p>\u56e0\u4e3a\u8fd9\u4e2a\u9879\u76ee\u6ca1\u6709\u521b\u5efa\u8fc7\u7ea6\u675f\u6587\u4ef6 \u6240\u4ee5\u8fd9\u91cc\u521b\u5efa\u4e00\u4e2a\u7ea6\u675f\u6587\u4ef6\uff0c\u5e76\u5728File name \u91cc\u8bbe\u7f6e\u7ea6\u675f\u6587\u4ef6\u7684\u540d\u79f0\uff0c\u5e76\u4e14\u70b9\u51fbFINISH \u5b8c\u6210\u7ea6\u675f\u6587\u4ef6\u7684\u521b\u5efa<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"530\" height=\"327\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-16.png\" alt=\"\" class=\"wp-image-200\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-16.png 530w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-16-300x185.png 300w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/figure>\n\n\n\n<p>2\uff09Sources \u2192 Constraints \u91cc\u627e\u5230\u521a\u624d\u521b\u5efa\u7684\u7ea6\u675f\u6587\u4ef6 \u53cc\u51fb\u5e76\u6253\u5f00\u8be5XDC\u7ea6\u675f\u6587\u4ef6<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"389\" height=\"333\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-17.png\" alt=\"\" class=\"wp-image-202\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-17.png 389w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-17-300x257.png 300w\" sizes=\"auto, (max-width: 389px) 100vw, 389px\" \/><\/figure>\n\n\n\n<p>\u5728\u7ea6\u675f\u6587\u4ef6\u91cc\u9762\u590d\u5236\u4e0b\u9762\u4ee3\u7801\u6765\u5bf9\u8f93\u51fa\u7684GPIO\u8fdb\u884c\u7ba1\u811a\uff08\u6240\u6709\u7684\u7ba1\u811a\u8f6c\u63a5\u677f\u4e0a\u4e1d\u5370\u90fd\u6709\u5b9e\u9645\u6807\u6ce8\u5bf9\u5e94\u7684IO\uff09<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">set_property IOSTANDARD LVCMOS33 [get_ports LED_tri_o[0]]\nset_property IOSTANDARD LVCMOS33 [get_ports LED_tri_o[1]]\n\nset_property PACKAGE_PIN P20 [get_ports LED_tri_o[0]]\nset_property PACKAGE_PIN P21 [get_ports LED_tri_o[1]]<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u56db\u3001\u751f\u6210bit\u6587\u4ef6<\/strong><\/h2>\n\n\n\n<p>1)\u6309\u4e0b\u7eff\u8272\u7bad\u5934\u5bf9\u5de5\u7a0b\u8fdb\u884c\u7f16\u8bd1<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"115\" height=\"56\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-19.png\" alt=\"\" class=\"wp-image-206\"\/><\/figure>\n\n\n\n<p>2)\u6309\u4e0bGenerate Bitstream \u5b8c\u6210\u7efc\u5408\u4ee5\u53ca\u751f\u6210bit\u6587\u4ef6<\/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<h2 class=\"wp-block-heading\"><strong>\u4e94\u3001SDK\u7a0b\u5e8f\u7f16\u5199<\/strong><\/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\"><img loading=\"lazy\" decoding=\"async\" width=\"462\" height=\"541\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-20.png\" alt=\"\" class=\"wp-image-207\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-20.png 462w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-20-256x300.png 256w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/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\uff0c\u70b9\u51fbNEXT<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"510\" height=\"713\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-37.png\" alt=\"\" class=\"wp-image-1050\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-37.png 510w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-37-215x300.png 215w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/figure>\n\n\n\n<p>5\uff09\u9009\u62e9\u7a7a\u5de5\u7a0b\uff0c\u70b9\u51fb\u5b8c\u6210FINISH<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"485\" height=\"262\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-26.png\" alt=\"\" class=\"wp-image-216\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-26.png 485w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-26-300x162.png 300w\" sizes=\"auto, (max-width: 485px) 100vw, 485px\" \/><\/figure>\n\n\n\n<p>6\uff09\u9009\u62e9\u521b\u5efa\u7684LED_CODE_bsp \u2192 system.mss \u2192 axi_gpio_0 gpio \u2192 import Examples\uff08<strong>\u4e0a\u4e00\u8282\u4e2d\u6211\u4eec\u7528\u7684\u662f\u81ea\u5df1\u624b\u52a8\u7f16\u5199\u7684\u4ee3\u7801\uff0c\u8fd9\u4e00\u8282\u4e2d\u6211\u4eec\u5c31\u5c1d\u8bd5\u76f4\u63a5\u8c03\u7528SDK\u81ea\u5e26\u7684AXI-GPIO DEMO\uff09<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"807\" height=\"447\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-38.png\" alt=\"\" class=\"wp-image-232\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-38.png 807w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-38-300x166.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-38-768x425.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>7\uff09\u9009\u62e9 xgpio_example<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"369\" height=\"234\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-39.png\" alt=\"\" class=\"wp-image-234\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-39.png 369w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-39-300x190.png 300w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><\/figure>\n\n\n\n<p>8\uff09\u8fd9\u6837\u7cfb\u7edf\u5c31\u81ea\u52a8\u521b\u5efa\u4e86\u4e00\u4e2a\u53c2\u8003\u4f8b\u7a0b<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"879\" height=\"623\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-41.png\" alt=\"\" class=\"wp-image-236\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-41.png 879w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-41-300x213.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-41-768x544.png 768w\" 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\"><strong>\u516d\u3001\u4e0b\u8f7d\u5230\u677f\u5b50\u4e0a\u8fdb\u884c\u9a8c\u8bc1<\/strong><\/h2>\n\n\n\n<p>\u9009\u4e2d\u5de5\u7a0b\u4e2d\u7684\u786c\u4ef6\u5e73\u53f0\uff0c\u5e76\u70b9\u51fb\u53f3\u952e\u2192Program FPGA\uff0c\u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\u9009\u62e9\u9ed8\u8ba4\uff0c\u70b9\u51fb\u201cprogram\u201d\uff0c\u5b8c\u6210FPGA PL\u90e8\u5206\u7684Program\u5de5\u4f5c<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"519\" height=\"598\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-42.png\" alt=\"\" class=\"wp-image-237\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-42.png 519w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-42-260x300.png 260w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><\/figure>\n\n\n\n<p>2\uff09\u9009\u4e2d\u6211\u4eec\u751f\u6210\u7684GPIO\u5de5\u7a0b \u5c55\u5f00\u7eff\u8272\u7bad\u5934\uff08RUN\uff09\u53f3\u8fb9\u7684\u56fe\u6807\uff0c\u9009\u62e9Run As\u21921 Launch on Hardware\uff08System Debugger\uff09<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"363\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-43.png\" alt=\"\" class=\"wp-image-238\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-43.png 683w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2021\/08\/image-43-300x159.png 300w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\u677f\u5b50\u4e0a\u7684LED1\u706f\u5728\u95ea\u70c1<\/p>\n\n\n\n<p>\u5907\u6ce8 \uff1a\u5982\u679c RUN \u7684\u65f6\u5019\u5f39\u51fa\u9519\u8bef \u53ef\u4ee5\u6309\u7167\u4e0b\u9762\u7684\u64cd\u4f5c \u8fdb\u884c\u8bbe\u7f6e \u518d\u8fdb\u884cDEBUG<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"966\" height=\"702\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-38.png\" alt=\"\" class=\"wp-image-1051\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-38.png 966w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-38-300x218.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-38-768x558.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"604\" height=\"432\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-39.png\" alt=\"\" class=\"wp-image-1052\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-39.png 604w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2022\/10\/image-39-300x215.png 300w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/figure>\n\n\n\n<p>\u4e4b\u540e\u70b9 APPLY \u7136\u540e \u518d\u9009\u62e9Run As\u21921 Launch on Hardware\uff08System Debugger\uff09\u770b\u662f\u5426\u4e0b\u8f7d\u6210\u529f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e03\u3001\u4ee3\u7801\u89e3\u8bfb<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>XGpio_SetDataDirection \u8bbe\u7f6eGPIO\u4e3a\u8f93\u5165\/\u8f93\u51fa\nXGpio_DiscreteWrite    \u7f6e\u4f4dGPIO\nXGpio_DiscreteClear    \u62c9\u4f4eGPIO\n\n#define LED 0x01\n\u7ee7\u7eed\u770b\u4ee3\u7801\uff0cLED\u5728\u4ee3\u7801\u4e2d\u7684\u5b9a\u4e49\u4e3a 0X01  \u5373\u4ee3\u8868 LED \u5728LED_CHANNEL\u4e2d\u4ee3\u8868\u6700\u4f4e\u4f4d BIT0\n\n\u770b\u61c2\u4e86\u4e0a\u9762\u8fd9\u4e9b \u5c31\u5f88\u5bb9\u6613\u770b\u61c2\u7a0b\u5e8f\u91cc\u7684\u4ee3\u7801  \nXGpio_DiscreteClear(&amp;Gpio, LED_CHANNEL, LED); \u4ee3\u8868\u62c9\u4f4eGPIO LED_CHANNEL\u4e2d\u7684 \u7b2c0\u4f4d\nXGpio_DiscreteWrite(&amp;Gpio, LED_CHANNEL, LED); \u4ee3\u8868\u62c9\u9ad8GPIO LED_CHANNEL\u4e2d\u7684 \u7b2c0\u4f4d\nXGpio_SetDataDirection(&amp;Gpio, LED_CHANNEL, ~LED); \u8bbe\u7f6e\u4e3a\u8f93\u51fa\u6a21\u5f0f\n\nfor (Delay = 0; Delay &lt; LED_DELAY; Delay++); \u8fd9\u662f\u4e00\u4e2a\u8017\u8d39\u7cfb\u7edf\u8d44\u6e90\u7684delay\u51fd\u6570\u7684\u7b80\u5199\n\n\u6240\u4ee5\u6574\u4e2a\u7a0b\u5e8f\u7684\u6548\u679c\u5c31\u662fLED 1 \u4e0d\u505c\u7684\u70b9\u4eae\u7184\u706d\uff0c\u53cd\u590d\u5faa\u73af\u3002 <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u516b\u3001\u4ee3\u7801\u6539\u7f16<\/strong><\/h2>\n\n\n\n<p>\u4e0a\u9762\u7684DEMO\u662f\u53ea\u70b9\u4eae\u4e00\u4e2a\u706f\uff0c\u6211\u4eec\u7684vivado \u91cc\u6dfb\u52a0\u7684AXIGPIO\u662f\u6dfb\u52a0\u4e86\u4e24\u4e2a\u8f93\u51fa\u53e3\uff0c\u5982\u679c\u6211\u4eec\u8981\u540c\u65f6\u63a7\u5236\u4e24\u4e2aLED\u706f\uff0c\u8fd9\u91cc\u6211\u4eec\u53ea\u9700\u8981\u5bf9\u4ee3\u7801\u8fdb\u884c\u6539\u7f16\u5373\u53ef\u3002<\/p>\n\n\n\n<p>1\uff09 \u6211\u4eec\u5bf9LED\u5b9a\u4e49\u7684\u90e8\u5206\u66f4\u6539:<\/p>\n\n\n\n<p>#define LED1 0x01 \u5373\u53ef  0X01\u4ee3\u8868 0000_0001<br>#define LED2 0x02 \u5373\u53ef  0X02\u4ee3\u8868 0000_0010<\/p>\n\n\n\n<p>\u521d\u59cb\u5316\u7684\u65f6\u5019<br>XGpio_SetDataDirection(&amp;Gpio, LED_CHANNEL, ~(LED1|LED2));<\/p>\n\n\n\n<p>\u8d4b\u503c\u7684\u65f6\u5019LED1\u548cLED2\u5355\u72ec\u7528 XGpio_DiscreteClear(\u8d4b\u503c0)\uff0cXGpio_DiscreteWrite\uff08\u8d4b\u503c1\uff09<br><br>2) \u6211\u4eec\u5bf9DEMO\u4ee3\u7801\u8fdb\u884c\u6539\u7f16\uff0c\u8c03\u6574\u540e\u7684main \u51fd\u6570\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#define LED1 0x01<br>#define LED2 0x02<br><br>int main(void)<br>{<br>\tint Status;<br>\tvolatile int Delay;<br><br>\t\/* Initialize the GPIO driver *\/<br>\tStatus = XGpio_Initialize(&amp;Gpio, GPIO_EXAMPLE_DEVICE_ID);<br>\tif (Status != XST_SUCCESS) {<br>\t\txil_printf(\"Gpio Initialization Failed\\r\\n\");<br>\t\treturn XST_FAILURE;<br>\t}<br><br>\t\/* Set the direction for all signals as inputs except the LED output *\/<br>\tXGpio_SetDataDirection(&amp;Gpio, LED_CHANNEL, ~(LED1|LED2));<br><br>\t\/* Loop forever blinking the LED *\/<br><br>\twhile (1) {<br>\t\t\/* Set the LED to High *\/<br>\t\tXGpio_DiscreteWrite(&amp;Gpio, LED_CHANNEL, LED1);<br>\t\tXGpio_DiscreteClear(&amp;Gpio, LED_CHANNEL, LED2);<br><br>\t\t\/* Wait a small amount of time so the LED is visible *\/<br>\t\tfor (Delay = 0; Delay &lt; LED_DELAY; Delay++);<br><br>\t\t\/* Clear the LED bit *\/<br>\t\tXGpio_DiscreteClear(&amp;Gpio, LED_CHANNEL, LED1);<br>\t\tXGpio_DiscreteWrite(&amp;Gpio, LED_CHANNEL, LED2);<br><br>\t\t\/* Wait a small amount of time so the LED is visible *\/<br>\t\tfor (Delay = 0; Delay &lt; LED_DELAY; Delay++);<br>\t}<br><br>\txil_printf(\"Successfully ran Gpio Example\\r\\n\");<br>\treturn XST_SUCCESS;<br>}<\/pre>\n\n\n\n<p>\u6309\u7b2c\u516d\u90e8\u5206\u7684\u65b9\u5f0f\u91cd\u65b0\u4e0b\u8f7d\u5230\u677f\u5b50\u4e0a\u8fdb\u884c\u6d4b\u8bd5\uff0c\u53ef\u4ee5\u770b\u5230LED1\u548cLED2\u5728\u4ea4\u66ff\u7684\u53cd\u590d\u95ea\u70c1\uff0c\u4ee3\u7801\u529f\u80fd\u9a8c\u8bc1\u6210\u529f\u3002<\/p>\n\n\n\n<p>\u770b\u61c2\u8fd9\u4e9b \u5c31\u53ef\u4ee5\u50cf\u5b9e\u9a8c\u4e00\u90a3\u6837\uff0c\u81ea\u5df1\u521b\u5efa\u4e00\u4e2amain\u51fd\u6570 \u7136\u540e\u5728\u91cc\u9762\u53c2\u8003\u8fd9\u4e2a\u5b98\u65b9\u7684\u4f8b\u5b50\u5199\u9a71\u52a8LED\u7684\u4ee3\u7801\u4e86\u3002\u5176\u5b9e\u5305\u62ecUART,USB\u4e4b\u7c7b\u7684 \u90fd\u662f\u53ef\u4ee5\u7528\u8fd9\u4e2a\u65b9\u5f0f\u6765\u8fdb\u884c\u5f00\u53d1\uff0c\u5b98\u65b9\u90fd\u6709\u5df2\u7ecf\u8c03\u8bd5\u597d\u7684DEMO\u53ef\u4f9b\u6d4b\u8bd5\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0a\u662f\u5b8c\u6574\u7684AXI-GPIO\u8c03\u7528\u8c03\u8bd5\u8fc7\u7a0b\uff0c\u4e0d\u8fc7\u5728PS\u63a7\u5236PL\u7ba1\u811a\u7684\u65b9\u5f0f\u4e2d\uff0c\u66f4\u63a8\u8350\u5b9e\u9a8c\u4e00\u4e2d\u7684EMIO\u65b9\u5f0f\uff0c\u66f4\u52a0\u7b80\u6d01\u4e5f\u66f4\u7701FPGA\u903b\u8f91\u8d44\u6e90\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u672c\u6587\u7684\u5b8c\u6574\u5de5\u7a0b\u4e0b\u8f7d\uff1a<a href=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/02_PS_LED_TEST_AXI_GPIO.zip\">02_PS_LED_TEST_AXI_GPIO<\/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: Smart ZYNQ (SP \/ SP2 \/ SL) \uff08\u4e0d\u9002\u7528\u4e8eSmart ZYNQ \u6807\u51c6\u7248\u00a0<\/strong>\uff09<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u70b9\u4eae\u7684LED\u706f\u90fd\u662f\u901a\u8fc7PL\u8d44\u6e90\u6765\u70b9\u4eae\uff0c\u4e5f\u5c31\u662f\u901a\u8fc7FPGA\u7684\u903b\u8f91\u53bb\u70b9\u4eaeLED\u706f\uff0c\u8fd9\u4e00\u4e2a\u5de5\u7a0b\u5c06\u5c1d\u8bd5\u7b2c\u4e00\u6b21\u8c03\u7528ZYNQ\u7684PS\u8d44\u6e90\uff0c\u53bb\u5b9e\u73b0\u4e00\u4e2a\u70b9LED\u706f\u7684\u64cd\u4f5c\uff0c\u7531\u4e8e\u677f\u5b50\u4e0a\u7684LED\u8d44\u6e90\u662f\u8fde\u63a5\u5230PL\u7aef\u7684\uff0c\u6240\u4ee5\u8fd9\u91cc\u505a\u4e86\u4e2a\u8054\u52a8\uff0c\u7528PS\u7684\u8d44\u6e90\u53bb\u70b9\u4eaePL\u7aef\u7684LED\u706f<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-3919","post","type-post","status-publish","format-standard","hentry","category-smart-zynq-spsl"],"views":1422,"_links":{"self":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts\/3919","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=3919"}],"version-history":[{"count":16,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts\/3919\/revisions"}],"predecessor-version":[{"id":8162,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts\/3919\/revisions\/8162"}],"wp:attachment":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/media?parent=3919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/categories?post=3919"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/tags?post=3919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}