{"id":499040,"date":"2026-10-17T12:06:10","date_gmt":"2026-10-17T09:06:10","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=499040"},"modified":"2026-10-17T12:06:10","modified_gmt":"2026-10-17T09:06:10","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=499040","title":{"rendered":"\u041d\u0430\u0444\u0438\u0433 NVIDIA! \u0427\u0430\u0441\u0442\u044c 2. \u0427\u0430\u0441\u0442\u044c 2. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b 8 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439 \u043d\u0430 FPGA \u0437\u0430 $50 \u2014 \u0438 \u0443\u043f\u0451\u0440\u0441\u044f \u0432 DDR3"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/1092504\/\" rel=\"noopener nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b Qwen \u043d\u0430 \u0441\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 FPGA-\u043f\u043b\u0430\u0442\u0435 \u0437\u0430 $50 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c TPU (<a href=\"https:\/\/github.com\/FeSens\/openTPU\" rel=\"noopener nofollow\">openTPU<\/a>). \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0442\u043e\u0440\u044b \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438: \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0430\u043d\u043e\u043d\u0441, \u0447\u0435\u043c \u0441\u0442\u0430\u0442\u044c\u044f. \u0413\u0434\u0435 \u0441\u0431\u043e\u0440\u043a\u0430, \u0433\u0434\u0435 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b, \u0433\u0434\u0435 \u0437\u0430\u043c\u0435\u0440\u044b, \u043f\u043e\u0447\u0435\u043c\u0443 133 \u041c\u0413\u0446, \u0433\u0434\u0435 \u041a\u0415\u0414\u0420? <\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/20\/b8\/83\/20b8830551771e2dc842cc4cdb45b116.png\" alt=\"\u042f, \u043a\u043e\u0433\u0434\u0430 512 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0436\u0434\u0443\u0442, \u043f\u043e\u043a\u0430 DDR3 \u043f\u043e\u0434\u0432\u0435\u0437\u0451\u0442 \u0432\u0435\u0441\u0430.\" title=\"\u042f, \u043a\u043e\u0433\u0434\u0430 512 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0436\u0434\u0443\u0442, \u043f\u043e\u043a\u0430 DDR3 \u043f\u043e\u0434\u0432\u0435\u0437\u0451\u0442 \u0432\u0435\u0441\u0430.\" width=\"878\" height=\"586\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/20\/b8\/83\/20b8830551771e2dc842cc4cdb45b116.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/20\/b8\/83\/20b8830551771e2dc842cc4cdb45b116.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u042f, \u043a\u043e\u0433\u0434\u0430 512 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0436\u0434\u0443\u0442, \u043f\u043e\u043a\u0430 DDR3 \u043f\u043e\u0434\u0432\u0435\u0437\u0451\u0442 \u0432\u0435\u0441\u0430.<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u044b \u0441 \u0412\u0430\u043c\u0438 \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0432 Vivado, \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u043c \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044f\u043c, \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u043c 9,7 \u0432\u0430\u0442\u0442\u0430 \u043f\u043e \u0431\u043b\u043e\u043a\u0430\u043c \u0438 \u043f\u0440\u043e\u0433\u043e\u043d\u0438\u043c <strong>165 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 \u0432\u043e\u0441\u044c\u043c\u0438 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/strong>. \u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0435 \u0442\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f \u0436\u0434\u0430\u043b: \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0438\u0437 512 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0432\u044b\u0434\u0430\u0451\u0442 <strong>121 GOPS<\/strong> \u0438\u0437 136,5 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445, \u0430 \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0435\u0439 \u0434\u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0438 &#8212; \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0430\u043c\u044f\u0442\u044c DDR3 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 <strong>94 % \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430<\/strong> \u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u043e\u0434\u0432\u0435\u0437\u0442\u0438 \u0432\u0435\u0441\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442.<\/p>\n<h3>\u041a\u043e\u0440\u043e\u0442\u043a\u043e<\/h3>\n<ul>\n<li>\n<p><strong>\u0416\u0435\u043b\u0435\u0437\u043e:<\/strong> Inspur YPCB-00338, Kintex-7 XC7K480T-2, 2 \u00d7 2 \u0413\u0438\u0411 DDR3-1066, PCIe Gen2 x8.<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u0432 Vivado:<\/strong> \u044f\u0434\u0440\u043e 133,33 \u041c\u0413\u0446, \u0437\u0430\u043f\u0430\u0441 \u043f\u043e \u0442\u0430\u0439\u043c\u0438\u043d\u0433\u0443 19 \u043f\u0438\u043a\u043e\u0441\u0435\u043a\u0443\u043d\u0434 (\u044f \u0430\u0434\u0435\u043f\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e <s>\u0428<\/s><span class=\"habrahidden\">\u0421<\/span>\u041b\u0410\u041a\u0410, \u043c\u0430\u043b\u043e \u043b\u0438 \u043a\u0442\u043e \u0441 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442). \u0417\u0430\u043d\u044f\u0442\u043e 59 % LUT, 63 % BRAM, 37 % DSP, 76 % \u0441\u043b\u0430\u0439\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435:<\/strong> 138 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432, \u0442\u0440\u0438 \u043f\u0440\u043e\u0433\u043e\u043d\u0430 \u043f\u043e\u0434\u0440\u044f\u0434. 165 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 LLM, \u0432\u0441\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0438\u0441\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c:<\/strong> Qwen3.5-2B &#8212; 12,5 \u0442\u043e\u043a\/\u0441, Qwen3-0.6B &#8212; 35, LFM2.5-230M &#8212; 95 (\u0432\u0435\u0441\u0430 4 \u0431\u0438\u0442\u0430).<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u0437\u043a\u043e\u0435 \u043c\u0435\u0441\u0442\u043e:<\/strong> \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, DDR3 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u043d\u0430 92\u201396 %. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 PCIe x1 \u0432\u043c\u0435\u0441\u0442\u043e x8 \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442 (\u043a\u0440\u043e\u043c\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0438\u0437 \u043a\u043e\u043c\u043f\u0430), \u0430 4-\u0431\u0438\u0442\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u0432\u043c\u0435\u0441\u0442\u043e 8-\u0431\u0438\u0442\u043d\u044b\u0445 \u0443\u0441\u043a\u043e\u0440\u044f\u044e\u0442 \u0432 1,4-1,8 \u0440\u0430\u0437\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e \u0438\u0442\u043e\u0433\u0430\u043c \u043e\u043f\u0440\u043e\u0441\u0430 \u0412\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0445\u043e\u0442\u0435\u043b\u0438 \u0441\u0431\u043e\u0440\u043a\u0443 \u0441 \u043d\u0443\u043b\u044f (59 %) \u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e TPU (51 %), \u0434\u0430\u043b\u044c\u0448\u0435 &#8212; \u0433\u0440\u0430\u0431\u043b\u0438 (37 %), \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c (35 %) \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (29 %). \u0412\u0441\u0451 \u044d\u0442\u043e \u0435\u0441\u0442\u044c, \u0432 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u0448\u043b\u043e \u043e\u0442 \u0436\u0435\u043b\u0435\u0437\u0430 \u043a \u0446\u0438\u0444\u0440\u0430\u043c. <\/p>\n<p><strong>\u041f\u0441\u0441\u0441\u2026\u26a1 \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439, \u043a\u0430\u043a Flash, \u041a\u0443\u0434\u0430 \u043f\u0440\u044b\u0433\u0430\u0442\u044c:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442: <a href=\"#2\" rel=\"noopener nofollow\">2<\/a> (hw) \u0438 <a href=\"#3\" rel=\"noopener nofollow\">3<\/a> (sw)<\/p>\n<\/li>\n<li>\n<p>\u042f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0437\u0430\u043b\u0438\u043f\u0430\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u044c \u0438 \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u2192 <a href=\"#4\" rel=\"noopener nofollow\">4<\/a> \u0438 <a href=\"#5\" rel=\"noopener nofollow\">5<\/a><\/p>\n<\/li>\n<li>\n<p>\u0426\u0438\u0444\u0440\u042b \u2192 <a href=\"#6\" rel=\"noopener nofollow\">6<\/a><\/p>\n<\/li>\n<li>\n<p>\u0445\u043e\u0447\u0443 \u0432\u044b\u0432\u043e\u0434, \u0447\u0451 \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u2192 <a href=\"#7\" rel=\"noopener nofollow\">7<\/a><\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043c\u0435\u0447\u0442\u0430\u0435\u043c \u043e \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u2192 <a href=\"#8\" rel=\"noopener nofollow\">8<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0443 \u0430 \u043a\u0442\u043e \u0437\u0430\u0441\u0435\u043b \u043d\u0430\u0434\u043e\u043b\u0433\u043e \u0438 \u0445\u043e\u0447\u0435\u0442 \u043d\u044b\u0440\u043d\u0443\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0433\u043d\u0430\u043b\u0438)  \u2193 <\/p>\n<hr\/>\n<h3>1. \u0416\u0435\u043b\u0435\u0437\u043e \u0438 \u043f\u043e\u0447\u0451\u043c \u043d\u044b\u043d\u0447\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 \u041a\u0415\u0414\u0420\u043e\u043c? <\/h3>\n<h4>\u041f\u043b\u0430\u0442\u0430<\/h4>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/44\/3d\/7d\/443d7dba821ac13887bd50ae209f546d.png\" alt=\" \u041f\u043b\u0430\u0442\u0430 \u0441 \u0434\u0432\u0443\u0445 \u0441\u0442\u043e\u0440\u043e\u043d. \u0424\u043e\u0442\u043e  https:\/\/www.tiferking.cn\/index.php\/2024\/12\/19\/650\" title=\" \u041f\u043b\u0430\u0442\u0430 \u0441 \u0434\u0432\u0443\u0445 \u0441\u0442\u043e\u0440\u043e\u043d. \u0424\u043e\u0442\u043e  https:\/\/www.tiferking.cn\/index.php\/2024\/12\/19\/650\" width=\"1024\" height=\"987\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/44\/3d\/7d\/443d7dba821ac13887bd50ae209f546d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/44\/3d\/7d\/443d7dba821ac13887bd50ae209f546d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u041f\u043b\u0430\u0442\u0430 \u0441 \u0434\u0432\u0443\u0445 \u0441\u0442\u043e\u0440\u043e\u043d. \u0424\u043e\u0442\u043e  <a href=\"https:\/\/www.tiferking.cn\/index.php\/2024\/12\/19\/650\/\" rel=\"noopener nofollow\">https:\/\/www.tiferking.cn\/index.php\/2024\/12\/19\/650<\/a><\/figcaption><\/div>\n<\/figure>\n<p>Inspur YPCB-00338 &#8212; \u044d\u0442\u043e \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0441\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0430, \u0441\u043b\u0438\u0432\u0430\u044e\u0442 \u0435\u0435 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u043b\u044e\u0431\u0438\u043c\u043e\u043c  AliExpress \u0438 eBay. \u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0432 \u043d\u0435\u0439 \u0442\u0440\u0438 \u0432\u0430\u0436\u043d\u044b\u0435 \u0432\u0435\u0449\u0438:<\/p>\n<ul>\n<li>\n<p><strong>Kintex-7 XC7K480T-2 (\u0430\u043b\u043c\u0430\u0437\u0438\u043a)<\/strong> &#8212; 299 \u0442\u044b\u0441. LUT, 1920 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 DSP48E1, 955 \u0431\u043b\u043e\u043a\u043e\u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e 36 \u041a\u0431\u0438\u0442 (~ 34 \u041c\u0431\u0438\u0442 \u043d\u0430 \u0432\u0441\u0451\u043c \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0435).<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u0432\u0430 \u043a\u0430\u043d\u0430\u043b\u0430 DDR3-1066 (\u0442\u0435\u043f\u0435\u0440\u044c \u0438 \u0442\u044b \u0430\u043b\u043c\u0430\u0437\u0438\u043a) \u043f\u043e 2 GB<\/strong>, \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 64 \u0431\u0438\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043b\u044e\u0441 8 \u0431\u0438\u0442 ECC. ECC \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u043e\u0442 \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u043e \u043a \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442: \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0431\u0438\u0442 64.<\/p>\n<\/li>\n<li>\n<p><strong>PCIe x8<\/strong>, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043b\u0430\u0442\u0430 \u0440\u0430\u0437\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0435\u0442 \u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>34 \u041c\u0431\u0438\u0442 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0435 &#8212; \u044d\u0442\u043e \u043d\u0438 \u043e \u0447\u0451\u043c \u0434\u043b\u044f LLM: \u0434\u0430\u0436\u0435 Qwen3-0.6B \u0432 4 \u0431\u0438\u0442\u0430\u0445 \u0432\u0435\u0441\u0438\u0442 \u0432 \u0441\u043e\u0442\u043d\u044e \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435. \u0417\u043d\u0430\u0447\u0438\u0442, \u0432\u0435\u0441\u0430 \u0436\u0438\u0432\u0443\u0442 \u0432 DDR3, \u0438, \u0437\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0451\u0434, \u0438\u043c\u0435\u043d\u043d\u043e DDR3 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0412\u044b \u044d\u0442\u043e \u0438 \u0442\u0430\u043a \u0437\u043d\u0430\u0435\u0442\u0435, \u043d\u0435 \u0431\u0443\u0434\u0443 \u0443\u043c\u043d\u0438\u0447\u0430\u0442\u044c.<\/p>\n<h4>\u0421\u0442\u0435\u043d\u0434\u044b<\/h4>\n<p>\u041f\u043b\u0430\u0442\u0430 \u043f\u043e\u0431\u044b\u0432\u0430\u043b\u0430 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445 &#8212; \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 PCIe.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"80\" width=\"80\">\n<p align=\"left\">\u0421\u0442\u0435\u043d\u0434<\/p>\n<\/th>\n<th data-colwidth=\"434\" width=\"434\">\n<p align=\"left\">\u0427\u0442\u043e \u044d\u0442\u043e<\/p>\n<\/th>\n<th>\n<p align=\"left\">PCIe<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"left\">\u041f\u041a <\/p>\n<\/td>\n<td data-colwidth=\"434\" width=\"434\">\n<p align=\"left\">Windows, Intel Core i9-14900KF, 64GB DDR, 4T SSD, Vivado 2024.2.2<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"left\">A<\/p>\n<\/td>\n<td data-colwidth=\"434\" width=\"434\">\n<p align=\"left\">\u0411\u0443\u043a\u0430 \u0434\u043b\u044f \u043d\u043e\u0442 (Notebook), Ubuntu 24.04, \u043f\u043b\u0430\u0442\u0430 \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u0447\u0435\u0440\u0435\u0437 USB4 \u0441 \u0442\u0443\u043d\u043d\u0435\u043b\u0435\u043c PCIe (<a href=\"https:\/\/aliexpress.ru\/item\/1005005245580978.html?shpMethod=CAINIAO_STANDARD&amp;sku_id=12000032345843352&amp;spm=a2g2w.productlist.search_results.0.33e13debZRvSCb\" rel=\"noopener nofollow\">TH3P4G3<\/a>), 16GB DDR, 2T SSD, i7-1185G7, \u0431\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f (<a href=\"https:\/\/aliexpress.ru\/item\/1005009635573418.html?sku_id=12000049712089186&amp;spm=a2g2w.productlist.search_results.1.66c9651eCT9o0a\" rel=\"noopener nofollow\">METALFISH Black Diamond 550M<\/a>), \u043a\u0430\u0431\u0435\u043b\u044c USB4 Type-C (\u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435 \u0441 <a href=\"https:\/\/aliexpress.ru\/item\/1005005245580978.html?shpMethod=CAINIAO_STANDARD&amp;sku_id=12000032345843352&amp;spm=a2g2w.productlist.search_results.0.33e13debZRvSCb\" rel=\"noopener nofollow\">TH3P4G3<\/a>)<\/p>\n<\/td>\n<td>\n<p align=\"left\">Gen2<strong>x1(<\/strong>Gen2<strong>x4)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"80\" width=\"80\">\n<p align=\"left\"><strong>B<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"434\" width=\"434\">\n<p align=\"left\">MINISFORUM MS-A2, Ubuntu 22.04, \u043f\u043b\u0430\u0442\u0430 \u0432 \u0441\u043b\u043e\u0442\u0435, AMD Ryzen 9 9955HX, 64GB DDR, 2T SSD<\/p>\n<\/td>\n<td>\n<p align=\"left\">Gen2<strong>x8<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412\u0441\u0435 \u0437\u0430\u043c\u0435\u0440\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 &#8212; \u0441\u043e \u0441\u0442\u0435\u043d\u0434\u0430 B, \u0433\u0434\u0435 \u043f\u043b\u0430\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 PCIe.<\/p>\n<h4>\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u043e\u0438\u0442<\/h4>\n<p>$50 \u0438\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 &#8212; \u0446\u0435\u043d\u0430 \u0441\u0430\u043c\u043e\u0439 \u043f\u043b\u0430\u0442\u044b ( \u0441\u0430\u043c \u0447\u0438\u043f, \u043a\u0430\u043a \u043f\u043e\u0434\u043c\u0435\u0442\u0438\u043b\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0440\u043e\u0433\u043e). \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0446\u0435\u043d\u044b \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0430\u043c \u0443\u0440\u0432\u0430\u043b. <br \/>\u041d\u0430 Aliexpress \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043a\u0430\u0442\u044c XC7K480T \u0438 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u043e \u0444\u043e\u0442\u043e \u0438 \u0434\u0440\u0443\u0433\u0438\u043c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u0438 \u0431\u043e\u043b\u0442 \u043f\u0440\u0438\u0441\u043b\u0430\u0442\u044c, \u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u043e\u0435 \u043a\u0430\u043a-\u0442\u043e \u0431\u044b\u043b\u043e :xD.<br \/>\u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u0442\u0435\u043d\u0434 \u0434\u043e\u0440\u043e\u0436\u0435:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"369\" width=\"369\">\n<p align=\"left\">\u0427\u0442\u043e<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0426\u0435\u043d\u0430<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"369\" width=\"369\">\n<p align=\"left\">\u041f\u043b\u0430\u0442\u0430 YPCB-00338 <\/p>\n<\/td>\n<td>\n<p align=\"left\">~$50<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"369\" width=\"369\">\n<p align=\"left\">\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043e\u0442 0 \u0434\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 (\u0443 \u043c\u0435\u043d\u044f ~$10 \u0432\u044b\u0448\u043b\u0430) <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"369\" width=\"369\">\n<p align=\"left\">JTAG-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u043e\u0440:<\/p>\n<\/td>\n<td>\n<p align=\"left\">~<strong>$40<\/strong> <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"369\" width=\"369\">\n<p align=\"left\">USB4 \u0441 \u0442\u0443\u043d\u043d\u0435\u043b\u0435\u043c PCIe (\u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0410)<\/p>\n<\/td>\n<td>\n<p align=\"left\">~$140<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"369\" width=\"369\">\n<p align=\"left\">\u0411\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f (\u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0410)<\/p>\n<\/td>\n<td>\n<p align=\"left\">~$85<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"369\" width=\"369\">\n<p align=\"left\">\u041f\u041a <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0431\u044b\u043b<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0418\u0442\u043e\u0433\u043e ~$100, \u0435\u0441\u043b\u0438 \u043f\u043b\u0430\u0442\u0430 \u0432 \u0441\u043b\u043e\u0442\u0435 (\u043f\u043b\u0430\u0442\u0430 50 + \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 10 + JTAG 40). \u0414\u043b\u044f \u0441\u0442\u0435\u043d\u0434\u0430 A \u0447\u0435\u0440\u0435\u0437 USB4 &#8212; \u0435\u0449\u0451 ~$225 \u043d\u0430 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u0438 \u0431\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f. <\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0439 \u043a\u0430\u043c\u0435\u043d\u044c &#8212; <a href=\"https:\/\/aliexpress.ru\/item\/1005005245580978.html?shpMethod=CAINIAO_STANDARD&amp;sku_id=12000032345843352&amp;spm=a2g2w.productlist.search_results.0.33e13debZRvSCb\" rel=\"noopener nofollow\">TH3P4G3<\/a> \u043f\u0440\u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0435 \u043f\u043b\u0430\u0442\u044b (\u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e PCIe) \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u0442\u044b, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043b\u0430\u0442\u0443 \u043f\u0440\u043e\u0448\u0438\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u043c\u043e\u0436\u0435\u0442 \u043a\u0430\u043a-\u0442\u043e \u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e, \u043d\u043e \u0447\u0435\u0441\u0442\u043d\u043e \u043d\u0435 \u043a\u043e\u043f\u0430\u043b\u0441\u044f). <\/p>\n<hr\/>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h3>2. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441 \u043d\u0443\u043b\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u043c\u043d\u044f<\/h3>\n<h4>\u0427\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438<\/h4>\n<p>\u0412 Vivado \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e TPU. \u041f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 &#8212; \u044d\u0442\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0435:<\/p>\n<ul>\n<li>\n<p><strong>\u042f\u0434\u0440\u043e openTPU<\/strong> \u043d\u0430 Verilog: \u043c\u0430\u0442\u0440\u0438\u0446\u0430, \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0439 \u0431\u043b\u043e\u043a, \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c, DMA, \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0442\u043e\u0440, \u0441\u0435\u043a\u0432\u0435\u043d\u0441\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u0441\u0442 PCIe<\/strong> &#8212; IP-\u0431\u043b\u043e\u043a Xilinx XDMA.<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u0432\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 DDR3<\/strong> \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 LiteDRAM \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0433\u043e Xilinx MIG. \u0412\u043d\u0443\u0442\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 RISC-V (VexRiscv) &#8212; \u043e\u043d \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0441\u0430\u043c \u043a\u0430\u043b\u0438\u0431\u0440\u0443\u0435\u0442 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 DDR3. \u0422\u043e \u0435\u0441\u0442\u044c \u043d\u0430 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0435 \u0440\u044f\u0434\u043e\u043c \u0441 TPU \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f \u0435\u0449\u0451 \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u0432\u044f\u0437\u043a\u0430<\/strong>: \u043c\u043e\u0441\u0442 \u043e\u0442 \u044f\u0434\u0440\u0430 \u043a \u0434\u0432\u0443\u043c \u043a\u0430\u043d\u0430\u043b\u0430\u043c \u043f\u0430\u043c\u044f\u0442\u0438, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0421\u0431\u043e\u0440\u043a\u0430<\/h4>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/FeSens\/openTPU.gitcd openTPUgit checkout 8eaa480<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper\"><\/span><\/a><\/div><\/pre>\n<p>\u0420\u0435\u0432\u0438\u0437\u0438\u044e \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e: \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0436\u0438\u0432\u043e\u0439, \u0438 \u043d\u0430 \u0441\u0432\u0435\u0436\u0435\u043c <code>main<\/code> \u0446\u0438\u0444\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0441\u0442\u0430\u0440\u0442\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Vivado 2024.2 \u0438\u043b\u0438 \u0432\u044b\u0448\u0435 ( \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b, \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u044e\u0430\u043d\u0441\u044b).<\/p>\n<p>\u041d\u0430 Windows \u0432\u0441\u0451 \u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u0434\u0438\u043d PowerShell-\u0441\u043a\u0440\u0438\u043f\u0442 &#8212; \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u0440\u043e\u0435\u043a\u0442, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 IP, \u0441\u0438\u043d\u0442\u0435\u0437\u0438\u0440\u0443\u0435\u0442, \u0440\u0430\u0437\u0432\u043e\u0434\u0438\u0442 \u0438 \u043f\u0438\u0448\u0435\u0442 bitstream :<\/p>\n<details class=\"spoiler\">\n<summary>run_vivado.ps1<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">param(    [int]$DDR = 1066,    [int]$JOBS = 8,  # \u043a\u0430\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440     [int]$MCOLS = 4,    [int]$VPU_CL = 2,    [int]$LANES = 8,    [int]$ACT_ROWS = 0,    [int]$DSTEP = 1,    [double]$CORE_MHZ = 0,    [int]$PCIE_GEN = 2,    [switch]$FAST,    [switch]$ImplOnly,    [string]$IMPL_STRATEGY = \"\",    [string]$BUILD_ID = \"00000000\",    # \u0418\u0437\u043c\u0435\u043d\u0438 \u044d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u043f\u043e\u0434 \u0441\u0432\u043e\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443    [string]$Vivado = \"C:\\Xilinx\\Vivado\\2024.2\\bin\\vivado.bat\")$ErrorActionPreference = \"Stop\"$here = Split-Path -Parent $MyInvocation.MyCommand.Path$root = (Resolve-Path (Join-Path $here \"..\\..\")).Path$out  = Join-Path $root \"build\\vivado\"if ($DDR -ne 1066) {    throw \"DDR3-$DDR is unsupported. LiteDRAM is generated for DDR3-1066.\"}if ($ACT_ROWS -eq 0) {    $ACT_ROWS = $MCOLS}if ($CORE_MHZ -eq 0) {    if ($FAST) {        $CORE_MHZ = 100    } else {        $CORE_MHZ = 133.33    }}if (!(Test-Path $Vivado)) {    throw \"Vivado not found: $Vivado\"}New-Item -ItemType Directory -Force -Path $out | Out-Null# Environment read by create_project.tcl \/ bd_native.tcl \/ build.tcl$env:PCIE_GEN = \"$PCIE_GEN\"if ($FAST) {    $env:OTPU_FAST = \"1\"} else {    $env:OTPU_FAST = \"0\"}# Optional IP cache$cache = Join-Path $env:LOCALAPPDATA \"openTPU\\vivado-ip-cache\"New-Item -ItemType Directory -Force -Path $cache | Out-Null$env:OTPU_IP_CACHE = $cache$createTcl = Join-Path $here \"vivado\\create_project.tcl\"$buildTcl  = Join-Path $here \"vivado\\build.tcl\"Write-Host \"\"Write-Host \"openTPU Vivado build\"Write-Host \"-------------------\"Write-Host \"Root       : $root\"Write-Host \"Output     : $out\"Write-Host \"DDR        : $DDR\"Write-Host \"CORE_MHZ   : $CORE_MHZ\"Write-Host \"MCOLS      : $MCOLS\"Write-Host \"VPU_CL     : $VPU_CL\"Write-Host \"LANES      : $LANES\"Write-Host \"ACT_ROWS   : $ACT_ROWS\"Write-Host \"DSTEP      : $DSTEP\"Write-Host \"PCIe Gen   : $PCIE_GEN\"Write-Host \"FAST       : $FAST\"Write-Host \"\"if (!$ImplOnly) {    Write-Host \"=== CREATE PROJECT ===\"    &amp; $Vivado `        -mode batch `        -nojournal `        -log (Join-Path $out \"create_project.log\") `        -source $createTcl `        -tclargs `            $DDR `            $out `            $MCOLS `            $CORE_MHZ `            $BUILD_ID `            $VPU_CL `            $LANES `            $ACT_ROWS `            $DSTEP    if ($LASTEXITCODE -ne 0) {        throw \"Vivado create_project failed: $LASTEXITCODE\"    }    Write-Host \"\"    Write-Host \"=== FULL BUILD ===\"    &amp; $Vivado `        -mode batch `        -nojournal `        -log (Join-Path $out \"build.log\") `        -source $buildTcl `        -tclargs `            $out `            $JOBS `            \"full\" `            $IMPL_STRATEGY} else {    Write-Host \"=== IMPLEMENTATION ONLY ===\"    &amp; $Vivado `        -mode batch `        -nojournal `        -log (Join-Path $out \"build_impl.log\") `        -source $buildTcl `        -tclargs `            $out `            $JOBS `            \"impl\" `            $IMPL_STRATEGY}if ($LASTEXITCODE -ne 0) {    throw \"Vivado build failed: $LASTEXITCODE\"}Write-Host \"\"Write-Host \"================================\"Write-Host \"DONE\"Write-Host \"Bitstream: $out\\otpu.bit\"Write-Host \"MCS      : $out\\otpu.mcs\"Write-Host \"Reports  : $out\\reports\"Write-Host \"================================\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<p>\u041a\u043b\u0430\u0434\u0451\u043c run_vivado.ps1 (\u0442\u0435\u043a\u0441\u0442 &#8212; \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c \u043d\u0438\u0436\u0435) \u0432 \u043f\u0430\u043f\u043a\u0443 boards\\ypcb-00338.  <br \/>\u041d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u043f\u043e\u0434 \u043f\u0430\u043f\u043a\u0443 \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f Vivado &#8212; 17 \u0441\u0442\u0440\u043e\u0447\u043a\u0430 ( [string]$Vivado = \u201cC:\\Xilinx\\Vivado\\2024.2\\bin\\vivado.bat\u201d).<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0441\u0451 \u0440\u0430\u0437\u043e\u043c (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0441\u0438\u043d\u0442\u0435\u0437, \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e) \u0438 \u0436\u0434\u0451\u043c\u0441 (\u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0432\u0430\u0448\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u044b).<\/p>\n<pre><code class=\"bash\">cd boards\\ypcb-00338Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassUnblock-File .\\run_vivado.ps1.\\run_vivado.ps1<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p> Bypass \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0431\u0435\u0437 \u043f\u043e\u0434\u043f\u0438\u0441\u0438, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043e\u043a\u043d\u0435. <\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438: <code>DDR = 1066<\/code>, <code>MCOLS = 4<\/code> (\u0447\u0435\u0442\u044b\u0440\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043f\u043e 128 \u044f\u0447\u0435\u0435\u043a), <code>LANES = 8<\/code> (\u0434\u043e\u0440\u043e\u0436\u043a\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430), <code>CORE_MHZ = 133.333<\/code>, <code>PCIE_GEN = 2<\/code>.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"288\" width=\"288\">\n<p align=\"left\">\u042d\u0442\u0430\u043f<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"288\" width=\"288\">\n<p align=\"left\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Vivado \u0438 IP<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0431\u043b\u043e\u043a-\u0434\u0438\u0437\u0430\u0439\u043d, XDMA, \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f IP<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"288\" width=\"288\">\n<p align=\"left\">\u0421\u0438\u043d\u0442\u0435\u0437<\/p>\n<\/td>\n<td>\n<p align=\"left\">RTL \u2192 \u043d\u0435\u0442\u043b\u0438\u0441\u0442<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"288\" width=\"288\">\n<p align=\"left\">\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">place, phys_opt<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"288\" width=\"288\">\n<p align=\"left\">\u0422\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">route <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0435 build\\vivado.<br \/>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u044d\u0442\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c *.xpr.<br \/>\u0423 \u043c\u0435\u043d\u044f \u0442\u0430\u043a :<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/c9\/07\/76\/c90776ed9894354948fe90fb8146d636.png\" alt=\"\" title=\"\" width=\"651\" height=\"434\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/c9\/07\/76\/c90776ed9894354948fe90fb8146d636.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/c9\/07\/76\/c90776ed9894354948fe90fb8146d636.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 Project Summary: <\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/de\/56\/79\/de567957f07b84ec3d3f8ead7fe465ad.png\" alt=\" \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c Project Summary: Window \u2192 Project Summary  \" title=\" \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c Project Summary: Window \u2192 Project Summary  \" width=\"873\" height=\"156\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/de\/56\/79\/de567957f07b84ec3d3f8ead7fe465ad.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/de\/56\/79\/de567957f07b84ec3d3f8ead7fe465ad.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c Project Summary: Window \u2192 Project Summary  <\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043a\u043d\u043e \u0443\u0441\u043f\u0435\u0445\u0430, \u0440\u0430\u0437\u0432\u043e\u0434\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430\u0441\u044c, \u0442\u0430\u0439\u043c\u0438\u043d\u0433 \u0441\u043e\u0448\u0451\u043b\u0441\u044f<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/24\/8f\/8b\/248f8bfb7de795b71a8e9ffb269b8b00.png\" alt=\"\u042d\u0442\u043e \u0443\u0441\u043f\u0435\u0445\" title=\"\u042d\u0442\u043e \u0443\u0441\u043f\u0435\u0445\" width=\"2551\" height=\"1363\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/24\/8f\/8b\/248f8bfb7de795b71a8e9ffb269b8b00.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/24\/8f\/8b\/248f8bfb7de795b71a8e9ffb269b8b00.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u042d\u0442\u043e \u0443\u0441\u043f\u0435\u0445<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/29\/e0\/0e\/29e00e63a72a0f91798e934bf474d75c.png\" alt=\"\u042d\u0442\u043e \u0443\u0441\u043f\u0435\u0445 \u0432\u0431\u043b\u0438\u0437\u0438\" title=\"\u042d\u0442\u043e \u0443\u0441\u043f\u0435\u0445 \u0432\u0431\u043b\u0438\u0437\u0438\" width=\"440\" height=\"207\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/29\/e0\/0e\/29e00e63a72a0f91798e934bf474d75c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/29\/e0\/0e\/29e00e63a72a0f91798e934bf474d75c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u042d\u0442\u043e \u0443\u0441\u043f\u0435\u0445 \u0432\u0431\u043b\u0438\u0437\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0417\u0430\u043f\u0430\u0441 19 \u043f\u0438\u043a\u043e\u0441\u0435\u043a\u0443\u043d\u0434 (0.019ns) &#8212; 0,25 % \u0442\u0430\u043a\u0442\u0430. \u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u0432\u043f\u0440\u0438\u0442\u044b\u043a, \u0440\u0430\u0437\u0431\u0435\u0440\u0443 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043f\u0440\u043e \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0436\u043c\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 Generate Bitstream (\u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u041f\u041b\u0418\u0421) \u0438 \u0436\u0434\u0435\u043c ( \u0443\u0441\u043f\u0435\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043c\u0435\u0447\u0435\u043d \u0442\u0430\u043c \u0436\u0435 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0433\u0430\u043b\u043e\u0447\u043a\u043e\u0439 )<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/d7\/be\/85\/d7be8545debac72614e51b7a23e6ad58.png\" alt=\" Generate Bitstream - \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0434\u043b\u044f \u041f\u041b\u0418\u0421  \" title=\" Generate Bitstream - \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0434\u043b\u044f \u041f\u041b\u0418\u0421  \" width=\"388\" height=\"232\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/d7\/be\/85\/d7be8545debac72614e51b7a23e6ad58.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/d7\/be\/85\/d7be8545debac72614e51b7a23e6ad58.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> Generate Bitstream &#8212; \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0434\u043b\u044f \u041f\u041b\u0418\u0421  <\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0441\u043f\u0435\u0445\u0430, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0434\u043b\u044f FLASH. \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Generate Memory &#8230;. \u0432 Tools:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/60\/47\/00\/6047005cdba9b66e0d78ba63118bcd9c.png\" alt=\"  Tools \u2192 Generate Memory Configuration File  \" title=\"  Tools \u2192 Generate Memory Configuration File  \" width=\"485\" height=\"615\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/60\/47\/00\/6047005cdba9b66e0d78ba63118bcd9c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/60\/47\/00\/6047005cdba9b66e0d78ba63118bcd9c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>  Tools \u2192 Generate Memory Configuration File  <\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/a1\/76\/e0\/a176e0b3aacd3756cabcbeab17ff6fc7.png\" alt=\" \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c Flash \u043d\u0430 \u043f\u043b\u0430\u0442\u0435.  \" title=\" \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c Flash \u043d\u0430 \u043f\u043b\u0430\u0442\u0435.  \" width=\"1770\" height=\"755\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/a1\/76\/e0\/a176e0b3aacd3756cabcbeab17ff6fc7.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/a1\/76\/e0\/a176e0b3aacd3756cabcbeab17ff6fc7.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c Flash \u043d\u0430 \u043f\u043b\u0430\u0442\u0435.  <\/figcaption><\/div>\n<\/figure>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"76\" width=\"76\">\n<p align=\"left\">\u2116<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\"><strong>1-3<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0438\u043f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 Flash-\u043f\u0430\u043c\u044f\u0442\u0438: <strong>Memory Part \u2192 \u2026 \u2192 <\/strong><code><strong>mt28gu512aax1e-bpi-x16<\/strong><\/code>.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\"><strong>4<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 FLASH. \u0423\u0434\u043e\u0431\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 <code>build\/vivado\/otpu.runs\/impl_1\/<\/code>, \u0440\u044f\u0434\u043e\u043c \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c. \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 &#8212; <code><strong>.bin<\/strong><\/code><strong> \u0438\u043b\u0438 <\/strong><code><strong>.mcs<\/strong><\/code>, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430. (\u0443 \u043c\u0435\u043d\u044f <code>otpu_fpga_top_ld.bin)<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\"><strong>5\u20136<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c <strong>Load bitstream files<\/strong> \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0440\u0430\u043d\u0435\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (\u0443 \u043c\u0435\u043d\u044f <code>otpu_fpga_top_ld.bit<\/code>)\u0438\u0437 \u043f\u0430\u043f\u043a\u0438 <code>impl_1<\/code>.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\"><strong>7<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u043b\u044f \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c <strong>Write checksum<\/strong> \u0438 <strong>Overwrite<\/strong>. <strong>Disable bit swapping<\/strong> \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\"><strong>8<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c <strong>OK<\/strong> &#8212; Vivado \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u043e Flash.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/48\/91\/e6\/4891e68f5dd0336e657675bb7ff5bd9b.png\" alt=\"\u0435\u0449\u0435 \u0443\u0441\u043f\u0435\u0445\" title=\"\u0435\u0449\u0435 \u0443\u0441\u043f\u0435\u0445\" width=\"411\" height=\"139\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/48\/91\/e6\/4891e68f5dd0336e657675bb7ff5bd9b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/48\/91\/e6\/4891e68f5dd0336e657675bb7ff5bd9b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0435\u0449\u0435 \u0443\u0441\u043f\u0435\u0445<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0439\u0434\u0435\u043c \u0448\u0438\u0442\u044c \u043a\u0430\u043c\u0435\u043d\u044c <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/5c\/63\/6e\/5c636e203647f8f8ecfcd9202b6888ca.png\" alt=\" \u041a\u043d\u043e\u043f\u043a\u0430 Open Target - \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u043a\u0430\u043c\u043d\u044e  \" title=\" \u041a\u043d\u043e\u043f\u043a\u0430 Open Target - \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u043a\u0430\u043c\u043d\u044e  \" width=\"287\" height=\"191\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/5c\/63\/6e\/5c636e203647f8f8ecfcd9202b6888ca.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/5c\/63\/6e\/5c636e203647f8f8ecfcd9202b6888ca.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u041a\u043d\u043e\u043f\u043a\u0430 Open Target &#8212; \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u043a\u0430\u043c\u043d\u044e  <\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e \u0435\u0441\u0442\u044c FLASH:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/7a\/43\/64\/7a4364ae7cc9e7d59e47e6672f3431df.png\" width=\"2217\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/7a\/43\/64\/7a4364ae7cc9e7d59e47e6672f3431df.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/7a\/43\/64\/7a4364ae7cc9e7d59e47e6672f3431df.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/39\/28\/fb\/3928fb97d68c577a1e488c4588a4758b.png\" alt=\"\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0443 \u0436\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\" title=\"\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0443 \u0436\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\" width=\"786\" height=\"478\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/39\/28\/fb\/3928fb97d68c577a1e488c4588a4758b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/39\/28\/fb\/3928fb97d68c577a1e488c4588a4758b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0443 \u0436\u0435 \u043f\u0430\u043c\u044f\u0442\u044c<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0441\u043f\u0440\u043e\u0441\u0438\u0442 &#171;\u0445\u043e\u0442\u0438\u043c \u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0448\u0438\u0442\u044c&#187; \u0436\u043c\u0451\u043c \u0434\u0430, \u0447\u0451 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0448\u044c)<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/cb\/10\/46\/cb1046af8e3bd033804a55536afa9fbe.png\" alt=\"\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c .bin \u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u0430\u0435\u043c Flash   \" title=\"\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c .bin \u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u0430\u0435\u043c Flash   \" width=\"437\" height=\"631\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/cb\/10\/46\/cb1046af8e3bd033804a55536afa9fbe.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/cb\/10\/46\/cb1046af8e3bd033804a55536afa9fbe.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c .bin \u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u0430\u0435\u043c Flash   <\/figcaption><\/div>\n<\/figure>\n<p>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0434\u043b\u044f FLASH \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 (\u0443 \u043c\u0435\u043d\u044f <code>build\/vivado\/otpu.runs\/impl_1\/otpu_fpga_top_ld.bin<\/code> ).<\/p>\n<p>\u0416\u0434\u0435\u043c <s>\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f<\/s> \u0443\u0441\u043f\u0435\u0445\u0430)<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/2f\/39\/87\/2f3987575ceda284e0d3de5187b1a70b.png\" alt=\"\u0423\u0421\u041f\u0415\u0425, \u043a\u0430\u043c\u0435\u043d\u044c \u0431\u0443\u0434\u0435\u0442 \u0436\u0438\u0442\u044c) \" title=\"\u0423\u0421\u041f\u0415\u0425, \u043a\u0430\u043c\u0435\u043d\u044c \u0431\u0443\u0434\u0435\u0442 \u0436\u0438\u0442\u044c) \" width=\"321\" height=\"129\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/2f\/39\/87\/2f3987575ceda284e0d3de5187b1a70b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/2f\/39\/87\/2f3987575ceda284e0d3de5187b1a70b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0423\u0421\u041f\u0415\u0425, \u043a\u0430\u043c\u0435\u043d\u044c \u0431\u0443\u0434\u0435\u0442 \u0436\u0438\u0442\u044c) <\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/2e\/43\/57\/2e4357ee783f3333c133eafac668b90c.png\" alt=\"\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043c\u043d\u044f \u0437\u0430\u043d\u044f\u0442\u043e \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442\" title=\"\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043c\u043d\u044f \u0437\u0430\u043d\u044f\u0442\u043e \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442\" width=\"1884\" height=\"238\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/2e\/43\/57\/2e4357ee783f3333c133eafac668b90c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/2e\/43\/57\/2e4357ee783f3333c133eafac668b90c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043c\u043d\u044f \u0437\u0430\u043d\u044f\u0442\u043e \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/cb\/84\/2f\/cb842fc2e0f093bc2d6ff64b24d2463b.png\" alt=\" \u0421\u043b\u043e\u0432\u0430\u0440\u0438\u043a: LUT, FF, BRAM \u0438 DSP - \u0438\u0437 \u0447\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u0430 \u041f\u041b\u0418\u0421  \" title=\" \u0421\u043b\u043e\u0432\u0430\u0440\u0438\u043a: LUT, FF, BRAM \u0438 DSP - \u0438\u0437 \u0447\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u0430 \u041f\u041b\u0418\u0421  \" width=\"2416\" height=\"320\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/cb\/84\/2f\/cb842fc2e0f093bc2d6ff64b24d2463b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/cb\/84\/2f\/cb842fc2e0f093bc2d6ff64b24d2463b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u0421\u043b\u043e\u0432\u0430\u0440\u0438\u043a: LUT, FF, BRAM \u0438 DSP &#8212; \u0438\u0437 \u0447\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u0430 \u041f\u041b\u0418\u0421  <\/figcaption><\/div>\n<\/figure>\n<hr\/>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<h3>3. Linux, \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0438 \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430<\/h3>\n<p> \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043b\u0430\u0442\u0430. \u041c\u043e\u0436\u043d\u043e \u0438 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 &#8212; \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u043f\u0435\u0440\u0435\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0438\u043d\u0443: <\/p>\n<pre><code class=\"bash\">sudo modprobe -r xdma  echo 1 | sudo tee \/sys\/bus\/pci\/devices\/0000:07:00.0\/removeecho 1 | sudo tee \/sys\/bus\/pci\/rescan<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0420\u0430\u0441\u0447\u0435\u0445\u043b\u044f\u0435\u043c ssh \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0434\u0440\u0443\u0433\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043a\u0443\u0434\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043b\u0430\u0442\u0430 (\u0435\u0441\u043b\u0438 \u043f\u043b\u0430\u0442\u0430 \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043c\u043f).<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0447\u0442\u043e \u0436\u0438\u0432\u0430 \u0438 \u0434\u043e\u043c \u043d\u0435 \u0441\u0433\u043e\u0440\u0435\u043b:<\/p>\n<pre><code class=\"bash\">sudo lspci -vv | grep -E 'Xilinx'<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/37\/43\/12\/3743121871e3283bbbec6a349cefb450.png\" alt=\"linux \u0432\u0438\u0434\u0438\u0442 \u043f\u043b\u0430\u0442\u0443\" title=\"linux \u0432\u0438\u0434\u0438\u0442 \u043f\u043b\u0430\u0442\u0443\" width=\"898\" height=\"70\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/37\/43\/12\/3743121871e3283bbbec6a349cefb450.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/37\/43\/12\/3743121871e3283bbbec6a349cefb450.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>linux \u0432\u0438\u0434\u0438\u0442 \u043f\u043b\u0430\u0442\u0443<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043b\u0430\u0442\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 &#8212; \u043d\u0430 \u0445\u0430\u0439\u043f\u0435 \u0438 \u0433\u043e\u0440\u0434\u0430\u044f). <\/p>\n<h3>\u0415\u0441\u043b\u0438 \u043f\u043b\u0430\u0442\u0430 \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/h3>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/FeSens\/openTPU.gitcd openTPUgit checkout 8eaa480<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<details class=\"spoiler\">\n<summary>\u0424\u0430\u0439\u043b setup_opentpu.sh<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">#!\/usr\/bin\/env bash# openTPU hardware bring-up only: no LLM checkpoint download or inference.set -Eeuo pipefailPROJECT=\"$(pwd -P)\"RESET_VENV=\"${RESET_VENV:-1}\"VERBOSE=\"${VERBOSE:-1}\"DRIVER_URL=\"https:\/\/github.com\/Xilinx\/dma_ip_drivers.git\"PROJECT_URL=\"https:\/\/github.com\/FeSens\/openTPU.git\"mkdir -p \"$PROJECT\/logs\" \"$PROJECT\/drivers\" \"$PROJECT\/benchmarks\" \"$PROJECT\/.local\"LOG=\"$PROJECT\/logs\/setup_$(date +%Y%m%d_%H%M%S).log\"exec &gt; &gt;(tee -a \"$LOG\") 2&gt;&amp;1export PYTHONUNBUFFERED=1export PS4='+ [${BASH_SOURCE##*\/}:${LINENO}] '[[ \"$VERBOSE\" == 1 ]] &amp;&amp; set -xtrap 'rc=$?; set +x; printf \"\\nERROR: step failed on line %s (exit %s)\\nLOG: %s\\n\" \"$LINENO\" \"$rc\" \"$LOG\" &gt;&amp;2' ERRstep() { printf '\\n========== %s ==========\\n' \"$*\"; }die() { echo \"ERROR: $*\" &gt;&amp;2; exit 1; }step 'Environment and project location'echo \"PROJECT=$PROJECT\"; date -Is; uname -a[[ \"$PROJECT\" != \/ &amp;&amp; \"$PROJECT\" != \"$HOME\" ]] || die 'Run inside a dedicated openTPU directory, not \/ or HOME.'command -v sudo &gt;\/dev\/null || die 'sudo is required'# A directory containing an unrelated project is not overwritten.if [[ ! -f \"$PROJECT\/pyproject.toml\" || ! -d \"$PROJECT\/opentpu\" ]]; then  if [[ -n \"$(find \"$PROJECT\" -mindepth 1 -maxdepth 1 ! -name logs ! -name drivers ! -name benchmarks ! -name .local ! -name setup_opentpu_universal.sh ! -name setup.sh -print -quit)\" ]]; then    die 'Directory is not an openTPU checkout and is not empty. Run in an empty directory or an existing openTPU checkout.'  fi  step 'Install required packages for source checkout'  sudo apt-get update  sudo apt-get install -y git ca-certificates  temp_checkout=\"$(mktemp -d)\"  git clone --depth 1 \"$PROJECT_URL\" \"$temp_checkout\/openTPU\"  cp -a \"$temp_checkout\/openTPU\/.\" \"$PROJECT\/\"  rm -rf -- \"$temp_checkout\"fi[[ -d \"$PROJECT\/opentpu\" &amp;&amp; -f \"$PROJECT\/pyproject.toml\" ]] || die 'openTPU sources not found'if git -C \"$PROJECT\" rev-parse --is-inside-work-tree &gt;\/dev\/null 2&gt;&amp;1; then  git -C \"$PROJECT\" rev-parse HEAD || true  git -C \"$PROJECT\" status --short || truefistep 'Host packages'sudo apt-get updatesudo apt-get install -y build-essential make gcc git rsync pciutils kmod python3 python3-venv python3-pip \"linux-headers-$(uname -r)\"step 'Detect Xilinx PCIe device automatically'mapfile -t xilinx_devices &lt; &lt;(lspci -Dnnd 10ee: | awk '{print $1}')((${#xilinx_devices[@]} &gt; 0)) || die 'No Xilinx PCIe devices found (vendor 10ee). Check power, bitstream and PCIe enumeration.'printf 'Xilinx devices found:\\n'; lspci -Dnn -d 10ee:if [[ -n \"${PCI_BDF:-}\" ]]; then  BDF=\"$PCI_BDF\"  [[ \"$BDF\" == 0000:* ]] || BDF=\"0000:$BDF\"else  # Prefer the openTPU\/ XDMA endpoint ID 10ee:7028; otherwise accept only a unique Xilinx endpoint.  mapfile -t preferred &lt; &lt;(lspci -Dnnd 10ee:7028 | awk '{print $1}')  if ((${#preferred[@]} == 1)); then    BDF=\"${preferred[0]}\"  elif ((${#xilinx_devices[@]} == 1)); then    BDF=\"${xilinx_devices[0]}\"  else    die 'Several Xilinx devices found. Rerun with PCI_BDF=0000:BB:DD.F .\/setup_opentpu_universal.sh'  fifi[[ -d \"\/sys\/bus\/pci\/devices\/$BDF\" ]] || die \"PCI device $BDF does not exist\"echo \"SELECTED_PCI_BDF=$BDF\"lspci -nnk -s \"$BDF\"; lspci -vv -s \"$BDF\" | grep -E 'LnkCap:|LnkSta:|Region [0-9]:' || truefor item in vendor device subsystem_vendor subsystem_device current_link_speed current_link_width max_link_speed max_link_width; do  file=\"\/sys\/bus\/pci\/devices\/$BDF\/$item\"; [[ -r \"$file\" ]] &amp;&amp; printf '%s=' \"$item\" &amp;&amp; cat \"$file\"donestep 'Get XDMA sources inside the project'DRIVER_REPO=\"$PROJECT\/drivers\/dma_ip_drivers\"if [[ ! -f \"$DRIVER_REPO\/XDMA\/linux-kernel\/xdma\/Makefile\" ]]; then  if [[ -f \"$HOME\/dma_ip_drivers\/XDMA\/linux-kernel\/xdma\/Makefile\" ]]; then    mkdir -p \"$DRIVER_REPO\"    rsync -a \"$HOME\/dma_ip_drivers\/\" \"$DRIVER_REPO\/\"  else    [[ ! -e \"$DRIVER_REPO\" || -z \"$(ls -A \"$DRIVER_REPO\" 2&gt;\/dev\/null)\" ]] || die \"Driver directory $DRIVER_REPO contains unrelated files\"    git clone \"$DRIVER_URL\" \"$DRIVER_REPO\"  fifi[[ -f \"$DRIVER_REPO\/XDMA\/linux-kernel\/include\/libxdma_api.h\" ]] || die 'Missing XDMA header include\/libxdma_api.h'step 'Compile driver on local filesystem (source remains in project)'# Kernel module builds frequently fail on SMB shares: use a local temp build tree.BUILD_ROOT=\"$(mktemp -d \"${TMPDIR:-\/tmp}\/opentpu-xdma.XXXXXXXX\")\"trap 'rc=$?; set +x; echo \"Exit $rc; log: $LOG\" &gt;&amp;2; [[ -n \"${BUILD_ROOT:-}\" &amp;&amp; -d \"$BUILD_ROOT\" ]] &amp;&amp; rm -rf -- \"$BUILD_ROOT\"; exit \"$rc\"' EXITrsync -a --exclude='.git' \"$DRIVER_REPO\/\" \"$BUILD_ROOT\/dma_ip_drivers\/\"cd \"$BUILD_ROOT\/dma_ip_drivers\/XDMA\/linux-kernel\/xdma\"make cleanmake -j\"$(nproc)\" KCFLAGS=\"-I$(realpath ..\/include)\"[[ -s xdma.ko ]] || die 'xdma.ko not created'modinfo .\/xdma.ko | grep -E '^(filename|vermagic|description):' || true[[ \"$(modinfo -F vermagic .\/xdma.ko)\" == \"$(uname -r) \"* ]] || die 'Built module vermagic does not match running kernel'mkdir -p \"$PROJECT\/drivers\/modules\/$(uname -r)\"cp -f .\/xdma.ko \"$PROJECT\/drivers\/modules\/$(uname -r)\/xdma.ko\"step 'Load compiled XDMA (no reboot, no flash programming)'if [[ -L \"\/sys\/bus\/pci\/devices\/$BDF\/driver\" ]]; then  active_driver=\"$(basename \"$(readlink -f \"\/sys\/bus\/pci\/devices\/$BDF\/driver\")\")\"  [[ \"$active_driver\" == xdma ]] || die \"Selected board is bound to $active_driver; refusing to replace it automatically\"fiif lsmod | awk '$1==\"xdma\" {found=1} END {exit !found}'; then  sudo modprobe -r xdma || die 'XDMA in use, stop programs that access \/dev\/xdma* and retry'fisudo insmod \"$PROJECT\/drivers\/modules\/$(uname -r)\/xdma.ko\" poll_mode=0sleep 2lspci -nnk -s \"$BDF\"ls -l \/dev\/xdma* || truemapfile -t udev_nodes &lt; &lt;(compgen -G '\/dev\/xdma*_user' || true)((${#udev_nodes[@]} &gt;= 1)) || die 'No \/dev\/xdma*_user. Inspect kernel log.'DEVICE=\"${DEVICE:-${udev_nodes[0]%_user}}\"[[ -c \"${DEVICE}_user\" &amp;&amp; -c \"${DEVICE}_h2c_0\" &amp;&amp; -c \"${DEVICE}_c2h_0\" ]] || die \"Missing DMA nodes for $DEVICE\"echo \"SELECTED_XDMA=$DEVICE\"sudo dmesg | tail -45 || truestep 'Create Python environment inside project'cd \"$PROJECT\"VENV=\"$PROJECT\/.venv\"# SMB\/CIFS can break virtual environments (symlinks, executable permissions).# Never silently relocate .venv outside the project.if [[ -L \"$VENV\" ]]; then  rm -- \"$VENV\"elif [[ -e \"$VENV\" &amp;&amp; \"$RESET_VENV\" == 1 ]]; then  [[ -d \"$VENV\" ]] || die \"Unexpected .venv path: $VENV\"  rm -rf -- \"$VENV\"fiif [[ ! -x \"$VENV\/bin\/python\" ]]; then  python3 -m venv --copies \"$VENV\" || die \"Cannot create .venv on this filesystem; mount with Linux-compatible permissions or use a local checkout\"fi[[ -x \"$VENV\/bin\/python\" ]] || die \"Python in $VENV is not executable (SMB mount may be noexec)\"\"$VENV\/bin\/python\" -m pip install -U pip setuptools wheel transformers tokenizers safetensors sentencepiece protobuf torch  https:\/\/download.pytorch.org\/whl\/cpu\"$VENV\/bin\/python\" -m pip install -e \"$PROJECT\"export PATH=\"$VENV\/bin:$PATH\"command -v otpu-selftest; command -v otpu-diag; command -v otpu-smistep 'Software CLI smoke checks'otpu-diag --help &gt;\/dev\/nullotpu-selftest --help &gt;\/dev\/nullotpu-smi --help &gt;\/dev\/nullstep 'FPGA board diagnostics (no model \/ no LLM)'otpu-diag --dev \"$DEVICE\"step 'SUCCESS: board bring-up complete, no LLM downloaded or executed'echo \"Project: $PROJECT\"echo \"PCIe FPGA: $BDF\"echo \"XDMA: $DEVICE\"echo \"Venv: $VENV\"echo \"Log: $LOG\"echo 'No Qwen model was downloaded, loaded or launched.'<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u043b\u0435\u043d\u0438\u0432\u044b\u0445 (\u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u0441\u0435\u0431\u044f) \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b setup_opentpu.sh . \u041e\u043d \u0441\u0442\u0430\u0432\u0438\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0441\u0430\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043f\u043b\u0430\u0442\u0443 \u043d\u0430 \u0448\u0438\u043d\u0435, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 XDMA \u043f\u043e\u0434 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u044f\u0434\u0440\u043e, \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442 Python-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0433\u043e\u043d\u044f\u0435\u0442 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443. \u041c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435 \u043a\u0430\u0447\u0430\u0435\u0442 \u0438 \u043f\u043b\u0430\u0442\u0443 \u043d\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u0430\u0435\u0442.<\/p>\n<p>\u0423\u0447\u0442\u0438\u0442\u0435: \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u043e\u043d \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 insmod, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044f\u0434\u0440\u0430 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430\u0434\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043d\u043e\u0432\u0430. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 &#8212; \u0432 openTPU \u0435\u0441\u0442\u044c <code>sudo otpu-setup<\/code>, \u043e\u043d \u0441\u0442\u0430\u0432\u0438\u0442 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 DKMS.<\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u043d \u043d\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 LLM-\u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441 \u0438 \u043d\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u0430\u0435\u0442 FPGA.<\/p>\n<h4>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e \u0448\u0430\u0433\u0430\u043c:<\/h4>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"59\" width=\"59\">\n<p>\u0428\u0430\u0433<\/p>\n<\/th>\n<th data-colwidth=\"231\" width=\"231\">\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/p>\n<\/th>\n<th>\n<p>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"231\" width=\"231\">\n<p align=\"left\">\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043f\u0430\u043f\u043a\u0443, \u0441\u043e\u0437\u0434\u0430\u0451\u0442 <code>logs\/<\/code>, <code>drivers\/<\/code>, <code>benchmarks\/<\/code>, <code>.local\/<\/code>. \u0415\u0441\u043b\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 openTPU \u043d\u0435\u0442, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0438\u0445 \u0441 GitHub \u0432 \u043f\u0443\u0441\u0442\u0443\u044e \u043f\u0430\u043f\u043a\u0443.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td data-colwidth=\"231\" width=\"231\">\n<p align=\"left\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 GCC, Make, Git, Python, \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u044f\u0434\u0440\u0430 Linux \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 PCIe.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">3<\/p>\n<\/td>\n<td data-colwidth=\"231\" width=\"231\">\n<p align=\"left\">\u041f\u043e\u0438\u0441\u043a FPGA<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0449\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 Xilinx \u043f\u043e PCI Vendor ID <code>10ee<\/code>. \u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442 openTPU \u0441 Device ID <code>7028<\/code>. \u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u0448\u0438\u0440\u0438\u043d\u0443 PCIe.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">4<\/p>\n<\/td>\n<td data-colwidth=\"231\" width=\"231\">\n<p align=\"left\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 XDMA<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0438\u0437 <code>Xilinx\/dma_ip_drivers<\/code> \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0443\u044e\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">5<\/p>\n<\/td>\n<td data-colwidth=\"231\" width=\"231\">\n<p align=\"left\">\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u0442 <code>xdma.ko<\/code> \u043f\u043e\u0434 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u044f\u0434\u0440\u043e Linux. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">6<\/p>\n<\/td>\n<td data-colwidth=\"231\" width=\"231\">\n<p align=\"left\">\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0440\u0430\u043d\u0435\u0435 (\u0435\u0441\u043b\u0438 \u0431\u044b\u043b ) \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c <code>xdma<\/code>, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 <code>insmod<\/code> \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 <code>\/dev\/xdma*<\/code>.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">7<\/p>\n<\/td>\n<td data-colwidth=\"231\" width=\"231\">\n<p align=\"left\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Python-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043e\u0437\u0434\u0430\u0451\u0442 <code>.venv<\/code> \u0432 \u043f\u0430\u043f\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 Python-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0441\u0430\u043c openTPU.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">8<\/p>\n<\/td>\n<td data-colwidth=\"231\" width=\"231\">\n<p align=\"left\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u0442\u0438\u043b\u0438\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c <code>otpu-selftest<\/code>, <code>otpu-diag<\/code> \u0438 <code>otpu-smi<\/code>.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">9<\/p>\n<\/td>\n<td data-colwidth=\"231\" width=\"231\">\n<p align=\"left\">\u0410\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u0430\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 <code>otpu-diag<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c FPGA \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">10<\/p>\n<\/td>\n<td data-colwidth=\"231\" width=\"231\">\n<p align=\"left\">\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 <code>logs\/setup_\u0413\u0413\u0413\u0413\u041c\u041c\u0414\u0414_\u0427\u0427\u041c\u041c\u0421\u0421.log<\/code> \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0430\u0434\u0440\u0435\u0441 PCIe, \u043f\u0443\u0442\u044c XDMA \u0438 Python-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442: <\/p>\n<p><code>bash .\/setup_opentpu.sh<\/code><\/p>\n<p>\u0416\u0434\u0435\u043c <s>\u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f<\/s> \u0441\u043d\u043e\u0432\u0430 \u0443\u0441\u043f\u0435\u0445\u0430)<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/1d\/8d\/32\/1d8d327730a9a82f2100537dff34f577.png\" alt=\" setup_opentpu.sh \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b: \u043f\u043b\u0430\u0442\u0430 \u043f\u043e\u0434\u043d\u044f\u0442\u0430, \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d  \" title=\" setup_opentpu.sh \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b: \u043f\u043b\u0430\u0442\u0430 \u043f\u043e\u0434\u043d\u044f\u0442\u0430, \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d  \" width=\"1036\" height=\"34\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/1d\/8d\/32\/1d8d327730a9a82f2100537dff34f577.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/1d\/8d\/32\/1d8d327730a9a82f2100537dff34f577.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> setup_opentpu.sh \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b: \u043f\u043b\u0430\u0442\u0430 \u043f\u043e\u0434\u043d\u044f\u0442\u0430, \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d  <\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/3e\/d1\/eb\/3ed1ebe2ad0751e019445267c7dc9c80.png\" alt=\" \u041f\u043e\u043b\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 - \u0432 logs\/setup_&lt;\u0434\u0430\u0442\u0430&gt;.log  \" title=\" \u041f\u043e\u043b\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 - \u0432 logs\/setup_&lt;\u0434\u0430\u0442\u0430&gt;.log  \" width=\"476\" height=\"34\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/3e\/d1\/eb\/3ed1ebe2ad0751e019445267c7dc9c80.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/3e\/d1\/eb\/3ed1ebe2ad0751e019445267c7dc9c80.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u041f\u043e\u043b\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 &#8212; \u0432 logs\/setup_&lt;\u0434\u0430\u0442\u0430&gt;.log  <\/figcaption><\/div>\n<\/figure>\n<h4>\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430: 138 \u0438\u0437 138<\/h4>\n<p>\u0423\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0441\u0451. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 openTPU \u0435\u0441\u0442\u044c <code>otpu-diag<\/code>: \u043e\u043d \u0433\u043e\u043d\u044f\u0435\u0442 PCIe, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b, \u043e\u0431\u0430 \u043a\u0430\u043d\u0430\u043b\u0430 \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u0430\u0436\u0434\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u044f \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u0432\u0441\u0435\u0445 \u0431\u043b\u043e\u043a\u0430\u0445 \u0441\u0440\u0430\u0437\u0443. \u041d\u0430 \u0441\u0442\u0435\u043d\u0434\u0435 B \u044f \u043f\u0440\u043e\u0433\u043d\u0430\u043b \u0435\u0433\u043e \u0442\u0440\u0438\u0436\u0434\u044b \u043f\u043e\u0434\u0440\u044f\u0434:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0420\u0430\u0437\u0434\u0435\u043b<\/p>\n<\/th>\n<th>\n<p align=\"left\">PASS<\/p>\n<\/th>\n<th>\n<p align=\"left\">FAIL<\/p>\n<\/th>\n<th>\n<p align=\"left\">SKIP<\/p>\n<\/th>\n<th>\n<p align=\"left\">INFO<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430: PCIe, \u0434\u0440\u0430\u0439\u0432\u0435\u0440, ID, \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0430 DDR3<\/p>\n<\/td>\n<td>\n<p align=\"left\">9<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u044b<\/p>\n<\/td>\n<td>\n<p align=\"left\">7<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">I\u00b2C \u0438 \u0434\u0430\u0442\u0447\u0438\u043a\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">4<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041f\u0430\u043c\u044f\u0442\u044c: \u043e\u0431\u0430 \u043a\u0430\u043d\u0430\u043b\u0430 DDR3<\/p>\n<\/td>\n<td>\n<p align=\"left\">11<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0431\u0438\u0442 \u0432 \u0431\u0438\u0442 \u0441 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c<\/p>\n<\/td>\n<td>\n<p align=\"left\">103<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u0432\u0441\u0435\u0445 \u0431\u043b\u043e\u043a\u0430\u0445<\/p>\n<\/td>\n<td>\n<p align=\"left\">4<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0418\u0442\u043e\u0433\u043e<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>138<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>1<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>1<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0440\u043e\u0433\u043e\u043d &#8212; 3,3 \u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0442\u0440\u0438 \u0440\u0430\u0437\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. \u041f\u043b\u0430\u0442\u0430 \u043e\u0442\u0432\u0435\u0442\u0438\u043b\u0430 \u0441\u0432\u043e\u0438\u043c ID <code>0x4f545055<\/code> &#8212; \u044d\u0442\u043e \u00abOTPU\u00bb \u0432 ASCII. 103 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b &#8212; \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 &#8212; \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0442\u043e \u0436\u0435, \u0447\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440, \u0431\u0438\u0442 \u0432 \u0431\u0438\u0442. \u0421\u0447\u0451\u0442\u0447\u0438\u043a \u0442\u0430\u043a\u0442\u043e\u0432 \u043d\u0435 \u0432\u0440\u0451\u0442: 20 \u043c\u043b\u043d \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 &#8212; 300 \u043c\u0441 \u043f\u043e \u043f\u043b\u0430\u0442\u0435 \u0438 301 \u043c\u0441 \u043f\u043e \u0447\u0430\u0441\u0430\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430. <\/p>\n<p>DMA \u043d\u0430 \u0441\u0442\u0435\u043d\u0434\u0435 B: \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 \u043f\u043b\u0430\u0442\u0443 2,76 \u0413\u0411\/\u0441, \u0447\u0442\u0435\u043d\u0438\u0435 1,91 \u0413\u0411\/\u0441 &#8212; 69 % \u043f\u043e\u0442\u043e\u043b\u043a\u0430 \u043b\u0438\u043d\u0438\u0438 Gen2 x8. \u0423 \u0430\u0432\u0442\u043e\u0440\u0430 &#8212; 2,98 \u0413\u0411\/\u0441. \u0427\u0435\u0440\u0435\u0437 USB4 \u043d\u0430 \u0441\u0442\u0435\u043d\u0434\u0435 A \u0431\u044b\u043b\u043e 0,30 \u0413\u0411\/\u0441.<\/p>\n<hr\/>\n<p><a class=\"anchor\" name=\"4\" id=\"4\"><\/a><\/p>\n<h3>4. \u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d TPU \u0432\u043d\u0443\u0442\u0440\u0438<\/h3>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/ea\/36\/fa\/ea36fa156f2ef5eb5771c2fd45f48023.png\" alt=\"\u0423\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 openTPU . \" title=\"\u0423\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 openTPU . \" width=\"2520\" height=\"1894\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/ea\/36\/fa\/ea36fa156f2ef5eb5771c2fd45f48023.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/ea\/36\/fa\/ea36fa156f2ef5eb5771c2fd45f48023.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0423\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 openTPU . <\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0445\u0435\u043c\u0430 \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u0430\u044f, \u043d\u043e \u0432\u0441\u0451 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043d\u0430 \u043d\u0435\u0439 \u0435\u0441\u0442\u044c. \u0421\u043d\u0430\u0440\u0443\u0436\u0438 &#8212; \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440: \u043e\u043d \u0433\u043e\u0442\u043e\u0432\u0438\u0442 \u043c\u043e\u0434\u0435\u043b\u044c, \u0447\u0435\u0440\u0435\u0437 PCIe \u0438 \u043c\u043e\u0441\u0442 XDMA \u043a\u043b\u0430\u0434\u0451\u0442 \u0432\u0435\u0441\u0430 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0432 DDR3 \u043f\u043b\u0430\u0442\u044b \u0438 \u0434\u0430\u0451\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u00ab\u0441\u0442\u0430\u0440\u0442\u00bb. \u0414\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0430\u043c\u043e \u044f\u0434\u0440\u043e, \u0438 \u0432 \u043d\u0451\u043c \u0448\u0435\u0441\u0442\u044c \u0431\u043b\u043e\u043a\u043e\u0432: <\/p>\n<ul>\n<li>\n<p><strong>\u0421\u0435\u043a\u0432\u0435\u043d\u0441\u043e\u0440<\/strong> &#8212; \u0434\u0438\u0440\u0438\u0436\u0451\u0440. \u0427\u0438\u0442\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0440\u0430\u0437\u0434\u0430\u0451\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u0441\u043b\u0435\u0434\u0438\u0442, \u0447\u0442\u043e\u0431\u044b \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u0442\u043e, \u0447\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e. \u041d\u0430 \u043e\u0434\u043d\u043e \u0434\u0438\u0440\u0438\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0448\u043b\u043e 16 \u0442\u044b\u0441. LUT.<\/p>\n<\/li>\n<li>\n<p><strong>DMA<\/strong> &#8212; \u0433\u0440\u0443\u0437\u0447\u0438\u043a. \u0422\u0430\u0441\u043a\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 DDR3 \u0438 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u044c\u044e. \u042d\u0442\u043e \u043d\u0435 XDMA: \u0442\u043e\u0442 \u0432\u043e\u0437\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430, \u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u044f\u0434\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>TMEM<\/strong> &#8212; \u043e\u0431\u0449\u0430\u044f \u0434\u043e\u0441\u043a\u0430 \u043d\u0430 256 \u041a\u0438\u0411 fp32, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u043b\u043e\u043a\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043d\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 384 \u0431\u043b\u043e\u043a\u0430 BRAM, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0448\u0435\u0441\u0442\u0438 \u043a\u043e\u043f\u0438\u044f\u0445 &#8212; \u043f\u043e\u0447\u0435\u043c\u0443, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043d\u0438\u0436\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>VPU<\/strong> &#8212; 8 \u0434\u043e\u0440\u043e\u0436\u0435\u043a fp32 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u043d\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446: \u043d\u043e\u0440\u043c\u044b, softmax, \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u0440\u0435\u043d\u044c. \u0421\u0430\u043c\u044b\u0439 \u0442\u043e\u043b\u0441\u0442\u044b\u0439 \u0431\u043b\u043e\u043a \u044f\u0434\u0440\u0430 \u043f\u043e \u043b\u043e\u0433\u0438\u043a\u0435 &#8212; 39 \u0442\u044b\u0441. LUT.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0442\u043e\u0440<\/strong> &#8212; \u0441\u0436\u0438\u043c\u0430\u0435\u0442 fp32 \u0432 INT8 \u0438 \u043a\u043b\u0430\u0434\u0451\u0442 \u0432 ACT RAM, \u043e\u0442\u043a\u0443\u0434\u0430 \u0438\u0445 \u0431\u0435\u0440\u0451\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>MXU<\/strong> &#8212; \u043c\u0430\u0442\u0440\u0438\u0446\u0430 4 \u00d7 128 = 512 \u044f\u0447\u0435\u0435\u043a, \u0432\u0435\u0441\u044c \u0431\u043b\u043e\u043a &#8212; 554 DSP. \u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0431\u0435\u0440\u0451\u0442 \u0438\u0437 ACT RAM, \u0432\u0435\u0441\u0430 &#8212; \u043f\u043e\u0442\u043e\u043a\u043e\u043c \u043f\u0440\u044f\u043c\u043e \u0438\u0437 DDR3, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0438\u0448\u0435\u0442 \u0432 TMEM.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u044f\u0434\u043e\u043c &#8212; \u0434\u043e\u0440\u043e\u0433\u0430 \u043a \u043f\u0430\u043c\u044f\u0442\u0438: \u043c\u043e\u0441\u0442 \u043e\u0442 \u044f\u0434\u0440\u0430 \u043a \u0434\u0432\u0443\u043c \u043a\u0430\u043d\u0430\u043b\u0430\u043c, \u0440\u0430\u0437\u0432\u0435\u0442\u0432\u0438\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438 \u0434\u0432\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 LiteDRAM \u0441 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c VexRiscv. <\/p>\n<p>\u0418 \u043e\u0434\u043d\u0430 \u0446\u0438\u0444\u0440\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432\u0441\u044f \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u0438. \u0412\u0435\u0441\u0430 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043f\u043e 1024 \u0431\u0438\u0442\u0430 \u0437\u0430 \u0442\u0430\u043a\u0442: 128 \u0431\u0430\u0439\u0442 \u00d7 133,33 \u041c\u0413\u0446 = <strong>17,07 \u0413\u0411\/\u0441<\/strong>. \u0410 \u0434\u0432\u0430 \u043a\u0430\u043d\u0430\u043b\u0430 DDR3-1066 \u0434\u0430\u044e\u0442 \u0432 \u043f\u0438\u043a\u0435 2 \u00d7 8 \u0431\u0430\u0439\u0442 \u00d7 1066 \u043c\u043b\u043d = <strong>17,06 \u0413\u0411\/\u0441<\/strong>. \u0421\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0434\u043e \u0441\u043e\u0442\u044b\u0445 \u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e: \u043f\u043e\u0440\u0442 \u0441\u0434\u0435\u043b\u0430\u043d \u0440\u043e\u0432\u043d\u043e \u043f\u043e\u0434 \u043f\u0430\u043c\u044f\u0442\u044c. \u0417\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u044d\u0442\u0443 \u0446\u0438\u0444\u0440\u0443. <\/p>\n<details class=\"spoiler\">\n<summary>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 TPU \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 RTL<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/44\/f4\/00\/44f40036e8bb133f95f1bb9bef513d02.png\" alt=\"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 TPU \u043f\u043e RTL-\u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\" title=\"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 TPU \u043f\u043e RTL-\u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\" width=\"2640\" height=\"1730\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/44\/f4\/00\/44f40036e8bb133f95f1bb9bef513d02.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/44\/f4\/00\/44f40036e8bb133f95f1bb9bef513d02.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 TPU \u043f\u043e RTL-\u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0433\u043b\u0443\u0431\u0436\u0435, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 openTPU \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"256\" width=\"256\">\n<p>\u041f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430<\/p>\n<\/th>\n<th data-colwidth=\"145\" width=\"145\">\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438<\/p>\n<\/th>\n<th>\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>PCIe \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"145\" width=\"145\">\n<p align=\"left\"><code>xdma_0<\/code>, <code>sc_ctl<\/code>, <code>u_ctrl<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 PCIe Gen2 \u00d78.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"145\" width=\"145\">\n<p align=\"left\"><code>u_trace<\/code>, <code>xadc_temp<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0410\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438 \u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b FPGA.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u044f\u0434\u0440\u043e<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"145\" width=\"145\">\n<p align=\"left\"><code>u_slice<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0441\u0435\u043a\u0432\u0435\u043d\u0441\u043e\u0440, \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c, DMA, VPU, \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0442\u043e\u0440 \u0438 MXU.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>\u0421\u0435\u043a\u0432\u0435\u043d\u0441\u043e\u0440<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"145\" width=\"145\">\n<p align=\"left\"><code>u_seq<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0427\u0438\u0442\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043d\u0430 4096 \u0441\u043b\u043e\u0432 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>\u0420\u0430\u0431\u043e\u0447\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"145\" width=\"145\">\n<p align=\"left\"><code>u_tmem<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0425\u0440\u0430\u043d\u0438\u0442 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b FP32: 64 \u0442\u044b\u0441\u044f\u0447\u0438 \u0441\u043b\u043e\u0432, \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 256 \u041a\u0438\u0411. \u0414\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432 \u0447\u0442\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0448\u0435\u0441\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043f\u0438\u0439.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>\u0412\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"145\" width=\"145\">\n<p align=\"left\"><code>u_vpu<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443 FP32, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>\u041a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0442\u043e\u0440<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"145\" width=\"145\">\n<p align=\"left\"><code>u_quant<\/code>, <code>u_act<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 FP32 \u0432 INT8 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044f.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>\u041c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"145\" width=\"145\">\n<p align=\"left\"><code>u_mxu<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 512 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0435\u0441\u0430 \u043f\u043e 1024-\u0431\u0438\u0442\u043d\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0430\u043c\u044f\u0442\u0438<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"145\" width=\"145\">\n<p align=\"left\"><code>u_mem<\/code>, <code>u_ch0<\/code>, <code>u_ch1<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u044f\u0434\u0440\u0430 \u043a \u0434\u0432\u0443\u043c \u043a\u0430\u043d\u0430\u043b\u0430\u043c DDR3, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043d\u0435\u043f\u043e\u043b\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 host DMA<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"145\" width=\"145\">\n<p align=\"left\"><code>u_split<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f XDMA \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043a\u0430\u043d\u0430\u043b\u0430\u043c\u0438 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b DDR3<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"145\" width=\"145\">\n<p align=\"left\"><code>u_ld<\/code>, LiteDRAM, VexRiscv<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u043e\u0439 \u0438 ECC.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"256\" width=\"256\">\n<p align=\"left\"><strong>\u0412\u043d\u0435\u0448\u043d\u044f\u044f \u043f\u0430\u043c\u044f\u0442\u044c<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"145\" width=\"145\">\n<p align=\"left\">DDR3 \u043a\u0430\u043d\u0430\u043b 0 \u0438 \u043a\u0430\u043d\u0430\u043b 1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u0432\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u043a\u0430\u043d\u0430\u043b\u0430 \u043f\u043e 2 \u0413\u0438\u0411, \u043a\u0430\u0436\u0434\u044b\u0439 \u0441 64 \u0431\u0438\u0442\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 8 \u0431\u0438\u0442\u0430\u043c\u0438 ECC.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/details>\n<p>\u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0440\u0435\u0436\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0442\u043e\u043a\u0435\u043d\u044b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u043f\u043b\u0430\u0442\u0443. \u0414\u0430\u043b\u044c\u0448\u0435 \u0432\u0441\u0451 \u043d\u0430 FPGA: \u0432\u0441\u0435 28 \u0441\u043b\u043e\u0451\u0432 (\u043d\u0430 \u0441\u0445\u0435\u043c\u0435 &#8212; Qwen3-0.6B), \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043d\u043e\u0440\u043c\u044b, \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 Q, K, V, \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0438 MLP, \u043f\u043b\u044e\u0441 KV-\u043a\u044d\u0448 \u0432 \u0442\u043e\u0439 \u0436\u0435 DDR3. \u0412 \u043a\u043e\u043d\u0446\u0435 LM head \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043e\u0446\u0435\u043d\u043a\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u043b\u043e\u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044f, \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0442\u043e\u043a\u0435\u043d &#8212; \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0435\u0436\u0438\u043c\u0430 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 \u0438\u043b\u0438 \u043d\u0430 \u0445\u043e\u0441\u0442\u0435. \u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u0442\u0435\u043a\u0441\u0442.<\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u043e\u0435: \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0442\u043e\u043a\u0435\u043d\u0435 \u0432\u0435\u0441\u0430 \u043f\u043e PCIe \u043d\u0435 \u0445\u043e\u0434\u044f\u0442, \u043e\u043d\u0438 \u0443\u0436\u0435 \u043b\u0435\u0436\u0430\u0442 \u0432 DDR3 \u043f\u043b\u0430\u0442\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0437\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0451\u0434, PCIe x1 \u0432\u043c\u0435\u0441\u0442\u043e x8 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/61\/e2\/6c\/61e26c0ea8b5d2a066ad05de3c2e6b35.png\" alt=\" \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430: \u0447\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u043b\u0430\u0442\u0430, \u0430 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440  \" title=\" \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430: \u0447\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u043b\u0430\u0442\u0430, \u0430 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440  \" width=\"2440\" height=\"2696\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/61\/e2\/6c\/61e26c0ea8b5d2a066ad05de3c2e6b35.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/61\/e2\/6c\/61e26c0ea8b5d2a066ad05de3c2e6b35.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430: \u0447\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u043b\u0430\u0442\u0430, \u0430 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440  <\/figcaption><\/div>\n<\/figure>\n<hr\/>\n<p><a class=\"anchor\" name=\"5\" id=\"5\"><\/a><\/p>\n<h3>5. \u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043d\u0430 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0435<\/h3>\n<p>\u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 floorplan \u0438 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u0438\u0442\u044c \u044f\u0434\u0440\u043e. <\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/f8\/07\/d1\/f807d10ff011cf0647586beef8ae8bdc.png\" alt=\"TPU \u043d\u0430 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0435 (\u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f) : \u0433\u0434\u0435 \u043b\u0435\u0436\u0430\u0442 \u0431\u043b\u043e\u043a\u0438 \" title=\"TPU \u043d\u0430 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0435 (\u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f) : \u0433\u0434\u0435 \u043b\u0435\u0436\u0430\u0442 \u0431\u043b\u043e\u043a\u0438 \" width=\"2170\" height=\"1947\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/f8\/07\/d1\/f807d10ff011cf0647586beef8ae8bdc.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/f8\/07\/d1\/f807d10ff011cf0647586beef8ae8bdc.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>TPU \u043d\u0430 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0435 (\u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f) : \u0433\u0434\u0435 \u043b\u0435\u0436\u0430\u0442 \u0431\u043b\u043e\u043a\u0438 <\/figcaption><\/div>\n<\/figure>\n<p>\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0432\u043e\u0434\u043a\u0438 \u0432 Vivado. \u041a\u0440\u0438\u0441\u0442\u0430\u043b\u043b \u0440\u0430\u0437\u0431\u0438\u0442 \u043d\u0430 \u043c\u0435\u043b\u043a\u0438\u0435 \u043a\u043b\u0435\u0442\u043a\u0438; \u043a\u043b\u0435\u0442\u043a\u0430 \u043e\u043a\u0440\u0430\u0448\u0435\u043d\u0430 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0435\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e. \u0421\u0435\u0440\u044b\u0435 \u043a\u043b\u0435\u0442\u043a\u0438 &#8212; \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0430. <\/p>\n<p>\u041d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u0442\u044f\u043d\u0443\u043b\u0430\u0441\u044c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0430 &#8212; \u0442\u0443\u0434\u0430, \u0433\u0434\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 DSP. TMEM \u043b\u0435\u0433\u043b\u0430 \u0432\u0434\u043e\u043b\u044c \u043a\u043e\u043b\u043e\u043d\u043e\u043a BRAM. \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b DDR3 \u043f\u0440\u0438\u0436\u0430\u043b\u0438\u0441\u044c \u043a \u043d\u043e\u0436\u043a\u0430\u043c \u043f\u0430\u043c\u044f\u0442\u0438, XDMA &#8212; \u043a \u0442\u0440\u0430\u043d\u0441\u0438\u0432\u0435\u0440\u0430\u043c PCIe. Vivado \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0435 \u043a\u0443\u0447\u043a\u043e\u0439, \u0430 \u0442\u0443\u0434\u0430, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0435\u043c\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0438 \u043f\u043e\u0442\u043e\u043c \u0432\u0441\u0451 \u044d\u0442\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u043e\u0434\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0430. \u041e\u0442\u0441\u044e\u0434\u0430 \u0438 19 \u043f\u0438\u043a\u043e\u0441\u0435\u043a\u0443\u043d\u0434 &#8212; \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435. <\/p>\n<h4>\u041a\u0442\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043d\u044f\u043b<\/h4>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/62\/f8\/34\/62f8349415823d4accb6308ce8050b99.png\" alt=\"\u041a\u0442\u043e \u043a\u0430\u043a\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043a\u0430\u043c\u043d\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442\" title=\"\u041a\u0442\u043e \u043a\u0430\u043a\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043a\u0430\u043c\u043d\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442\" width=\"2355\" height=\"2170\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/62\/f8\/34\/62f8349415823d4accb6308ce8050b99.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/62\/f8\/34\/62f8349415823d4accb6308ce8050b99.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041a\u0442\u043e \u043a\u0430\u043a\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043a\u0430\u043c\u043d\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/a0\/2f\/53\/a02f535a5e1ad74135621b1e61e1574e.png\" alt=\" \u0414\u043e\u043b\u044f \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0430 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u0443  \" title=\" \u0414\u043e\u043b\u044f \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0430 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u0443  \" width=\"940\" height=\"778\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/a0\/2f\/53\/a02f535a5e1ad74135621b1e61e1574e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/a0\/2f\/53\/a02f535a5e1ad74135621b1e61e1574e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u0414\u043e\u043b\u044f \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0430 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u0443  <\/figcaption><\/div>\n<\/figure>\n<p>BRAM \u0441\u0447\u0438\u0442\u0430\u044e \u0432 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u0430\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u043f\u043e 36 \u041a\u0431\u0438\u0442: \u0431\u043b\u043e\u043a \u043d\u0430 18 \u041a\u0431\u0438\u0442 &#8212; \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u043a\u0430, \u043e\u0442\u0441\u044e\u0434\u0430 \u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430.<\/p>\n<p><strong>\u0421\u0430\u043c\u044b\u0439 \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0431\u043b\u043e\u043a \u043f\u043e \u043b\u043e\u0433\u0438\u043a\u0435 &#8212; \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0439, \u0430 \u043d\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u0430.<\/strong> VPU &#8212; 39 \u0442\u044b\u0441. LUT, \u0432 \u043f\u043e\u043b\u0442\u043e\u0440\u0430 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 MXU. \u0421\u0430\u043c\u0438 512 \u044f\u0447\u0435\u0435\u043a \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043d\u0435 \u0442\u0440\u0430\u0442\u044f\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e LUT: \u0432\u0441\u044f \u0438\u0445 \u043b\u043e\u0433\u0438\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 DSP. \u0410 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u0440\u0435\u043d\u044c \u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432 fp32 \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0438\u0437 \u0446\u0435\u043f\u043e\u0447\u0435\u043a \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435-\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 &#8212; \u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 \u0441 \u044d\u0442\u0430\u043b\u043e\u043d\u043e\u043c \u0431\u0438\u0442 \u0432 \u0431\u0438\u0442, \u043d\u043e \u0441\u0442\u043e\u044f\u0442 \u0434\u043e\u0440\u043e\u0433\u043e.<\/p>\n<p><strong>\u0420\u0430\u0431\u043e\u0447\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0441\u044a\u0435\u043b\u0430 40 % \u0432\u0441\u0435\u0445 BRAM \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0430.<\/strong> 384 \u0431\u043b\u043e\u043a\u0430. \u0414\u0430\u043d\u043d\u044b\u0435 TMEM \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0448\u0435\u0441\u0442\u0438 \u043a\u043e\u043f\u0438\u044f\u0445, \u0447\u0442\u043e\u0431\u044b \u0448\u0435\u0441\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0435 \u0441\u0442\u043e\u044f\u043b\u0438 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c: \u0431\u043b\u043e\u043a\u0438 BRAM \u0434\u0432\u0443\u0445\u043f\u043e\u0440\u0442\u043e\u0432\u044b\u0435, \u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0442\u0435\u043d\u0438\u0435 \u043f\u043e\u043a\u0443\u043f\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043f\u0438\u044f\u043c\u0438.<\/p>\n<p><strong>\u0414\u043e\u0440\u043e\u0433\u0430 \u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043e\u0440\u043e\u0436\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b.<\/strong> LiteDRAM, \u043c\u043e\u0441\u0442 \u0438 \u043a\u0430\u043d\u0430\u043b\u044b DDR3 &#8212; 47 \u0442\u044b\u0441. LUT, 16 % \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0430. \u041c\u0430\u0442\u0440\u0438\u0446\u0430 &#8212; 8 %.<\/p>\n<p>\u0418 \u0435\u0449\u0451: \u0441\u043b\u0430\u0439\u0441\u044b \u0437\u0430\u043d\u044f\u0442\u044b \u043d\u0430 76 %, \u0445\u043e\u0442\u044f LUT &#8212; \u043d\u0430 59 %.<br \/> \u00ab\u0421\u0432\u043e\u0431\u043e\u0434\u043d\u043e 40 %\u00bb &#8212; \u0438\u043b\u043b\u044e\u0437\u0438\u044f, \u043c\u0435\u0441\u0442\u0430 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/0a\/29\/b5\/0a29b5aa391aca9a776f5a78fe66b2d8.png\" alt=\"\u041d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438\" title=\"\u041d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438\" width=\"2416\" height=\"1034\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/0a\/29\/b5\/0a29b5aa391aca9a776f5a78fe66b2d8.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/0a\/29\/b5\/0a29b5aa391aca9a776f5a78fe66b2d8.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/5b\/fd\/17\/5bfd17bbeb0f8dbc64b1f655613ee7a0.png\" alt=\" \u0427\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0440\u0451\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439  \" title=\" \u0427\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0440\u0451\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439  \" width=\"1487\" height=\"810\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/5b\/fd\/17\/5bfd17bbeb0f8dbc64b1f655613ee7a0.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/5b\/fd\/17\/5bfd17bbeb0f8dbc64b1f655613ee7a0.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u0427\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0440\u0451\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439  <\/figcaption><\/div>\n<\/figure>\n<p> \u041a\u0442\u043e \u0441\u044a\u0435\u043b \u043c\u043e\u0438 \u0432\u0430\u0442\u0442\u044b? \u041a\u0443\u0434\u0430, \u043f\u043e \u043e\u0446\u0435\u043d\u043a\u0435 Vivado, \u0443\u0445\u043e\u0434\u044f\u0442 9,7 \u0432\u0430\u0442\u0442\u0430<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/4c\/f5\/d6\/4cf5d68d0aba984230c2b51561cc2c91.png\" alt=\" \u041a\u0443\u0434\u0430 \u0443\u0445\u043e\u0434\u0438\u0442 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c: \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044f\u043c\" title=\" \u041a\u0443\u0434\u0430 \u0443\u0445\u043e\u0434\u0438\u0442 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c: \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044f\u043c\" width=\"2229\" height=\"1026\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/4c\/f5\/d6\/4cf5d68d0aba984230c2b51561cc2c91.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/4c\/f5\/d6\/4cf5d68d0aba984230c2b51561cc2c91.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u041a\u0443\u0434\u0430 \u0443\u0445\u043e\u0434\u0438\u0442 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c: \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044f\u043c<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/74\/8a\/89\/748a89b3bc9be9f8ba1de29100c28752.png\" alt=\" \u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430\" title=\" \u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430\" width=\"1124\" height=\"771\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/74\/8a\/89\/748a89b3bc9be9f8ba1de29100c28752.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/74\/8a\/89\/748a89b3bc9be9f8ba1de29100c28752.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u042d\u0442\u043e \u043e\u0446\u0435\u043d\u043a\u0430 Vivado \u0431\u0435\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 (<code>Confidence: Low<\/code>), \u0430 \u043d\u0435 \u0432\u0430\u0442\u0442\u043c\u0435\u0442\u0440. \u041d\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f:<\/p>\n<ul>\n<li>\n<p><strong>\u042f\u0434\u0440\u043e openTPU &#8212; 3,1 \u0412\u0442, \u043c\u0435\u043d\u044c\u0448\u0435 \u0442\u0440\u0435\u0442\u0438.<\/strong> \u041f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u044f\u0434\u0440\u0430 \u0431\u0435\u0440\u0451\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u0430: 1,59 \u0412\u0442, \u0438\u0437 \u043d\u0438\u0445 0,76 &#8212; \u0435\u0451 DSP.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0432\u044f\u0437\u044c \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043c\u0438\u0440\u043e\u043c &#8212; \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0432\u0441\u0435\u0433\u043e.<\/strong> \u0412\u043e\u0441\u0435\u043c\u044c \u043b\u0438\u043d\u0438\u0439 GTX \u0434\u043b\u044f PCIe &#8212; 2,5 \u0412\u0442, \u043d\u043e\u0436\u043a\u0438 DDR3 &#8212; 1,3 \u0412\u0442, \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0447\u0430\u0441\u0442\u043e\u0442 &#8212; 0,7 \u0412\u0442. \u041c\u043e\u0441\u0442 PCIe \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043e\u0446\u0435\u043d\u0451\u043d \u0432 3,5 \u0412\u0442 &#8212; \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u044f\u0434\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0442\u043b\u0430\u0434\u043a\u0430 \u0441\u0442\u043e\u0438\u0442 \u043a\u0430\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0442\u043e\u0440.<\/strong> \u0410\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0431\u0435\u0440\u0451\u0442 0,17 \u0412\u0442. \u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0441\u0431\u043e\u0440\u043a\u0438 <code>TRACE_DEPTH = 0<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u044b DDR3 \u0438 \u043f\u043e\u0442\u0435\u0440\u0438 \u043d\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0445 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u0432 \u043e\u0446\u0435\u043d\u043a\u0443 \u043d\u0435 \u0432\u0445\u043e\u0434\u044f\u0442, \u0442\u0430\u043a \u0447\u0442\u043e 9,7 \u0412\u0442 &#8212; \u044d\u0442\u043e \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b, \u0430 \u043d\u0435 \u043f\u043b\u0430\u0442\u0430.<\/p>\n<h4>133 \u041c\u0413\u0446 \u0438 19 \u043f\u0438\u043a\u043e\u0441\u0435\u043a\u0443\u043d\u0434<\/h4>\n<p>\u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u0438\u0441\u0430\u043b\u0438, \u0447\u0442\u043e 133 \u041c\u0413\u0446 \u0434\u043b\u044f Kintex-7 &#8212; \u00ab\u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u0430\u00bb \u0438 \u043d\u0430\u0434\u043e \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0432 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440. \u042f \u043e\u0442\u043a\u0440\u044b\u043b \u0445\u0443\u0434\u0448\u0438\u0435 \u043f\u0443\u0442\u0438.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/5c\/c8\/7b\/5cc87ba36e415ff2bf98ee0f5cc4658d.png\" alt=\" \u0428\u0435\u0441\u0442\u044c \u0445\u0443\u0434\u0448\u0438\u0445 \u043f\u0443\u0442\u0435\u0439 \u044f\u0434\u0440\u0430\" title=\" \u0428\u0435\u0441\u0442\u044c \u0445\u0443\u0434\u0448\u0438\u0445 \u043f\u0443\u0442\u0435\u0439 \u044f\u0434\u0440\u0430\" width=\"1466\" height=\"646\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/5c\/c8\/7b\/5cc87ba36e415ff2bf98ee0f5cc4658d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/5c\/c8\/7b\/5cc87ba36e415ff2bf98ee0f5cc4658d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u0428\u0435\u0441\u0442\u044c \u0445\u0443\u0434\u0448\u0438\u0445 \u043f\u0443\u0442\u0435\u0439 \u044f\u0434\u0440\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0448\u0435\u0441\u0442\u0438 \u0445\u0443\u0434\u0448\u0438\u0445 \u043f\u0443\u0442\u044f\u0445 \u044f\u0434\u0440\u0430 <strong>\u043d\u0435\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043b\u043e\u0433\u0438\u043a\u0438<\/strong>. \u0421\u0438\u0433\u043d\u0430\u043b \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430 \u0438 \u0441\u0440\u0430\u0437\u0443 \u0438\u0434\u0451\u0442 \u0432\u043e \u0432\u0445\u043e\u0434 DSP, BRAM \u0438\u043b\u0438 LUT-RAM &#8212; \u0438 95\u201397 % \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u043e\u0434. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0432\u0435\u0441\u043e\u0432 \u2192 \u0432\u0445\u043e\u0434 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f \u044f\u0447\u0435\u0439\u043a\u0438 \u2116 46: 4,61 \u043d\u0441, \u0438\u0437 \u043d\u0438\u0445 4,37 \u043d\u0441 &#8212; \u0434\u043e\u0440\u043e\u0433\u0430 \u0447\u0435\u0440\u0435\u0437 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/89\/89\/78\/89897846c22e8da2e21696f63481d709.png\" alt=\" \u0422\u0430\u043a\u0442\u043e\u0432\u044b\u0435 \u0434\u043e\u043c\u0435\u043d\u044b\" title=\" \u0422\u0430\u043a\u0442\u043e\u0432\u044b\u0435 \u0434\u043e\u043c\u0435\u043d\u044b\" width=\"1467\" height=\"577\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/89\/89\/78\/89897846c22e8da2e21696f63481d709.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/89\/89\/78\/89897846c22e8da2e21696f63481d709.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u0422\u0430\u043a\u0442\u043e\u0432\u044b\u0435 \u0434\u043e\u043c\u0435\u043d\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0432 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0438, \u0430 \u0432 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f: \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440, \u0440\u0430\u0437\u0434\u0430\u044e\u0449\u0438\u0439 \u0432\u0435\u0441\u0430, \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u0447\u0430\u0441\u0442\u0438 \u044f\u0447\u0435\u0435\u043a. \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0443\u043f\u0435\u043d\u0435\u0439 \u0432 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 &#8212; \u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0435 \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u043e: \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435, \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432. \u041d\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0434\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u043c\u0430\u043b\u043e: \u043f\u043e\u0440\u0442 \u0432\u0435\u0441\u043e\u0432 \u0443\u0436\u0435 \u0440\u0430\u0432\u0435\u043d \u043f\u0438\u043a\u0443 DDR3, \u0438 \u0431\u0435\u0437 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u0442. \u042d\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u0438 \u0432 \u0437\u0430\u043c\u0435\u0440\u0430\u0445 \u043d\u0438\u0436\u0435.<\/p>\n<p> \u0412\u0442\u043e\u0440\u0430\u044f \u0431\u0435\u0434\u0430 &#8212; \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0435. \u0420\u0435\u043a\u043e\u0440\u0434\u0441\u043c\u0435\u043d &#8212; \u0441\u0438\u0433\u043d\u0430\u043b \u00ab\u0441\u0442\u043e\u043f\/\u0445\u043e\u0434\u00bb \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430: \u043e\u043d \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 6 585 \u0432\u0445\u043e\u0434\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0443 \u0437\u0430 \u043e\u0434\u0438\u043d \u0442\u0430\u043a\u0442, Vivado \u0441\u0442\u0440\u043e\u0438\u0442 \u0446\u0435\u043b\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043a\u043e\u043f\u0438\u0439 \u0438 \u0431\u0443\u0444\u0435\u0440\u043e\u0432. \u0422\u0430\u0439\u043c\u0438\u043d\u0433 \u043e\u043d \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u043b, \u043d\u043e \u0435\u0441\u043b\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c, \u0442\u0430\u043a\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u0432\u044b\u0440\u0430\u0441\u0442\u0443\u0442 \u043f\u0435\u0440\u0432\u044b\u043c\u0438. <\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/5f\/fa\/d5\/5ffad5cf4030c7dd802d4319678f8a86.png\" alt=\"\u0421\u0438\u0433\u043d\u0430\u043b\u044b \u0441 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u043c fanout \u0432 TPU \u043f\u043e\u0441\u043b\u0435 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 Vivado\" title=\"\u0421\u0438\u0433\u043d\u0430\u043b\u044b \u0441 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u043c fanout \u0432 TPU \u043f\u043e\u0441\u043b\u0435 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 Vivado\" width=\"2381\" height=\"852\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/5f\/fa\/d5\/5ffad5cf4030c7dd802d4319678f8a86.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/5f\/fa\/d5\/5ffad5cf4030c7dd802d4319678f8a86.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u0438\u0433\u043d\u0430\u043b\u044b \u0441 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u043c fanout \u0432 TPU \u043f\u043e\u0441\u043b\u0435 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 Vivado<\/figcaption><\/div>\n<\/figure>\n<hr\/>\n<p><a class=\"anchor\" name=\"6\" id=\"6\"><\/a><\/p>\n<h4>6. \u041f\u043e\u0433\u043e\u043d\u044f\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c\u043a\u0438 ? <\/h4>\n<p> \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0430\u043c\u0443\u044e \u043b\u0451\u0433\u043a\u0443\u044e &#8212; \u0443\u0441\u0442\u0430\u043b \u0443\u0436\u0435:<\/p>\n<pre><code class=\"bash\">hf download LiquidAI\/LFM2.5-230M \\  --local-dir models\/LFM2.5-230M<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<pre><code class=\"bash\">otpu-chat \\  --backend board \\  --model lfm2 \\  --wformat fp4 \\  --head-format int8 \\  --greedy \\  --max-new 64 \\  --prompt \"What is an FPGA? Answer in three sentences.\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/ba\/10\/b4\/ba10b47e635492dba0a5404ffa6678fc.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\" width=\"1791\" height=\"189\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/ba\/10\/b4\/ba10b47e635492dba0a5404ffa6678fc.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/ba\/10\/b4\/ba10b47e635492dba0a5404ffa6678fc.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/figcaption><\/div>\n<\/figure>\n<p> \u0418 \u043f\u043b\u0430\u0442\u0430 \u043e\u0442\u0432\u0435\u0442\u0438\u043b\u0430 &#8212; \u0423\u0421\u041f\u0415\u0428\u0418\u0429\u0415, \u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0438!!!!  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: <strong>94,91 \u0442\u043e\u043a\u0435\u043d\u0430\/\u0441 \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0445\u043e\u0441\u0442\u0430 \u0438 99,4 \u0442\u043e\u043a\u0435\u043d\u0430\/\u0441 \u043f\u043e \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430\u043c FPGA<\/strong>. \u0412\u0440\u0435\u043c\u044f \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 &#8212; 1,39 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u041d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u044f\u0434\u0440\u043e \u0442\u0440\u0430\u0442\u0438\u0442 \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c 1,34 \u043c\u043b\u043d \u0442\u0430\u043a\u0442\u043e\u0432 \u043f\u0440\u0438 133 \u041c\u0413\u0446.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0438 \u0441 \u0447\u0430\u0442\u0438\u043a\u043e\u043c<\/p>\n<pre><code class=\"bash\">cd ~\/OTPU_habr\/openTPUsource .venv\/bin\/activateotpu-chat \\  --backend board \\  --dev \/dev\/xdma0 \\  --model lfm2 \\  --wformat fp4 \\  --head-format int8 \\  --greedy \\  --cap 2048 \\  --max-new 256<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/39\/58\/e3\/3958e362f3974e671971889bc4ac74d8.png\" alt=\"\u0441\u0430\u043c \u0447\u0430\u0442\u0438\u043a\" title=\"\u0441\u0430\u043c \u0447\u0430\u0442\u0438\u043a\" width=\"1425\" height=\"1091\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/39\/58\/e3\/3958e362f3974e671971889bc4ac74d8.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/39\/58\/e3\/3958e362f3974e671971889bc4ac74d8.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0441\u0430\u043c \u0447\u0430\u0442\u0438\u043a<\/figcaption><\/div>\n<\/figure>\n<p>\u0410 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 <code>otpu-smi<\/code> \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 &#8212; \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0438\u0437 \u0441\u0430\u043c\u043e\u0439 \u043f\u043b\u0430\u0442\u044b:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/2c\/f5\/98\/2cf5985b8daa0b45462fc53ad01eff0f.png\" alt=\" otpu-smi: \u0436\u0438\u0432\u044b\u0435 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438 \u043f\u043b\u0430\u0442\u044b - \u043c\u0430\u0442\u0440\u0438\u0446\u0430, \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0439 \u0431\u043b\u043e\u043a, DMA \u0438 DDR3  \" title=\" otpu-smi: \u0436\u0438\u0432\u044b\u0435 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438 \u043f\u043b\u0430\u0442\u044b - \u043c\u0430\u0442\u0440\u0438\u0446\u0430, \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0439 \u0431\u043b\u043e\u043a, DMA \u0438 DDR3  \" width=\"1063\" height=\"320\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/2c\/f5\/98\/2cf5985b8daa0b45462fc53ad01eff0f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/2c\/f5\/98\/2cf5985b8daa0b45462fc53ad01eff0f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> otpu-smi: \u0436\u0438\u0432\u044b\u0435 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438 \u043f\u043b\u0430\u0442\u044b &#8212; \u043c\u0430\u0442\u0440\u0438\u0446\u0430, \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0439 \u0431\u043b\u043e\u043a, DMA \u0438 DDR3  <\/figcaption><\/div>\n<\/figure>\n<p> \u041e\u0434\u0438\u043d \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e\u0431 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0440\u0438\u044f:<\/p>\n<ul>\n<li>\n<p><strong>8 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/strong> \u043e\u0442 230 \u043c\u043b\u043d \u0434\u043e 4 \u043c\u043b\u0440\u0434 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432: LFM2.5-230M, Qwen3-0.6B, Qwen3.5-0.8B, Qwen3.5-2B, LFM2-2.6B, SmolLM3-3B, Phi-4-mini, Qwen3.5-4B;<\/p>\n<\/li>\n<li>\n<p><strong>2 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0432\u0435\u0441\u043e\u0432<\/strong> &#8212; 4 \u0431\u0438\u0442\u0430 (FP4) \u0438 int8, LM head \u0432\u0435\u0437\u0434\u0435 int8;<\/p>\n<\/li>\n<li>\n<p><strong>11 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432<\/strong>: \u043f\u0440\u043e\u043c\u043f\u0442 \u043e\u0442 33 \u0434\u043e 824 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442 64 \u0434\u043e 1024, \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 512 \/ 1024 \/ 2048, \u043f\u043e\u0432\u0442\u043e\u0440 \u00ab\u043d\u0430 \u0442\u0451\u043f\u043b\u0443\u044e\u00bb.<\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>bench_all_opentpu.py<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">#!\/usr\/bin\/env python3\"\"\"openTPU Kintex-7 comprehensive benchmark: serial, resumable, non-destructive.Uses otpu-chat + native otpu-smi --json -l 0.5. Does NOT flash or change RTL.\"\"\"import argparse, csv, datetime, hashlib, json, os, pathlib, platform, re, shlex, shutil, signal, subprocess, sys, timeROOT = pathlib.Path.home() \/ 'openTPU-main'# Actual folder names already used by this project. Case insensitive resolution also supported.MODELS = [ ('lfm230','LFM2.5-230M','dense'), ('qwen06','Qwen3-0.6B','dense'), ('qwen08','Qwen3.5-0.8B','dense'), ('qwen17','Qwen3-1.7B','experimental'), ('qwen2','Qwen3.5-2B','dense'), ('lfm26','LFM2-2.6B','dense'), ('smol3','SmolLM3-3B','dense'), ('phi4','Phi-4-mini-instruct','dense'), ('qwen4','Qwen3.5-4B','dense'), ('gemmaE2','gemma-4-E2B-it','special'), ('gemmaE4','gemma-4-E4B-it','special'), ('lfm8','LFM2.5-8B-A1B','moe'),]# Only model\/format pairs known to fit in card's 4GiB image or supported by the project.# \"default\" lets openTPU choose its model-specific mixed layout (Gemma).FP4_FORMATS = [('fp4','int8')]INT8_OK = {'lfm230','qwen06','qwen08','qwen2','lfm26','smol3','phi4'}FP4_ONLY = {'qwen4','qwen17','lfm8'}TTFT = re.compile(r'TTFT\\s+([\\d.]+)s;')PREFILL = re.compile(r'prefill\\s+(\\d+)\\s+tokens,\\s+([\\d.]+)\\s+\\(device\\s+([\\d.]+)\\)\\s+tok\/s')DECODE = re.compile(r'decode\\s+(\\d+)\\s+tokens,\\s+([\\d.]+)\\s+\\(device\\s+([\\d.]+)\\)\\s+tok\/s,\\s+([\\d.]+)\\s+Mcycles\/token')NUM = (int,float)FIELDS = ['id','model','group','scenario','wformat','head_format','prompt_target_words', 'actual_prefill_tokens','cap','max_new','repeat','status','exit_code','elapsed_s', 'ttft_s','prefill_wall_tps','prefill_device_tps','decode_tokens','decode_wall_tps', 'decode_device_tps','mcycles_per_token','cache_files_before','cache_files_after', 'cache_bytes_before','cache_bytes_after','smi_samples','smi_active_samples', 'smi_running_time_s','dram_read_gbs','dram_write_gbs','dram_total_gbs', 'dram_read_peak_gbs','dram_write_peak_gbs','mxu_busy_pct','mxu_mac_pct', 'vpu_busy_pct','qnt_busy_pct','dma_busy_pct','tmem_deny_pct','dram_wait_pct', 'mxu_starve_pct','temperature_mean_c','temperature_max_c', 'power_mean_w', 'error','folder']COUNTER_KEYS = ('RUNNING','MXU_BUSY','MXU_MAC','VPU_BUSY','QNT_BUSY',                'DMA_BUSY','TMEM_DENY','DRAM_WAIT','MXU_STARVE')def now(): return datetime.datetime.now().isoformat(timespec='seconds')def jsondump(path,obj):    tmp=path.with_suffix(path.suffix+'.tmp')    tmp.write_text(json.dumps(obj,ensure_ascii=False,indent=2,default=str),encoding='utf-8')    tmp.replace(path)def models_present(root):    base=root\/'models'    if not base.exists():return {}    candidates={p.name.lower():p for p in base.iterdir() if p.is_dir()}    return {key:candidates.get(name.lower()) for key,name,_ in MODELS}def valid_checkpoint(p):    if not p or not (p\/'config.json').is_file(): return False    return bool(list(p.glob('*.safetensors')) or list(p.glob('*.bin')))def cache_snapshot(path):    try:        return {'files':sum(1 for p in path.rglob('*') if p.is_file()),                'bytes':sum(p.stat().st_size for p in path.rglob('*') if p.is_file())}    except (OSError,PermissionError): return {'files':None,'bytes':None}def iter_json(path):    dec=json.JSONDecoder()    if not path.exists():return    with path.open('r',errors='replace') as f:        buf=''        while True:            data=f.read(262144)            if data:buf+=data            pos=0            while pos&lt;len(buf):                while pos&lt;len(buf) and buf[pos].isspace():pos+=1                if pos==len(buf):break                try: obj,end=dec.raw_decode(buf,pos)                except ValueError:break                pos=end                if isinstance(obj,list):                    for item in obj:                        if isinstance(item,dict):yield item                elif isinstance(obj,dict):yield obj            buf=buf[pos:]            if not data:breakdef telemetry(path):    rec=list(iter_json(path)); utilrows=[]    for r in rec:        u=r.get('util') or {}        if not isinstance(u,dict):continue        # running is a status AT sample end; RUNNING fractional utilization detects        # sub-500ms kernel launches and is more reliable for LLM token-by-token decode.        run=u.get('RUNNING')        sec=(r.get('sample') or {}).get('seconds')        if isinstance(run,NUM) and run&gt;0 and isinstance(sec,NUM) and sec&gt;0:            utilrows.append((r, float(sec)*float(run)))    out={'smi_samples':len(rec),'smi_active_samples':len(utilrows),         'smi_running_time_s':round(sum(w for _,w in utilrows),5)}    # Weighted average for active device-cycle metrics. Each r['util'][k] is a    # wall-time fraction over sampling period; dividing by RUNNING gives percent    # of cycles running, clipped only for occasional sampling noise.    run_s=out['smi_running_time_s']    if run_s&gt;0:        for k in COUNTER_KEYS[1:]:            vals=[]            for r,w in utilrows:                u=r['util']; sec=r['sample']['seconds']                if isinstance(u.get(k),NUM): vals.append((float(u[k])*sec, w))            if vals:                val=100*sum(x for x,_ in vals)\/sum(w for _,w in vals)                out[k.lower()+'_pct']=round(val,3)        for source,target in [('dram_rd_gbs','dram_read_gbs'),                              ('dram_wr_gbs','dram_write_gbs'),                              ('dram_gbs','dram_total_gbs')]:            vals=[]            for r,w in utilrows:                val=r.get(source)                if isinstance(val,NUM): vals.append((float(val)*r['sample']['seconds'],w))            if vals:out[target]=round(sum(v for v,_ in vals)\/sum(w for _,w in vals),4)    for source,target in [('dram_rd_gbs','dram_read_peak_gbs'),                          ('dram_wr_gbs','dram_write_peak_gbs')]:        vals=[r[source] for r,_ in utilrows if isinstance(r.get(source),NUM)]        if vals:out[target]=round(max(vals),4)    temps=[r.get('temp_c') for r in rec if isinstance(r.get('temp_c'),NUM)]    if temps:        out['temperature_mean_c']=round(sum(temps)\/len(temps),3)        out['temperature_max_c']=round(max(temps),3)    # Power is optional and not available with --no-i2c on some cards.    power=[r.get('power') for r in rec if isinstance(r.get('power'),NUM)]    if power:out['power_mean_w']=round(sum(power)\/len(power),3)    return outdef prompt_words(n):    # Repeated meaningful English text. \"n\" is an approximate WORD target,    # NOT a guaranteed token count; the device's actual prefill count is recorded.    base=('Explain field programmable gate arrays, matrix multiplication, neural network '          'inference, quantized weights, memory bandwidth, PCI Express, and streaming '          'computations. Discuss real hardware bottlenecks with practical examples. ')    words=(base*max(1, (n\/\/20)+2)).split()    return ' '.join(words[:n]) + ' Continue with a detailed technical explanation.'def matrix(selected,profile,format_test,include_moe):    # Stable deterministic order, group by MODEL to reuse host quant cache.    for key,name,group in MODELS:        if key not in selected:continue        if group=='moe' and not include_moe:continue        forms=[(None,None)] if group=='special' else list(FP4_FORMATS)        if group=='special' and key=='gemmaE2':forms=[('fp4','int8'),('fp4','fp4')]        if format_test and key in INT8_OK:forms.append(('int8','int8'))        for wf,hf in forms:            label=(wf or 'default')+'_'+(hf or 'default')            # quick=2 tests\/model, standard=6-8 tests\/model, full=14+ tests\/model            scenarios=[('baseline',64,256,1024,1),('warm',64,256,1024,2)]            if profile in ('standard','full'):                scenarios += [('short_prefill',16,256,1024,1),                              ('long_prefill',128,256,1024,1),                              ('short_decode',64,64,1024,1),                              ('long_decode',64,512,1024,1)]            if profile=='full':                scenarios += [('prefill_128',128,256,1024,1),                              ('prefill_512',512,256,2048,1),                              ('decode_1024',64,1024,2048,1),                              ('cap_512',64,256,512,1),                              ('cap_2048',64,256,2048,1)]            for typ,words,new,cap,repeat in scenarios:                yield {'id':f'{key}_{label}_{typ}','key':key,'model':name,'group':group,                       'scenario':typ,'wformat':wf or 'default',                       'head_format':hf or 'default','prompt_target_words':words,                       'cap':cap,'max_new':new,'repeat':repeat}def terminate(proc):    if proc is None or proc.poll() is not None:return    try:proc.send_signal(signal.SIGINT);proc.wait(timeout=3)    except (OSError,subprocess.TimeoutExpired):        proc.terminate()        try:proc.wait(timeout=4)        except subprocess.TimeoutExpired:proc.kill();proc.wait()def benchmark(case,root,folder,env,args,path):    row={k:v for k,v in case.items() if k in FIELDS}; row['folder']=str(folder)    model_dir=path[case['key']]    if not valid_checkpoint(model_dir):        row.update(status='missing',error='Missing complete checkpoint\/config; no download is attempted')        return row    folder.mkdir(parents=True,exist_ok=True)    cmd=[str(root\/'.venv\/bin\/otpu-chat'),'--backend','board','--dev',args.device,         '--model',str(model_dir),'--cap',str(case['cap']), '--max-new',         str(case['max_new']),'--greedy','--prompt',prompt_words(case['prompt_target_words'])]    if case['wformat']!='default':cmd.extend(['--wformat',case['wformat']])    if case['head_format']!='default':cmd.extend(['--head-format',case['head_format']])    meta={'command':cmd,'started_at':now(), 'env':{k:env.get(k) for k in          ('OTPU_IMAGE_CACHE','OTPU_DMA_CHUNK_KIB','OPENBLAS_NUM_THREADS')},          'checkpoint':str(model_dir)}    jsondump(folder\/'command.json',meta)    cb=cache_snapshot(pathlib.Path(env['OTPU_IMAGE_CACHE']))    row['cache_files_before']=cb['files'];row['cache_bytes_before']=cb['bytes']    start=time.monotonic(); smi=None    try:        with (folder\/'smi.json').open('w',buffering=1) as sf, \\             (folder\/'smi.stderr.log').open('w') as se, \\             (folder\/'chat.log').open('w',buffering=1) as cf:            smi=subprocess.Popen([str(root\/'.venv\/bin\/otpu-smi'),'--dev',args.device,                                  '--no-i2c','--json','-l',str(args.interval)],                                 cwd=root,env=env,stdout=sf,stderr=se)            time.sleep(min(0.2,args.interval))            try:                result=subprocess.run(cmd,cwd=root,env=env,stdout=cf,                                      stderr=subprocess.STDOUT,timeout=args.timeout)                row['exit_code']=result.returncode                row['status']='ok' if result.returncode==0 else 'failed'            except subprocess.TimeoutExpired:                row.update(status='timeout',exit_code=-1,error='otpu-chat timed out')            finally:terminate(smi)    except Exception as e:        terminate(smi)        row.update(status='failed',error=repr(e))    row['elapsed_s']=round(time.monotonic()-start,3)    ca=cache_snapshot(pathlib.Path(env['OTPU_IMAGE_CACHE']))    row['cache_files_after']=ca['files'];row['cache_bytes_after']=ca['bytes']    content=(folder\/'chat.log').read_text(errors='replace') if (folder\/'chat.log').exists() else ''    for regex,keys in ((TTFT,['ttft_s']),                       (PREFILL,['actual_prefill_tokens','prefill_wall_tps','prefill_device_tps']),                       (DECODE,['decode_tokens','decode_wall_tps','decode_device_tps','mcycles_per_token'])):        mat=regex.search(content)        if mat:            for k,v in zip(keys,mat.groups()):row[k]=int(v) if k in ('actual_prefill_tokens','decode_tokens') else float(v)    try:row.update(telemetry(folder\/'smi.json'))    except Exception as e:row['error']=(row.get('error','')+'; SMI parse: '+repr(e))    if row.get('status')=='ok' and not row.get('decode_tokens'):        row['status']='no_metrics';row['error']='Process returned 0 but decode metrics not found; check chat.log'    jsondump(folder\/'result.json',row)    return rowdef main():    ap=argparse.ArgumentParser(description=__doc__)    ap.add_argument('--root',type=pathlib.Path,default=ROOT)    ap.add_argument('--device',default='\/dev\/xdma0')    ap.add_argument('--profile',choices=['quick','standard','full'],default='standard')    ap.add_argument('--models',nargs='+',default=['lfm230','qwen06','qwen08','qwen2','lfm26','smol3','phi4','qwen4'],                    help='Short model IDs; see --list')    ap.add_argument('--include-moe',action='store_true')    ap.add_argument('--all-formats',action='store_true',help='Enable INT8 comparison where known')    ap.add_argument('--timeout',type=int,default=1800)    ap.add_argument('--interval',type=float,default=0.5)    ap.add_argument('--output',type=pathlib.Path)    ap.add_argument('--list',action='store_true')    ap.add_argument('--dry-run',action='store_true')    args=ap.parse_args();root=args.root.expanduser().resolve();paths=models_present(root)    valid_ids={k for k,_,_ in MODELS}    invalid=set(args.models)-valid_ids    if invalid:ap.error('Unknown model IDs: '+', '.join(sorted(invalid)))    if args.list:        for k,n,g in MODELS:print(f'{k:10} {g:14} {\"READY\" if valid_checkpoint(paths[k]) else \"MISSING\":8} {n}')        return    if not args.include_moe and 'lfm8' in args.models:        ap.error('For MoE add --include-moe (pool generation and offload may be slow)')    cases=list(matrix(set(args.models),args.profile,args.all_formats,args.include_moe))    print('Planned:',len(cases),'tests (sequential).')    if args.dry_run:        for i,c in enumerate(cases,1):print(f'{i:3} {c[\"id\"]}: cap={c[\"cap\"]} new={c[\"max_new\"]} words={c[\"prompt_target_words\"]}')        return    for binary in ('otpu-chat','otpu-smi'):        if not (root\/'.venv\/bin'\/binary).exists():ap.error('Missing '+binary+' in '+str(root\/'.venv\/bin'))    # --device is a logical XDMA prefix; Linux creates \/dev\/xdma0_user,    # \/dev\/xdma0_h2c_0, \/dev\/xdma0_c2h_0 (not \/dev\/xdma0).    device_prefix = pathlib.Path(args.device)    if not device_prefix.exists():        required = [pathlib.Path(args.device + suffix)                    for suffix in ('_user', '_h2c_0', '_c2h_0')]        missing = [str(path) for path in required if not path.is_char_device()]        if missing:            ap.error('XDMA device nodes missing: ' + ', '.join(missing))    env=os.environ.copy()    env.setdefault('OTPU_IMAGE_CACHE',str(pathlib.Path.home()\/'otpu-qcache'))    env.setdefault('OTPU_DMA_CHUNK_KIB','1024')    env.update(OPENBLAS_NUM_THREADS='1',MKL_NUM_THREADS='1',OMP_NUM_THREADS='1')    out=(args.output or root\/'benchmarks'\/'llm'\/('all_'+datetime.datetime.now().strftime('%Y%m%d_%H%M%S'))).expanduser().resolve()    out.mkdir(parents=True,exist_ok=True)    inventory={'created_at':now(),'hostname':platform.node(),'platform':platform.platform(),               'python':sys.version,'profile':args.profile,'device':args.device,               'model_directories':{k:str(v) if v else None for k,v in paths.items()},               'quant_image_cache':env['OTPU_IMAGE_CACHE'],'dma_chunk_kib':env['OTPU_DMA_CHUNK_KIB'],               'cases_planned':len(cases),'notes':[                   'Native otpu-smi JSON; RUNNING util fraction detects sub-interval kernels.',                   'DRAM\/MXU active-cycle estimates exclude idle intervals; no phase tagging.',                   'Prompts specified by words; actual tokens taken from otpu-chat log.',                   'FP4 cache persists across invocations; every process may reupload board image.',                   'Temperature includes host quantization\/loading time; I2C power disabled.',                   'Missing metrics are blank, never zero-filled.']}    jsondump(out\/'manifest.json',inventory)    results={}    if (out\/'results.jsonl').exists():        for line in (out\/'results.jsonl').read_text().splitlines():            try:r=json.loads(line);results[r['id']]=r            except (ValueError,KeyError):pass    for i,case in enumerate(cases,1):        if case['id'] in results:            print(f'[{i}\/{len(cases)}] SKIP completed {case[\"id\"]}',flush=True)            continue        print(f'[{i}\/{len(cases)}] {now()} {case[\"id\"]}',flush=True)        row=benchmark(case,root,out\/case['id'],env,args,paths)        results[case['id']]=row        with (out\/'results.jsonl').open('a') as f:f.write(json.dumps(row,ensure_ascii=False)+'\\n')        with (out\/'summary.csv').open('w',newline='') as f:            w=csv.DictWriter(f,FIELDS,extrasaction='ignore');w.writeheader()            for c in cases:                if c['id'] in results:w.writerow(results[c['id']])        jsondump(out\/'summary.json',[results[c['id']] for c in cases if c['id'] in results])        print('     ',row['status'],row.get('decode_wall_tps','\u2014'),'tok\/s',              'DDR3 RD',row.get('dram_read_gbs','\u2014                                '),'GB\/s',              'Tmax',row.get('temperature_max_c','\u2014'),'C',flush=True)        if row['status']=='timeout':            print('Timeout: stopping suite to avoid hardware\/driver issues. Resume with same --output.',file=sys.stderr)            break    print('Results:',out,flush=True)if __name__=='__main__':main()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a:<\/p>\n<pre><code class=\"bash\">python bench_all_opentpu.py \\  --root \"$PWD\" \\  --device \/dev\/xdma0 \\  --profile full \\  --all-formats \\  --timeout 1800 \\  --interval 0.5 \\  2&gt;&amp;1 | tee bench_165.log<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0418\u0442\u043e\u0433\u043e 165 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432, \u0432\u0441\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0438\u0441\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e, 3 \u0447\u0430\u0441\u0430 16 \u043c\u0438\u043d\u0443\u0442. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u0447\u0438\u0442\u0430\u043b \u043f\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430\u043c \u0442\u0430\u043a\u0442\u043e\u0432 \u0441\u0430\u043c\u043e\u0439 \u043f\u043b\u0430\u0442\u044b, \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0431\u043b\u043e\u043a\u043e\u0432 \u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0435 \u043f\u043e\u043b\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0441\u043d\u0438\u043c\u0430\u043b <code>otpu-smi<\/code>. <\/p>\n<p>\u041e\u0433\u043e\u0432\u043e\u0440\u043a\u0430: \u00ab\u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a\u00bb \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0438 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0438 \u0432\u044b\u0434\u0430\u043b\u0438 \u0442\u0435\u043a\u0441\u0442. \u041f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0441 \u044d\u0442\u0430\u043b\u043e\u043d\u043e\u043c \u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 (103 \u0442\u0435\u0441\u0442\u0430 \u0432\u044b\u0448\u0435), \u0430 \u043d\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 165 \u043e\u0442\u0432\u0435\u0442\u043e\u0432.<\/p>\n<h4>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438<\/h4>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/02\/3d\/75\/023d75e4a14f6c6c828aa758c01712df.png\" alt=\" \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0443 \u043f\u043b\u0430\u0442\u044b\" title=\" \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0443 \u043f\u043b\u0430\u0442\u044b\" width=\"1411\" height=\"811\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/02\/3d\/75\/023d75e4a14f6c6c828aa758c01712df.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/02\/3d\/75\/023d75e4a14f6c6c828aa758c01712df.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0443 \u043f\u043b\u0430\u0442\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c &#8212; \u043f\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0443 \u0442\u0430\u043a\u0442\u043e\u0432 \u043f\u043b\u0430\u0442\u044b (device), \u0442\u043e \u0435\u0441\u0442\u044c \u0431\u0435\u0437 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u0445\u043e\u0441\u0442\u0430; \u0443 \u0430\u0432\u0442\u043e\u0440\u0430 \u0432\u0437\u044f\u0442\u044b \u0442\u043e\u0436\u0435 device-\u0446\u0438\u0444\u0440\u044b. \u0421 \u0445\u043e\u0441\u0442\u043e\u043c \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0447\u0443\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435: \u0443 Qwen3.5-2B 12,40 \u043f\u0440\u043e\u0442\u0438\u0432 12,5. \u041f\u0440\u043e\u043c\u043f\u0442 \u043e\u043a\u043e\u043b\u043e 770 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, 256 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438; \u0443 \u0430\u0432\u0442\u043e\u0440\u0430 \u043f\u0440\u043e\u043c\u043f\u0442 512 \u0438 64 \u0442\u043e\u043a\u0435\u043d\u0430, \u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0435\u0433\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u0430\u043a \u043e\u043d \u0441\u0430\u043c \u043f\u0438\u0448\u0435\u0442, \u0441\u043d\u044f\u0442\u044b \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u0430\u0445 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438.<\/p>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u043e\u0441\u0442\u0438, \u0430 \u043d\u0435 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0435. \u041d\u0430 \u0432\u0441\u0435\u0445 15 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u0445 \u043c\u043e\u0438 \u0446\u0438\u0444\u0440\u044b \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0445 \u0438\u043b\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435: \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 +1\u20264 %, \u043d\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 +10\u202614 %.<\/p>\n<p>\u0420\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 512, 1024 \u0438\u043b\u0438 2048 \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442. \u0414\u043b\u0438\u043d\u043d\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f (1024 \u0442\u043e\u043a\u0435\u043d\u0430 \u0432\u043c\u0435\u0441\u0442\u043e 256) \u0443 Qwen3.5-2B \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e, \u0443 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 Qwen3-0.6B \u0434\u0430\u0451\u0442 \u043c\u0438\u043d\u0443\u0441 5 %: \u0440\u0430\u0441\u0442\u0443\u0449\u0438\u0439 KV-\u043a\u044d\u0448 \u0437\u0430\u043c\u0435\u0442\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0444\u043e\u043d\u0435 \u043b\u0451\u0433\u043a\u0438\u0445 \u0432\u0435\u0441\u043e\u0432.<\/p>\n<h4>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u0438\u0435 \u0446\u0438\u0444\u0440\u044b: \u043f\u043e\u0442\u043e\u043b\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438<\/h4>\n<p>\u041f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u043f\u043b\u0430\u0442\u0430 \u0447\u0438\u0442\u0430\u0435\u0442 \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u0441\u0435 \u0432\u0435\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0438. \u0417\u043d\u0430\u0447\u0438\u0442:<\/p>\n<p><strong>\u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u2264 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438 \u00f7 \u0431\u0430\u0439\u0442, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0442\u043e\u043a\u0435\u043d<\/strong><\/p>\n<p>\u0421\u0447\u0451\u0442\u0447\u0438\u043a\u0438 \u043f\u043b\u0430\u0442\u044b \u044d\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0442. \u041f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 DDR3 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u043d\u0430 <strong>92-96 % \u043f\u0438\u043a\u0430<\/strong>: \u043e\u0442 15,7 \u0413\u0411\/\u0441 \u0443 \u0441\u0430\u043c\u043e\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e 16,4 \u0413\u0411\/\u0441 \u0443 Phi-4-mini \u0432 int8. Qwen3.5-2B \u0432 4 \u0431\u0438\u0442\u0430\u0445 \u0447\u0438\u0442\u0430\u0435\u0442 1,29 \u0413\u0411 \u043d\u0430 \u0442\u043e\u043a\u0435\u043d \u043f\u0440\u0438 16,1 \u0413\u0411\/\u0441 &#8212; \u043e\u0442\u0441\u044e\u0434\u0430 12,5 \u0442\u043e\u043a\/\u0441. \u0412\u0441\u0435 15 \u0442\u043e\u0447\u0435\u043a \u043b\u043e\u0436\u0430\u0442\u0441\u044f \u0432\u0434\u043e\u043b\u044c \u043e\u0434\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438:<\/p>\n<p> \u041e\u0442\u0441\u044e\u0434\u0430 \u0436\u0435 \u0432\u0438\u0434\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 4 \u0431\u0438\u0442\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 int8 \u043d\u0435 \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430, \u0430 \u0432 1,4-1,8: LM head \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0432 int8, \u043f\u043b\u044e\u0441 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u044b \u0438 KV-\u043a\u044d\u0448. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u043e\u0432\u043d\u043e \u0432\u043e \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u0432\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0451\u043c \u0447\u0442\u0435\u043d\u0438\u044f \u043d\u0430 \u0442\u043e\u043a\u0435\u043d.<\/p>\n<p>\u0410 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0432 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043d\u044f\u0442\u0430 99,9 % \u0442\u0430\u043a\u0442\u043e\u0432, \u0438\u0437 \u043d\u0438\u0445 82\u201393 % \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u0442, \u0438 \u0436\u0434\u0451\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0441\u0435\u0433\u043e 0,1-2,8 %. \u041f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u044f \u043d\u0435\u0442: \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u043e\u043c, \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u0430\u0438\u0432\u0430\u0435\u0442 &#8212; \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0435\u0441\u0430 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0440\u043e\u0432\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<h4>\u041d\u0430 \u0447\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u0441\u0430\u043c\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0430: 121 GOPS<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043e\u0442 \u043f\u0430\u043c\u044f\u0442\u0438, \u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0433\u043e\u043d\u044f\u043b \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 int8 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432: M \u0441\u0442\u0440\u043e\u043a \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432\u0435\u0441\u043e\u0432 N \u00d7 N, \u043f\u043e \u043f\u044f\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0432\u0435\u0440\u044f\u043b\u0441\u044f \u0441 \u044d\u0442\u0430\u043b\u043e\u043d\u043e\u043c \u043d\u0430 CPU.<\/p>\n<details class=\"spoiler\">\n<summary>benchmark_gemm_fpga.py<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">#!\/usr\/bin\/env python3\"\"\"Real-board openTPU GEMM benchmark. No LLM, no RTL simulation, no bitstream change.Uses runtime.compile_kernel() -&gt; ISA assembler -&gt; Board.load_program()\/run().Counts device cycles from hardware R_CYCLES; separately measures host wall time.\"\"\"import argparseimport csvimport jsonimport mathimport sysimport timefrom pathlib import Pathimport numpy as npfrom opentpu import isa as Ifrom opentpu import language as olfrom opentpu.host.board import Board, XdmaTransport, device_configfrom opentpu.runtime import Input, Output, Weight, compile_kernel@ol.jitdef gemm(x, w, out):    # x[M,K] * w[N,K].T -&gt; y[M,N]; W8A8, block-quantized MXU.    q = ol.quantize(ol.load(x))    ol.store(out, ol.dot(q, w))def main():    ap = argparse.ArgumentParser(description=__doc__)    ap.add_argument('--dev', default='\/dev\/xdma0')    ap.add_argument('--sizes', default='128,512,1024,2048', help='N=K sizes, multiples of D=128')    ap.add_argument('--rows', default='1,4,8', help='M rows')    ap.add_argument('--repeats', type=int, default=5)    ap.add_argument('--max-rel-error', type=float, default=0.08,                    help='Relative L2 norm error vs fp32 NumPy (quantized W8A8)')    ap.add_argument('--out', default=None, help='Results directory')    a = ap.parse_args()    if a.repeats &lt; 1:        ap.error('--repeats must be &gt;= 1')    root = Path(a.out or ('benchmarks\/gemm_' + time.strftime('%Y%m%d_%H%M%S')))    root.mkdir(parents=True, exist_ok=True)    csv_path = root \/ 'results.csv'    config_path = root \/ 'board.json'    sizes = [int(v) for v in a.sizes.split(',')]    rows = [int(v) for v in a.rows.split(',')]    print('openTPU physical FPGA GEMM', flush=True)    print(f'Device: {a.dev}; Results: {root}', flush=True)    with Board(XdmaTransport(a.dev)) as board:        info = board.info()        # Restrict *host-side staging image* to 16 MiB, not physical installed DRAM.        # The actual board keeps its full DDR3; our data and code occupy only this area.        cfg = device_config(info, DRAM_BYTES=16 &lt;&lt; 20)        core_hz = info['core_khz'] * 1000        config_path.write_text(json.dumps({            'device': a.dev, 'core_hz': core_hz, 'D': cfg.D, 'MCOLS': cfg.MCOLS,            'LANES': cfg.LANES, 'DRAM_BYTES_host_image': cfg.DRAM_BYTES,            'sizes': sizes, 'rows': rows, 'repeats': a.repeats,            'note': 'GOPS assumes 2 operations per MAC; W8A8 quantized GEMM'        }, indent=2))        if not info['calibrated']:            raise RuntimeError('DDR3 not calibrated')        print(f\"Core {core_hz\/1e6:.3f} MHz, D={cfg.D}, MCOLS={cfg.MCOLS}, \"              f\"LANES={cfg.LANES}; ECC calibrated={info['calibrated']}\", flush=True)        print('FPGA locked. Compiling and running hardware GEMM...', flush=True)        fieldnames = ('M,N,K,repetition,core_cycles,core_ms,host_run_ms,readback_ms,ops,gops_device,rel_l2_error,max_abs_error,verified').split(',')        failures = 0        with csv_path.open('w', newline='') as f:            writer = csv.DictWriter(f, fieldnames=fieldnames)            writer.writeheader()            for N in sizes:                K = N                if K % cfg.D or N % cfg.D:                    raise ValueError(f'N,K must be multiples of D={cfg.D}')                for M in rows:                    if M &lt;= 0 or M &gt; 8:                        raise ValueError('M must be 1..8 for this small-TMEM test')                    rng = np.random.default_rng(1000000 + M * 10000 + N)                    x = rng.normal(size=(M, K)).astype(np.float32)                    w = (rng.normal(size=(N, K)) \/ np.sqrt(K)).astype(np.float32)                    t_compile = time.perf_counter()                    compiled, images = compile_kernel(                        gemm, cfg, x=Input(x), w=Weight(w, shard=0, fmt='int8'),                        out=Output((M, N)))                    instructions = I.assemble(compiled.programs[0])                    # Program stored outside the runtime's data image, inside 16 MiB.                    program_addr = 12 &lt;&lt; 20                    program_bytes = len(instructions) * 4                    if program_addr + program_bytes &gt; cfg.DRAM_BYTES:                        raise RuntimeError('Program exceeds reserved DRAM image')                    # The runtime's allocations start at 0 and stay below 8 MiB for these sizes.                    # Host image includes initialized zeros for ECC-safe subsequent reads.                    if (8 &lt;&lt; 20) &gt; program_addr:                        raise RuntimeError('Invalid layout')                    if np.any(images[0][8 &lt;&lt; 20:program_addr]):                        raise RuntimeError('Data image crosses 8 MiB region; reduce N\/K')                    board.write(0, images[0][:8 &lt;&lt; 20])                    board.load_program(program_addr, instructions)                    result_addr = compiled.layout.params['out'][1]                    if result_addr + M * N * 4 &gt; (8 &lt;&lt; 20):                        raise RuntimeError('Output exceeds initialized 8 MiB')                    ref = x @ w.T                    print(f'M={M:2d}, N=K={N:4d}: compiled in '                          f'{time.perf_counter()-t_compile:.2f}s, program {len(instructions)\/\/8} instr',                          flush=True)                    for rep in range(1, a.repeats + 1):                        t0 = time.perf_counter()                        stats = board.run()                        host_s = time.perf_counter() - t0                        t1 = time.perf_counter()                        got = board.read(result_addr, M * N * 4).view(np.float32).reshape(M, N).copy()                        read_s = time.perf_counter() - t1                        err = float(np.linalg.norm((got-ref).astype(np.float64)) \/                                    max(float(np.linalg.norm(ref.astype(np.float64))), 1e-12))                        abserr = float(np.max(np.abs(got-ref)))                        valid = bool(np.isfinite(got).all() and err &lt;= a.max_rel_error)                        failures += not valid                        cycles = int(stats['cycles'])                        ops = 2 * M * N * K                        device_s = cycles \/ core_hz                        gops = ops \/ device_s \/ 1e9 if cycles else float('nan')                        writer.writerow(dict(M=M, N=N, K=K, repetition=rep, core_cycles=cycles,                            core_ms=round(device_s*1e3,6), host_run_ms=round(host_s*1e3,6),                            readback_ms=round(read_s*1e3,6), ops=ops,                            gops_device=round(gops,6), rel_l2_error=round(err,7),                            max_abs_error=round(abserr,7), verified=int(valid)))                        f.flush()                        print(f'  #{rep}: {cycles} cycles, {device_s*1e3:.3f} ms device, '                              f'{gops:.3f} GOPS, error={err:.5f}, '                              f\"{'PASS' if valid else 'FAIL'}\", flush=True)    print(f'\\nResults CSV: {csv_path}; mismatches: {failures}')    return 1 if failures else 0if __name__ == '__main__':    try:        sys.exit(main())    except Exception as e:        print(f'ERROR: {type(e).__name__}: {e}', file=sys.stderr)        raise<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a:<\/p>\n<pre><code class=\"bash\">cd ~\/OTPU_habr\/openTPUsource .venv\/bin\/activatepython benchmark_gemm_fpga.py \\  --dev \/dev\/xdma0 \\  --sizes 128,512,1024,2048 \\  --rows 1,4,8 \\  --repeats 5 \\  2&gt;&amp;1 | tee gemm_test.log<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/df\/7e\/58\/df7e5803605e56ab0eb9b1839dd2cd6d.png\" alt=\" \u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 int8 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435: 121 GOPS \u043f\u0440\u0438 M = 8, \u0430 \u043f\u0440\u0438 M = 1 \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c  \" title=\" \u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 int8 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435: 121 GOPS \u043f\u0440\u0438 M = 8, \u0430 \u043f\u0440\u0438 M = 1 \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c  \" width=\"1986\" height=\"1099\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/df\/7e\/58\/df7e5803605e56ab0eb9b1839dd2cd6d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/df\/7e\/58\/df7e5803605e56ab0eb9b1839dd2cd6d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 int8 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435: 121 GOPS \u043f\u0440\u0438 M = 8, \u0430 \u043f\u0440\u0438 M = 1 \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c  <\/figcaption><\/div>\n<\/figure>\n<p>GOPS, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 &#8212; \u0434\u0432\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p><strong>\u041f\u0438\u043a \u043c\u0430\u0442\u0440\u0438\u0446\u044b<\/strong> &#8212; 512 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u00d7 133,33 \u041c\u0413\u0446 \u00d7 2 = 136,5 GOPS. \u041d\u0430 2048 \u00d7 2048 \u043f\u0440\u0438 M = 8 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c <strong>121,1 &#8212; 89 % \u043f\u0438\u043a\u0430<\/strong>. \u0414\u043b\u044f FPGA \u0437\u0430 $50 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e.<\/p>\n<p><strong>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 &#8212; \u044d\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439 M = 1<\/strong>: \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0439, \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0435\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \u0412\u0435\u0441\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043f\u043e 128 \u0431\u0430\u0439\u0442 \u0437\u0430 \u0442\u0430\u043a\u0442, \u0442\u043e \u0435\u0441\u0442\u044c 17,07 \u0413\u0411\/\u0441 \u00d7 2 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 = <strong>34,1 GOPS<\/strong> &#8212; \u043f\u043e\u0442\u043e\u043b\u043e\u043a, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u043d\u0438 \u0441\u0442\u0430\u0432\u044c. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043e 31,5, 92 % \u043e\u0442 \u043d\u0435\u0433\u043e. \u0417\u043d\u0430\u0447\u0438\u0442, \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0430\u0442\u044c \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0438\u043a\u0430.<\/p>\n<p>Prefill \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u043c\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432 &#8212; \u0442\u043e\u0442 \u0436\u0435 \u0432\u0435\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a, &#8212; \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u0432 2,5\u20133,5 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041e\u0448\u0438\u0431\u043a\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u044d\u0442\u0430\u043b\u043e\u043d\u0430 &#8212; 0,9 % \u0432\u043e \u0432\u0441\u0435\u0445 60 \u043f\u0440\u043e\u0433\u043e\u043d\u0430\u0445. \u042d\u0442\u043e \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u0430\u043d\u0438\u0435 int8, \u0430 \u043d\u0435 \u0441\u0431\u043e\u0439.<\/p>\n<h4>PCIe \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e.  <\/h4>\n<p>\u042d\u0442\u043e \u043d\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u0435\u0439. \u0415\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043b\u0430\u0442\u044b \u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u043b\u043e\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0441 \u0445\u043e\u0441\u0442\u0430, PCIe \u0441\u043d\u043e\u0432\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0443\u0437\u043a\u0438\u043c \u043c\u0435\u0441\u0442\u043e\u043c.<\/p>\n<h3>\u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u043e\u0434\u0435\u043b\u044c, \u0442\u0435\u043c \u0434\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430  <\/h3>\n<h4>\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430<\/h4>\n<p>\u041a\u0440\u0438\u0441\u0442\u0430\u043b\u043b \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 &#8212; 58 \u00b0C, \u0437\u0430 \u0442\u0440\u0438 \u0447\u0430\u0441\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 &#8212; 59\u201365 \u00b0C, \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c 65,2 \u00b0C. \u0414\u0430\u0442\u0447\u0438\u043a \u043d\u0430 \u0441\u0430\u043c\u043e\u0439 \u043f\u043b\u0430\u0442\u0435 &#8212; 52 \u00b0C. Vivado \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u0435\u0449\u0430\u043b 38,7 \u00b0C, \u043d\u043e \u0435\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u0440\u0438 25 \u00b0C \u0432\u043e\u043a\u0440\u0443\u0433 \u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u043e\u0431\u0434\u0443\u0432\u0435 &#8212; \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0430\u0442\u0447\u0438\u043a \u0447\u0435\u0441\u0442\u043d\u0435\u0435. <\/p>\n<hr\/>\n<p><a class=\"anchor\" name=\"7\" id=\"7\"><\/a><\/p>\n<h3>7. \u0418\u0422\u041e\u0413\u041e<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u0432\u043e\u0442 \u0447\u0442\u043e \u044f \u0432\u044b\u043d\u0435\u0441 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p><strong>\u0423\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0438 &#8212; \u043d\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435.<\/strong> \u0418\u0437 1920 DSP \u0437\u0430\u043d\u044f\u0442\u043e 37 % &#8212; \u0438\u0445 \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u0431\u044b \u0435\u0449\u0451 \u043d\u0430 \u0434\u0432\u0435 \u0442\u0430\u043a\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b. \u041d\u043e \u0441\u043b\u0430\u0439\u0441\u044b \u0437\u0430\u043d\u044f\u0442\u044b \u043d\u0430 76 %, BRAM &#8212; \u043d\u0430 63 %, \u0430 \u0437\u0430\u043f\u0430\u0441 \u043f\u043e \u0442\u0430\u0439\u043c\u0438\u043d\u0433\u0443 &#8212; 19 \u043f\u0438\u043a\u043e\u0441\u0435\u043a\u0443\u043d\u0434. \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c DSP \u043b\u0435\u0433\u043a\u043e, \u0440\u0430\u0437\u0432\u0435\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0438\u0445 &#8212; \u043d\u0435\u0442.<\/p>\n<p><strong>\u041e\u0431\u0432\u044f\u0437\u043a\u0430 \u0441\u0442\u043e\u0438\u0442 \u043a\u0430\u043a \u044f\u0434\u0440\u043e.<\/strong> \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u044f\u0434\u0440\u043e &#8212; \u044d\u0442\u043e 35 % \u0432\u0441\u0435\u0445 LUT \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0430 \u0438 32 % \u0440\u0430\u0441\u0447\u0451\u0442\u043d\u043e\u0439 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438. \u0414\u043e\u0440\u043e\u0433\u0430 \u043a DDR3 &#8212; \u0435\u0449\u0451 16 % LUT \u0438 25 % \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438, PCIe &#8212; \u0432\u0441\u0435\u0433\u043e 6 % LUT, \u043d\u043e 36 % \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u044a\u0435\u0434\u0430\u044e\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0434\u0432\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0430\u0442\u0442, \u0447\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f (\u043e\u0446\u0435\u043d\u043a\u0430 Vivado, \u043d\u0435 \u0432\u0430\u0442\u0442\u043c\u0435\u0442\u0440).<\/p>\n<p><strong>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c.<\/strong> \u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0443\u043c\u0435\u0435\u0442 121 GOPS, \u043d\u043e \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0435\u0439 \u0434\u0430\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0438: DDR3 \u0438 \u0442\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 92\u201396 %.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/fc\/13\/16\/fc1316e5306aa55f7149e9ac51c14e92.png\" alt=\"\u0418\u0442\u043e\u0433\u043e\u00bb: \u00abopenTPU \u043d\u0430 Kintex-7: \u0432\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  \" title=\"\u0418\u0442\u043e\u0433\u043e\u00bb: \u00abopenTPU \u043d\u0430 Kintex-7: \u0432\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  \" width=\"2445\" height=\"2695\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/fc\/13\/16\/fc1316e5306aa55f7149e9ac51c14e92.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/fc\/13\/16\/fc1316e5306aa55f7149e9ac51c14e92.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><strong>\u0418\u0442\u043e\u0433\u043e\u00bb:<\/strong> \u00abopenTPU \u043d\u0430 Kintex-7: \u0432\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  <\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/81\/ca\/ef\/81caefddc5f9340867f7c7c18a9dd74e.png\" alt=\" \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c\" title=\" \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c\" width=\"2054\" height=\"1202\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/81\/ca\/ef\/81caefddc5f9340867f7c7c18a9dd74e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/81\/ca\/ef\/81caefddc5f9340867f7c7c18a9dd74e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 \u043c\u043e\u0435\u0439 \u043f\u043b\u0430\u0442\u0435 \u0432\u0435\u0441\u0430 \u0435\u0434\u0443\u0442 \u043a \u043c\u0430\u0442\u0440\u0438\u0446\u0435 \u043f\u043e \u0434\u0432\u0443\u043c \u043a\u0430\u043d\u0430\u043b\u0430\u043c DDR3 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0430 &#8212; \u043e\u0442\u0441\u044e\u0434\u0430 \u0438 17 \u0413\u0411\/\u0441 \u043f\u043e\u0442\u043e\u043b\u043a\u0430. \u0418\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u044f \u0431\u044c\u0451\u0442\u0441\u044f \u0440\u043e\u0432\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u0436\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043e\u043c \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435, \u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0443 \u043d\u0435\u0451 \u043f\u043e \u0441\u0443\u0442\u0438 \u0442\u0440\u0438.<\/p>\n<p><strong>\u041f\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u043a \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044e.<\/strong> \u042d\u0442\u043e HBM: \u043f\u0430\u043c\u044f\u0442\u044c \u0441\u0442\u0430\u0432\u044f\u0442 \u0441\u0442\u043e\u043f\u043a\u043e\u0439 \u043f\u0440\u044f\u043c\u043e \u0440\u044f\u0434\u043e\u043c \u0441 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u043e\u043c, \u0430 \u0448\u0438\u043d\u0430 \u0443 \u043d\u0435\u0451 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u0432 \u0442\u044b\u0441\u044f\u0447\u0438 \u0431\u0438\u0442, \u0430 \u043d\u0435 64, \u043a\u0430\u043a \u0443 \u043c\u043e\u0435\u0439 DDR3. \u0415\u0449\u0451 \u0434\u0430\u043b\u044c\u0448\u0435 &#8212; \u043a\u043b\u0430\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u0441\u0451 \u044d\u0442\u043e \u0432 3D.<\/p>\n<p><strong>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u043e\u0434\u043d\u0438\u043c \u043a\u0443\u0441\u043a\u043e\u043c.<\/strong> Cerebras \u0432\u044b\u043f\u0438\u043b\u0438\u0432\u0430\u0435\u0442 \u0447\u0438\u043f \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0441 \u0446\u0435\u043b\u0443\u044e \u043a\u0440\u0435\u043c\u043d\u0438\u0435\u0432\u0443\u044e \u043f\u043b\u0430\u0441\u0442\u0438\u043d\u0443: \u043f\u0430\u043c\u044f\u0442\u044c \u0440\u0430\u0441\u043a\u0438\u0434\u0430\u043d\u0430 \u043f\u043e \u0432\u0441\u0435\u0439 \u043f\u043b\u0430\u0441\u0442\u0438\u043d\u0435, \u0438 \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u043d\u0430\u0434\u043e \u043d\u0438\u043a\u0443\u0434\u0430 \u0443\u0435\u0437\u0436\u0430\u0442\u044c \u0441 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0430. \u041d\u0435\u0442 \u043f\u043b\u0430\u0442, \u043d\u0435\u0442 \u0440\u0430\u0437\u044a\u0451\u043c\u043e\u0432, \u043d\u0435\u0442 \u043c\u043e\u0438\u0445 2,5 \u0412\u0442 \u043d\u0430 \u0442\u0440\u0430\u043d\u0441\u0438\u0432\u0435\u0440\u044b PCIe.<\/p>\n<p><strong>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u043e\u0434 \u0434\u0435\u0448\u0435\u0432\u043b\u0435.<\/strong> \u0428\u0438\u0440\u0435, \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0436\u043e\u0443\u043b\u0435\u0439 \u043d\u0430 \u0431\u0438\u0442. \u0422\u0443\u0442 \u0443\u0436\u0435 \u0444\u043e\u0442\u043e\u043d\u0438\u043a\u0430: \u0441\u0432\u0435\u0442 \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u043f\u0430\u043c\u0438, \u0430 \u043f\u043e\u0442\u043e\u043c \u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0438\u0445.<\/p>\n<p>\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0431\u044b\u0432\u0430\u0435\u0442. \u041f\u043b\u043e\u0442\u043d\u0435\u0435 &#8212; \u0437\u043d\u0430\u0447\u0438\u0442, \u0433\u043e\u0440\u044f\u0447\u0435\u0435 \u0438 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0440\u0430\u0437\u0432\u0435\u0441\u0442\u0438. HBM \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u043e\u0442\u043e\u043b\u043e\u043a, \u043d\u043e \u043d\u0435 \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u0435\u0433\u043e. \u041e\u043f\u0442\u0438\u043a\u0430 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u043d\u0430 \u043f\u0440\u043e\u0432\u043e\u0434\u0430\u0445, \u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u043e\u0438\u0445 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432. \u0414\u0430\u043d\u043d\u044b\u0435 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043d\u0430\u0434\u043e \u0432\u043e\u0437\u0438\u0442\u044c &#8212; \u0432\u043e\u043f\u0440\u043e\u0441 \u0442\u043e\u043b\u044c\u043a\u043e, \u043a\u0430\u043a \u0434\u0430\u043b\u0435\u043a\u043e \u0438 \u043f\u043e\u0447\u0451\u043c.<\/p>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u0442\u0430 \u0436\u0435 \u00ab\u0441\u0442\u0435\u043d\u0430 \u043f\u0430\u043c\u044f\u0442\u0438\u00bb, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u0443\u043f\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0443\u0436\u0435 \u043b\u0435\u0442 \u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044c. \u041f\u0440\u043e\u0441\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432 \u043d\u0435\u0451 \u0443\u043f\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u043d\u0435 \u0447\u0435\u0442\u044b\u0440\u0435 \u044f\u0434\u0440\u0430 CPU, \u0430 \u0442\u044b\u0441\u044f\u0447\u0438 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u0440\u0430\u0437\u0443. \u0418\u0434\u0435\u0430\u043b \u043f\u043e\u043d\u044f\u0442\u0435\u043d: \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044f, \u0431\u0435\u0437 \u0437\u0430\u0434\u0435\u0440\u0436\u0435\u043a \u0438 \u043f\u043e\u0447\u0442\u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u043f\u043e \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \u0424\u0438\u0437\u0438\u043a\u0430 \u043d\u0435 \u0434\u0430\u0441\u0442. \u041a\u044d\u0448\u0438, HBM, 3D, \u043f\u043b\u0430\u0441\u0442\u0438\u043d\u044b \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0444\u043e\u0442\u043e\u043d\u0438\u043a\u0430 &#8212; \u044d\u0442\u043e \u0432\u0441\u0451 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043a \u043d\u0435\u043c\u0443 \u043f\u043e\u0431\u043b\u0438\u0436\u0435.<\/p>\n<p>\u0414\u043b\u044f \u043c\u0435\u043d\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 &#8212; \u0447\u0442\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u0442\u0435\u043e\u0440\u0438\u044f. \u042f \u043f\u043e\u0449\u0443\u043f\u0430\u043b \u0441\u0442\u0435\u043d\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 \u0440\u0443\u043a\u0430\u043c\u0438: \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0430 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0435 \u0434\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043b\u0430\u0442\u044b \u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0415\u0441\u0442\u044c \u0446\u0438\u0444\u0440\u044b, \u0435\u0441\u0442\u044c \u0443\u0437\u043a\u0438\u0435 \u043c\u0435\u0441\u0442\u0430 \u0438 \u0435\u0441\u0442\u044c \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435. \u0418 \u0435\u0441\u043b\u0438 \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0435\u043b\u043e \u0434\u043e\u0439\u0434\u0451\u0442 \u0434\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u041a\u0415\u0414\u0420\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043d\u0435 \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u00ab\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439\u00bb, \u0430 \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u00ab\u043a\u0430\u043a \u043f\u043e\u0434\u0432\u0435\u0437\u0442\u0438 \u043a \u043d\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435\u00bb.<\/p>\n<hr\/>\n<p><a class=\"anchor\" name=\"8\" id=\"8\"><\/a><\/p>\n<h3>8. \u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435<\/h3>\n<ul>\n<li>\n<p><strong>BitNet b1.58.<\/strong> \u0420\u0430\u0437 \u0432\u0441\u0451 \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0431\u0430\u0439\u0442\u044b \u043d\u0430 \u0442\u043e\u043a\u0435\u043d, 2-\u0431\u0438\u0442\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 &#8212; \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0439 \u043f\u0443\u0442\u044c: \u043e\u043d\u0438 \u0432 4 \u0440\u0430\u0437\u0430 \u043b\u0435\u0433\u0447\u0435 int8. \u0412 4 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 &#8212; \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u0433\u043e\u043b\u043e\u0432\u0430, \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438, KV-\u043a\u044d\u0448, &#8212; \u043d\u043e \u043f\u043e\u0442\u043e\u043b\u043e\u043a \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u0442\u043d\u043e. RTL \u0438 \u0442\u0435\u0441\u0442\u044b \u0433\u043e\u0442\u043e\u0432\u044b, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c \u043d\u0430 \u043f\u043b\u0430\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0425\u043e\u0441\u0442-\u0441\u0442\u043e\u0440\u043e\u043d\u0430 openTPU.<\/strong> \u041a\u0430\u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0440\u0443\u043b\u0438\u0442 \u043a\u0430\u0440\u0442\u043e\u0439, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0445\u043e\u0434\u0438\u0442 \u043f\u043e PCIe \u0438 \u043a\u0443\u0434\u0430 \u0443\u0445\u043e\u0434\u044f\u0442 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 &#8212; \u0445\u043e\u0447\u0443 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p><strong>YOLO<\/strong> \u043d\u0430 \u0442\u043e\u0439 \u0436\u0435 \u043f\u043b\u0430\u0442\u0435 &#8212; \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p><strong>BCU1525.<\/strong> \u041b\u0435\u0436\u0438\u0442 \u043f\u043b\u0430\u0442\u0430 \u043d\u0430 Virtex UltraScale+ VU9P \u0441 64 \u0413\u0411 DDR4 &#8212; \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0443\u0434\u0430 \u0441\u0434\u0432\u0438\u043d\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043b\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p> \u0413\u0434\u0435-\u0442\u043e \u0432 \u0434\u0430\u043b\u0451\u043a\u043e\u043c \u0431\u0443\u0434\u0443\u0449\u0435\u043c &#8212; \u041a\u0415\u0414\u0420, \u043a\u0443\u0434\u0430 \u0436\u0435 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e. <\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0438\u0434\u0435\u0438, \u0447\u0442\u043e \u0435\u0449\u0451 \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c \u043d\u0430 \u043f\u043b\u0430\u0442\u0435, &#8212; \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<hr\/>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e Felipe Sens Bonetto \u0437\u0430 openTPU &#8212; \u0440\u0435\u0434\u043a\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0439\u0442\u0438 \u043f\u0443\u0442\u044c \u043e\u0442 Python \u0434\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0430. \u0418 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0442\u043e\u0440\u0430\u043c \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438: \u0431\u0435\u0437 \u0432\u0430\u0448\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u044f \u0431\u044b \u043d\u0435 \u043f\u043e\u043b\u0435\u0437 \u043d\u0438 \u0432 floorplan, \u043d\u0438 \u0432 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438 \u043f\u043b\u0430\u0442\u044b.<\/p>\n<p><strong>\u0421\u0441\u044b\u043b\u043a\u0438<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/FeSens\/openTPU\" rel=\"noopener nofollow\">openTPU &#8212; FeSens\/openTPU<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/1092504\/\" rel=\"noopener nofollow\">\u041f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043c\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u0433\u0430: <\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/40\/c5\/27\/40c527d99d8adb5a3c0f2639d5af37c6.png\" alt=\"https:\/\/i.ytimg.com\/vi\/HJkMWw-NWq4\/maxresdefault.jpg\" title=\"https:\/\/i.ytimg.com\/vi\/HJkMWw-NWq4\/maxresdefault.jpg\" width=\"1280\" height=\"720\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/40\/c5\/27\/40c527d99d8adb5a3c0f2639d5af37c6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/40\/c5\/27\/40c527d99d8adb5a3c0f2639d5af37c6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><a href=\"https:\/\/i.ytimg.com\/vi\/HJkMWw-NWq4\/maxresdefault.jpg\" rel=\"noopener nofollow\">https:\/\/i.ytimg.com\/vi\/HJkMWw-NWq4\/maxresdefault.jpg<\/a><\/figcaption><\/div>\n<\/figure>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1095564\/\">https:\/\/habr.com\/ru\/articles\/1095564\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b Qwen \u043d\u0430 \u0441\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 FPGA-\u043f\u043b\u0430\u0442\u0435 \u0437\u0430 $50 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c TPU (openTPU). \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0442\u043e\u0440\u044b \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438: \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0430\u043d\u043e\u043d\u0441, \u0447\u0435\u043c \u0441\u0442\u0430\u0442\u044c\u044f. \u0413\u0434\u0435 \u0441\u0431\u043e\u0440\u043a\u0430, \u0433\u0434\u0435 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b, \u0433\u0434\u0435 \u0437\u0430\u043c\u0435\u0440\u044b, \u043f\u043e\u0447\u0435\u043c\u0443 133 \u041c\u0413\u0446, \u0433\u0434\u0435 \u041a\u0415\u0414\u0420? \u042f, \u043a\u043e\u0433\u0434\u0430 512 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0436\u0434\u0443\u0442, \u043f\u043e\u043a\u0430 DDR3 \u043f\u043e\u0434\u0432\u0435\u0437\u0451\u0442 \u0432\u0435\u0441\u0430.\u041c\u044b \u0441 \u0412\u0430\u043c\u0438 \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0432 Vivado, \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u043c \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044f\u043c, \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u043c 9,7 \u0432\u0430\u0442\u0442\u0430 \u043f\u043e \u0431\u043b\u043e\u043a\u0430\u043c \u0438 \u043f\u0440\u043e\u0433\u043e\u043d\u0438\u043c 165 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 \u0432\u043e\u0441\u044c\u043c\u0438 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0435 \u0442\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f \u0436\u0434\u0430\u043b: \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0438\u0437 512 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0432\u044b\u0434\u0430\u0451\u0442 121 GOPS \u0438\u0437 136,5 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445, \u0430 \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0435\u0439 \u0434\u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0438 &#8212; \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0430\u043c\u044f\u0442\u044c DDR3 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 94 % \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430 \u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u043e\u0434\u0432\u0435\u0437\u0442\u0438 \u0432\u0435\u0441\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442.\u041a\u043e\u0440\u043e\u0442\u043a\u043e\u0416\u0435\u043b\u0435\u0437\u043e: Inspur YPCB-00338, Kintex-7 XC7K480T-2, 2 \u00d7 2 \u0413\u0438\u0411 DDR3-1066, PCIe Gen2 x8.\u041c\u043e\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u0432 Vivado: \u044f\u0434\u0440\u043e 133,33 \u041c\u0413\u0446, \u0437\u0430\u043f\u0430\u0441 \u043f\u043e \u0442\u0430\u0439\u043c\u0438\u043d\u0433\u0443 19 \u043f\u0438\u043a\u043e\u0441\u0435\u043a\u0443\u043d\u0434 (\u044f \u0430\u0434\u0435\u043f\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0428\u0421\u041b\u0410\u041a\u0410, \u043c\u0430\u043b\u043e \u043b\u0438 \u043a\u0442\u043e \u0441 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442). \u0417\u0430\u043d\u044f\u0442\u043e 59 % LUT, 63 % BRAM, 37 % DSP, 76 % \u0441\u043b\u0430\u0439\u0441\u043e\u0432.\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435: 138 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432, \u0442\u0440\u0438 \u043f\u0440\u043e\u0433\u043e\u043d\u0430 \u043f\u043e\u0434\u0440\u044f\u0434. 165 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 LLM, \u0432\u0441\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0438\u0441\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e.\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c: Qwen3.5-2B &#8212; 12,5 \u0442\u043e\u043a\/\u0441, Qwen3-0.6B &#8212; 35, LFM2.5-230M &#8212; 95 (\u0432\u0435\u0441\u0430 4 \u0431\u0438\u0442\u0430).\u0423\u0437\u043a\u043e\u0435 \u043c\u0435\u0441\u0442\u043e: \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, DDR3 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u043d\u0430 92\u201396 %. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 PCIe x1 \u0432\u043c\u0435\u0441\u0442\u043e x8 \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442 (\u043a\u0440\u043e\u043c\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0438\u0437 \u043a\u043e\u043c\u043f\u0430), \u0430 4-\u0431\u0438\u0442\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u0432\u043c\u0435\u0441\u0442\u043e 8-\u0431\u0438\u0442\u043d\u044b\u0445 \u0443\u0441\u043a\u043e\u0440\u044f\u044e\u0442 \u0432 1,4-1,8 \u0440\u0430\u0437\u0430.\u041f\u043e \u0438\u0442\u043e\u0433\u0430\u043c \u043e\u043f\u0440\u043e\u0441\u0430 \u0412\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0445\u043e\u0442\u0435\u043b\u0438 \u0441\u0431\u043e\u0440\u043a\u0443 \u0441 \u043d\u0443\u043b\u044f (59 %) \u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e TPU (51 %), \u0434\u0430\u043b\u044c\u0448\u0435 &#8212; \u0433\u0440\u0430\u0431\u043b\u0438 (37 %), \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c (35 %) \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (29 %). \u0412\u0441\u0451 \u044d\u0442\u043e \u0435\u0441\u0442\u044c, \u0432 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u0448\u043b\u043e \u043e\u0442 \u0436\u0435\u043b\u0435\u0437\u0430 \u043a \u0446\u0438\u0444\u0440\u0430\u043c. \u041f\u0441\u0441\u0441\u2026\u26a1 \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439, \u043a\u0430\u043a Flash, \u041a\u0443\u0434\u0430 \u043f\u0440\u044b\u0433\u0430\u0442\u044c:\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442: 2 (hw) \u0438 3 (sw)\u042f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0437\u0430\u043b\u0438\u043f\u0430\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u044c \u0438 \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u2192 4 \u0438 5\u0426\u0438\u0444\u0440\u042b \u2192 6\u0445\u043e\u0447\u0443 \u0432\u044b\u0432\u043e\u0434, \u0447\u0451 \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u2192 7\u043f\u043e\u043c\u0435\u0447\u0442\u0430\u0435\u043c \u043e \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u2192 8\u041d\u0443 \u0430 \u043a\u0442\u043e \u0437\u0430\u0441\u0435\u043b \u043d\u0430\u0434\u043e\u043b\u0433\u043e \u0438 \u0445\u043e\u0447\u0435\u0442 \u043d\u044b\u0440\u043d\u0443\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0433\u043d\u0430\u043b\u0438)  \u2193 1. \u0416\u0435\u043b\u0435\u0437\u043e \u0438 \u043f\u043e\u0447\u0451\u043c \u043d\u044b\u043d\u0447\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 \u041a\u0415\u0414\u0420\u043e\u043c? \u041f\u043b\u0430\u0442\u0430 \u041f\u043b\u0430\u0442\u0430 \u0441 \u0434\u0432\u0443\u0445 \u0441\u0442\u043e\u0440\u043e\u043d. \u0424\u043e\u0442\u043e  https:\/\/www.tiferking.cn\/index.php\/2024\/12\/19\/650Inspur YPCB-00338 &#8212; \u044d\u0442\u043e \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0441\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0430, \u0441\u043b\u0438\u0432\u0430\u044e\u0442 \u0435\u0435 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u043b\u044e\u0431\u0438\u043c\u043e\u043c  AliExpress \u0438 eBay. \u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0432 \u043d\u0435\u0439 \u0442\u0440\u0438 \u0432\u0430\u0436\u043d\u044b\u0435 \u0432\u0435\u0449\u0438:Kintex-7 XC7K480T-2 (\u0430\u043b\u043c\u0430\u0437\u0438\u043a) &#8212; 299 \u0442\u044b\u0441. LUT, 1920 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 DSP48E1, 955 \u0431\u043b\u043e\u043a\u043e\u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e 36 \u041a\u0431\u0438\u0442 (~ 34 \u041c\u0431\u0438\u0442 \u043d\u0430 \u0432\u0441\u0451\u043c \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0435).\u0414\u0432\u0430 \u043a\u0430\u043d\u0430\u043b\u0430 DDR3-1066 (\u0442\u0435\u043f\u0435\u0440\u044c \u0438 \u0442\u044b \u0430\u043b\u043c\u0430\u0437\u0438\u043a) \u043f\u043e 2 GB, \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 64 \u0431\u0438\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043b\u044e\u0441 8 \u0431\u0438\u0442 ECC. ECC \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u043e\u0442 \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u043e \u043a \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442: \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0431\u0438\u0442 64.PCIe x8, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043b\u0430\u0442\u0430 \u0440\u0430\u0437\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0435\u0442 \u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c.34 \u041c\u0431\u0438\u0442 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0435 &#8212; \u044d\u0442\u043e \u043d\u0438 \u043e \u0447\u0451\u043c \u0434\u043b\u044f LLM: \u0434\u0430\u0436\u0435 Qwen3-0.6B \u0432 4 \u0431\u0438\u0442\u0430\u0445 \u0432\u0435\u0441\u0438\u0442 \u0432 \u0441\u043e\u0442\u043d\u044e \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435. \u0417\u043d\u0430\u0447\u0438\u0442, \u0432\u0435\u0441\u0430 \u0436\u0438\u0432\u0443\u0442 \u0432 DDR3, \u0438, \u0437\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0451\u0434, \u0438\u043c\u0435\u043d\u043d\u043e DDR3 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0412\u044b \u044d\u0442\u043e \u0438 \u0442\u0430\u043a \u0437\u043d\u0430\u0435\u0442\u0435, \u043d\u0435 \u0431\u0443\u0434\u0443 \u0443\u043c\u043d\u0438\u0447\u0430\u0442\u044c.\u0421\u0442\u0435\u043d\u0434\u044b\u041f\u043b\u0430\u0442\u0430 \u043f\u043e\u0431\u044b\u0432\u0430\u043b\u0430 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445 &#8212; \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 PCIe.\u0421\u0442\u0435\u043d\u0434\u0427\u0442\u043e \u044d\u0442\u043ePCIe\u041f\u041a Windows, Intel Core i9-14900KF, 64GB DDR, 4T SSD, Vivado 2024.2.2-A\u0411\u0443\u043a\u0430 \u0434\u043b\u044f \u043d\u043e\u0442 (Notebook), Ubuntu 24.04, \u043f\u043b\u0430\u0442\u0430 \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u0447\u0435\u0440\u0435\u0437 USB4 \u0441 \u0442\u0443\u043d\u043d\u0435\u043b\u0435\u043c PCIe (TH3P4G3), 16GB DDR, 2T SSD, i7-1185G7, \u0431\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f (METALFISH Black Diamond 550M), \u043a\u0430\u0431\u0435\u043b\u044c USB4 Type-C (\u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435 \u0441 TH3P4G3)Gen2x1(Gen2x4)BMINISFORUM MS-A2, Ubuntu 22.04, \u043f\u043b\u0430\u0442\u0430 \u0432 \u0441\u043b\u043e\u0442\u0435, AMD Ryzen 9 9955HX, 64GB DDR, 2T SSDGen2x8\u0412\u0441\u0435 \u0437\u0430\u043c\u0435\u0440\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 &#8212; \u0441\u043e \u0441\u0442\u0435\u043d\u0434\u0430 B, \u0433\u0434\u0435 \u043f\u043b\u0430\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 PCIe.\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u043e\u0438\u0442$50 \u0438\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 &#8212; \u0446\u0435\u043d\u0430 \u0441\u0430\u043c\u043e\u0439 \u043f\u043b\u0430\u0442\u044b ( \u0441\u0430\u043c \u0447\u0438\u043f, \u043a\u0430\u043a \u043f\u043e\u0434\u043c\u0435\u0442\u0438\u043b\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0440\u043e\u0433\u043e). \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0446\u0435\u043d\u044b \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0430\u043c \u0443\u0440\u0432\u0430\u043b. \u041d\u0430 Aliexpress \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043a\u0430\u0442\u044c XC7K480T \u0438 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u043e \u0444\u043e\u0442\u043e \u0438 \u0434\u0440\u0443\u0433\u0438\u043c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u0438 \u0431\u043e\u043b\u0442 \u043f\u0440\u0438\u0441\u043b\u0430\u0442\u044c, \u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u043e\u0435 \u043a\u0430\u043a-\u0442\u043e \u0431\u044b\u043b\u043e :xD.\u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u0442\u0435\u043d\u0434 \u0434\u043e\u0440\u043e\u0436\u0435:\u0427\u0442\u043e\u0426\u0435\u043d\u0430\u041f\u043b\u0430\u0442\u0430 YPCB-00338 ~$50\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430\u043e\u0442 0 \u0434\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 (\u0443 \u043c\u0435\u043d\u044f ~$10 \u0432\u044b\u0448\u043b\u0430) JTAG-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u043e\u0440:~$40 USB4 \u0441 \u0442\u0443\u043d\u043d\u0435\u043b\u0435\u043c PCIe (\u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0410)~$140\u0411\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f (\u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0410)~$85\u041f\u041a \u0431\u044b\u043b\u0418\u0442\u043e\u0433\u043e ~$100, \u0435\u0441\u043b\u0438 \u043f\u043b\u0430\u0442\u0430 \u0432 \u0441\u043b\u043e\u0442\u0435 (\u043f\u043b\u0430\u0442\u0430 50 + \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 10 + JTAG 40). \u0414\u043b\u044f \u0441\u0442\u0435\u043d\u0434\u0430 A \u0447\u0435\u0440\u0435\u0437 USB4 &#8212; \u0435\u0449\u0451 ~$225 \u043d\u0430 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u0438 \u0431\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f. \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0439 \u043a\u0430\u043c\u0435\u043d\u044c &#8212; TH3P4G3 \u043f\u0440\u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0435 \u043f\u043b\u0430\u0442\u044b (\u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e PCIe) \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u0442\u044b, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043b\u0430\u0442\u0443 \u043f\u0440\u043e\u0448\u0438\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u043c\u043e\u0436\u0435\u0442 \u043a\u0430\u043a-\u0442\u043e \u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e, \u043d\u043e \u0447\u0435\u0441\u0442\u043d\u043e \u043d\u0435 \u043a\u043e\u043f\u0430\u043b\u0441\u044f). 2. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441 \u043d\u0443\u043b\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u043c\u043d\u044f\u0427\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438\u0412 Vivado \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e TPU. \u041f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 &#8212; \u044d\u0442\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0435:\u042f\u0434\u0440\u043e openTPU \u043d\u0430 Verilog: \u043c\u0430\u0442\u0440\u0438\u0446\u0430, \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0439 \u0431\u043b\u043e\u043a, \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c, DMA, \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0442\u043e\u0440, \u0441\u0435\u043a\u0432\u0435\u043d\u0441\u043e\u0440.\u041c\u043e\u0441\u0442 PCIe &#8212; IP-\u0431\u043b\u043e\u043a Xilinx XDMA.\u0414\u0432\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 DDR3 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 LiteDRAM \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0433\u043e Xilinx MIG. \u0412\u043d\u0443\u0442\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 RISC-V (VexRiscv) &#8212; \u043e\u043d \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0441\u0430\u043c \u043a\u0430\u043b\u0438\u0431\u0440\u0443\u0435\u0442 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 DDR3. \u0422\u043e \u0435\u0441\u0442\u044c \u043d\u0430 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0435 \u0440\u044f\u0434\u043e\u043c \u0441 TPU \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f \u0435\u0449\u0451 \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e.\u041e\u0431\u0432\u044f\u0437\u043a\u0430: \u043c\u043e\u0441\u0442 \u043e\u0442 \u044f\u0434\u0440\u0430 \u043a \u0434\u0432\u0443\u043c \u043a\u0430\u043d\u0430\u043b\u0430\u043c \u043f\u0430\u043c\u044f\u0442\u0438, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439.\u0421\u0431\u043e\u0440\u043a\u0430git clone https:\/\/github.com\/FeSens\/openTPU.gitcd openTPUgit checkout 8eaa480\u0420\u0435\u0432\u0438\u0437\u0438\u044e \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e: \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0436\u0438\u0432\u043e\u0439, \u0438 \u043d\u0430 \u0441\u0432\u0435\u0436\u0435\u043c main \u0446\u0438\u0444\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f.\u041f\u0435\u0440\u0435\u0434 \u0441\u0442\u0430\u0440\u0442\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Vivado 2024.2 \u0438\u043b\u0438 \u0432\u044b\u0448\u0435 ( \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b, \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u044e\u0430\u043d\u0441\u044b).\u041d\u0430 Windows \u0432\u0441\u0451 \u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u0434\u0438\u043d PowerShell-\u0441\u043a\u0440\u0438\u043f\u0442 &#8212; \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u0440\u043e\u0435\u043a\u0442, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 IP, \u0441\u0438\u043d\u0442\u0435\u0437\u0438\u0440\u0443\u0435\u0442, \u0440\u0430\u0437\u0432\u043e\u0434\u0438\u0442 \u0438 \u043f\u0438\u0448\u0435\u0442 bitstream :run_vivado.ps1param(    [int]$DDR = 1066,    [int]$JOBS = 8,  # \u043a\u0430\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440     [int]$MCOLS = 4,    [int]$VPU_CL = 2,    [int]$LANES = 8,    [int]$ACT_ROWS = 0,    [int]$DSTEP = 1,    [double]$CORE_MHZ = 0,    [int]$PCIE_GEN = 2,    [switch]$FAST,    [switch]$ImplOnly,    [string]$IMPL_STRATEGY = &#171;&#187;,    [string]$BUILD_ID = &#171;00000000&#187;,    # \u0418\u0437\u043c\u0435\u043d\u0438 \u044d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u043f\u043e\u0434 \u0441\u0432\u043e\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443    [string]$Vivado = &#171;C:\\Xilinx\\Vivado\\2024.2\\bin\\vivado.bat&#187;)$ErrorActionPreference = &#171;Stop&#187;$here = Split-Path -Parent $MyInvocation.MyCommand.Path$root = (Resolve-Path (Join-Path $here &#171;..\\..&#187;)).Path$out  = Join-Path $root &#171;build\\vivado&#187;if ($DDR -ne 1066) {    throw &#171;DDR3-$DDR is unsupported. LiteDRAM is generated for DDR3-1066.&#187;}if ($ACT_ROWS -eq 0) {    $ACT_ROWS = $MCOLS}if ($CORE_MHZ -eq 0) {    if ($FAST) {        $CORE_MHZ = 100    } else {        $CORE_MHZ = 133.33    }}if (!(Test-Path $Vivado)) {    throw &#171;Vivado not found: $Vivado&#187;}New-Item -ItemType Directory -Force -Path $out | Out-Null# Environment read by create_project.tcl \/ bd_native.tcl \/ build.tcl$env:PCIE_GEN = &#171;$PCIE_GEN&#187;if ($FAST) {    $env:OTPU_FAST = &#171;1&#187;} else {    $env:OTPU_FAST = &#171;0&#187;}# Optional IP cache$cache = Join-Path $env:LOCALAPPDATA &#171;openTPU\\vivado-ip-cache&#187;New-Item -ItemType Directory -Force -Path $cache | Out-Null$env:OTPU_IP_CACHE = $cache$createTcl = Join-Path $here &#171;vivado\\create_project.tcl&#187;$buildTcl  = Join-Path $here &#171;vivado\\build.tcl&#187;Write-Host &#171;&#187;Write-Host &#171;openTPU Vivado build&#187;Write-Host &#171;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#171;Write-Host &#171;Root       : $root&#187;Write-Host &#171;Output     : $out&#187;Write-Host &#171;DDR        : $DDR&#187;Write-Host &#171;CORE_MHZ   : $CORE_MHZ&#187;Write-Host &#171;MCOLS      : $MCOLS&#187;Write-Host &#171;VPU_CL     : $VPU_CL&#187;Write-Host &#171;LANES      : $LANES&#187;Write-Host &#171;ACT_ROWS   : $ACT_ROWS&#187;Write-Host &#171;DSTEP      : $DSTEP&#187;Write-Host &#171;PCIe Gen   : $PCIE_GEN&#187;Write-Host &#171;FAST       : $FAST&#187;Write-Host &#171;&#187;if (!$ImplOnly) {    Write-Host &#171;=== CREATE PROJECT ===&#187;    &amp; $Vivado `        -mode batch `        -nojournal `        -log (Join-Path $out &#171;create_project.log&#187;) `        -source $createTcl `        -tclargs `            $DDR `            $out `            $MCOLS `            $CORE_MHZ `            $BUILD_ID `            $VPU_CL `            $LANES `            $ACT_ROWS `            $DSTEP    if ($LASTEXITCODE -ne 0) {        throw &#171;Vivado create_project failed: $LASTEXITCODE&#187;    }    Write-Host &#171;&#187;    Write-Host &#171;=== FULL BUILD ===&#187;    &amp; $Vivado `        -mode batch `        -nojournal `        -log (Join-Path $out &#171;build.log&#187;) `        -source $buildTcl `        -tclargs `            $out `            $JOBS `            &#171;full&#187; `            $IMPL_STRATEGY} else {    Write-Host &#171;=== IMPLEMENTATION ONLY ===&#187;    &amp; $Vivado `        -mode batch `        -nojournal `        -log (Join-Path $out &#171;build_impl.log&#187;) `        -source $buildTcl `        -tclargs `            $out `            $JOBS `            &#171;impl&#187; `            $IMPL_STRATEGY}if ($LASTEXITCODE -ne 0) {    throw &#171;Vivado build failed: $LASTEXITCODE&#187;}Write-Host &#171;&#187;Write-Host &#171;================================&#187;Write-Host &#171;DONE&#187;Write-Host &#171;Bitstream: $out\\otpu.bit&#187;Write-Host &#171;MCS      : $out\\otpu.mcs&#187;Write-Host &#171;Reports  : $out\\reports&#187;Write-Host &#171;================================&#187;\u041a\u043b\u0430\u0434\u0451\u043c run_vivado.ps1 (\u0442\u0435\u043a\u0441\u0442 &#8212; \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c \u043d\u0438\u0436\u0435) \u0432 \u043f\u0430\u043f\u043a\u0443 boards\\ypcb-00338.  \u041d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u043f\u043e\u0434 \u043f\u0430\u043f\u043a\u0443 \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f Vivado &#8212; 17 \u0441\u0442\u0440\u043e\u0447\u043a\u0430 ( [string]$Vivado = \u201cC:\\Xilinx\\Vivado\\2024.2\\bin\\vivado.bat\u201d).\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0441\u0451 \u0440\u0430\u0437\u043e\u043c (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0441\u0438\u043d\u0442\u0435\u0437, \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e) \u0438 \u0436\u0434\u0451\u043c\u0441 (\u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0432\u0430\u0448\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u044b).cd boards\\ypcb-00338Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassUnblock-File .\\run_vivado.ps1.\\run_vivado.ps1 Bypass \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0431\u0435\u0437 \u043f\u043e\u0434\u043f\u0438\u0441\u0438, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043e\u043a\u043d\u0435. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438: DDR = 1066, MCOLS = 4 (\u0447\u0435\u0442\u044b\u0440\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043f\u043e 128 \u044f\u0447\u0435\u0435\u043a), LANES = 8 (\u0434\u043e\u0440\u043e\u0436\u043a\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430), CORE_MHZ = 133.333, PCIE_GEN = 2.\u042d\u0442\u0430\u043f\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Vivado \u0438 IP\u0431\u043b\u043e\u043a-\u0434\u0438\u0437\u0430\u0439\u043d, XDMA, \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f IP\u0421\u0438\u043d\u0442\u0435\u0437RTL \u2192 \u043d\u0435\u0442\u043b\u0438\u0441\u0442\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044fplace, phys_opt\u0422\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0430route \u041f\u0440\u043e\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0435 build\\vivado.\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u044d\u0442\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c *.xpr.\u0423 \u043c\u0435\u043d\u044f \u0442\u0430\u043a :\u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 Project Summary:  \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c Project Summary: Window \u2192 Project Summary  \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043a\u043d\u043e \u0443\u0441\u043f\u0435\u0445\u0430, \u0440\u0430\u0437\u0432\u043e\u0434\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430\u0441\u044c, \u0442\u0430\u0439\u043c\u0438\u043d\u0433 \u0441\u043e\u0448\u0451\u043b\u0441\u044f\u042d\u0442\u043e \u0443\u0441\u043f\u0435\u0445\u042d\u0442\u043e \u0443\u0441\u043f\u0435\u0445 \u0432\u0431\u043b\u0438\u0437\u0438\u0417\u0430\u043f\u0430\u0441 19 \u043f\u0438\u043a\u043e\u0441\u0435\u043a\u0443\u043d\u0434 (0.019ns) &#8212; 0,25 % \u0442\u0430\u043a\u0442\u0430. \u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u0432\u043f\u0440\u0438\u0442\u044b\u043a, \u0440\u0430\u0437\u0431\u0435\u0440\u0443 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043f\u0440\u043e \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b.\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0436\u043c\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 Generate Bitstream (\u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u041f\u041b\u0418\u0421) \u0438 \u0436\u0434\u0435\u043c ( \u0443\u0441\u043f\u0435\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043c\u0435\u0447\u0435\u043d \u0442\u0430\u043c \u0436\u0435 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0433\u0430\u043b\u043e\u0447\u043a\u043e\u0439 ) Generate Bitstream &#8212; \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0434\u043b\u044f \u041f\u041b\u0418\u0421  \u041f\u043e\u0441\u043b\u0435 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0441\u043f\u0435\u0445\u0430, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0434\u043b\u044f FLASH. \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Generate Memory &#8230;. \u0432 Tools:  Tools \u2192 Generate Memory&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-499040","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/499040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=499040"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/499040\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=499040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=499040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=499040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}