{"id":282854,"date":"2016-12-22T09:40:09","date_gmt":"2016-12-22T06:40:09","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=282854"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=282854","title":{"rendered":"\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0431\u0438\u0442\u043a\u043e\u0438\u043d\u044b \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043f\u0440\u043e\u0449\u0435 \u0438\u043b\u0438 \u043b\u0435\u0433\u0447\u0435?"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/cdc\/697\/eac\/cdc697eacc7a4bf4907c3b8407279cf7.jpg\"\/><br \/>  \u0412\u0441\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0431\u043b\u0438\u0436\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0431\u0438\u0442\u043a\u043e\u0438\u043d\u0430\u043c\u0438. \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0438\u0445 \u0434\u043e\u0431\u044b\u0432\u0430\u044e\u0442. \u0421\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u043e \u0431\u0438\u0442\u043a\u043e\u0438\u043d\u044b \u0438 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e, \u043d\u043e \u0442\u0430\u043a\u0438\u0445, \u0447\u0442\u043e\u0431\u044b \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u0442\u0430\u043a\u0438\u0445 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e.<\/p>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 \u0434\u0435\u0442\u0430\u043b\u044f\u0445 \u2014 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438. \u042f \u0432\u0437\u044f\u043b\u0441\u044f \u0438\u0437\u0443\u0447\u0430\u0442\u044c Verilog \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 FPGA \u043c\u0430\u0439\u043d\u0435\u0440\u0430: <a href=\"https:\/\/github.com\/progranism\/Open-Source-FPGA-Bitcoin-Miner\">https:\/\/github.com\/progranism\/Open-Source-FPGA-Bitcoin-Miner.git<\/a>. \u042d\u0442\u043e \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043d\u0430 github, \u0438 \u0432\u0441\u0435 \u043e\u043d\u0438, \u0445\u043e\u0442\u044c \u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u0440\u043e\u0432, \u043f\u043e\u0445\u043e\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u0435. \u0412\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u0440 \u0442\u043e \u0443 \u043d\u0438\u0445 \u0432\u0441\u0435\u0445 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u043b \u043e\u0434\u0438\u043d, \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u044e\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0447\u0438\u043f\u044b \u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043b\u0430\u0442\u044b\u2026 \u041f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u043c\u043d\u0435 \u0442\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c\u2026<\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u044f, \u043f\u043e\u0438\u0437\u0443\u0447\u0430\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 Verilog, \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 github \u043a \u043f\u043b\u0430\u0442\u0435 \u041c\u0430\u0440\u0441\u043e\u0445\u043e\u04343 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u041f\u041b\u0418\u0421 Altera MAX10, 50 \u0442\u044b\u0441. \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u042f \u0441\u043c\u043e\u0433 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043c\u0430\u0439\u043d\u0435\u0440 \u0438 \u0434\u0430\u0436\u0435 \u0441\u043c\u043e\u0433 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0431\u0438\u0442\u043a\u043e\u0438\u043d\u043e\u0432, \u043d\u043e \u0431\u0440\u043e\u0441\u0438\u043b \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b \u0447\u0430\u0441\u0430 \u0438\u0437-\u0437\u0430 \u0431\u0435\u0441\u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043f\u043e \u043d\u044b\u043d\u0435\u0448\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0430\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043e\u0439 FPGA \u043c\u0430\u0439\u043d\u0435\u0440. \u041d\u0443 \u0438 \u043f\u0443\u0441\u0442\u044c.<\/p>\n<p>  \u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043c\u0435\u043d\u044f \u0432\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0438 \u043d\u0435 \u0441\u0430\u043c\u0438 \u0431\u0438\u0442\u043a\u043e\u0438\u043d\u044b (\u043d\u0443 \u0438\u0445, \u044d\u0442\u0438 \u0434\u0435\u043d\u0435\u0436\u043d\u044b\u0435 \u0441\u0443\u0440\u0440\u043e\u0433\u0430\u0442\u044b ))), \u043d\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 SHA256. \u0412\u043e\u0442 \u043e\u0431 \u044d\u0442\u043e\u043c \u044f \u0438 \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c. \u042f \u043f\u0440\u043e\u0432\u0435\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c SHA256, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u044d\u0442\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438.<a name=\"habracut\"><\/a><\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u043c\u043e\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u2014 \u044d\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u00ab\u0447\u0438\u0441\u0442\u0443\u044e\u00bb \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e SHA256 \u043d\u0430 Verilog.<\/p>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 SHA256 \u0432 Verilog \u043c\u043d\u043e\u0433\u043e, \u0445\u043e\u0442\u044c \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 <a href=\"http:\/\/opencores.org\/projects\">opencores.org<\/a>, \u0445\u043e\u0442\u044c \u043d\u0430 <a href=\"https:\/\/github.com\/search?utf8=%E2%9C%93&amp;q=sha256+language%3AVerilog&amp;type=Repositories&amp;ref=advsearch&amp;l=Verilog&amp;l=\">github.com<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e, \u043c\u043d\u0435 \u0442\u0430\u043a\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u0418\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u044e\u0442 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, pipeline. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u2014 \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0422\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 pipeline \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c SHA256 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 64 \u044d\u0442\u0430\u043f\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u00ab\u0440\u0430\u0443\u043d\u0434\u043e\u0432\u00bb. \u0415\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043c \u041f\u041b\u0418\u0421 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0435 64 \u0440\u0430\u0443\u043d\u0434\u0430 \u0432 \u0435\u0434\u0438\u043d\u0443\u044e \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439: \u0432c\u0435 \u044d\u0442\u0430\u043f\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0437\u0430 \u043e\u0434\u0438\u043d \u0442\u0430\u043a\u0442 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u044b. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/4a1\/9e7\/d27\/4a19e7d271e648fd855f90d34954c422.png\"\/><br \/>  \u041d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0432\u043e\u0441\u0435\u043c\u044c 32-\u0445 \u0431\u0438\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u044b SHA256. \u042d\u0442\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b A, B, C, D, E, F, G, H. \u0421\u0430\u043c\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, 512 \u0431\u0438\u0442, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0442\u0441\u044f \u0432 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b W, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0448\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0440\u0430\u0443\u043d\u0434\u0435. \u041f\u043e\u043a\u0430 \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0430\u0443\u043d\u0434\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0443\u043d\u0434 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0442\u0430\u043a\u0442\u0435, \u0442\u0440\u0435\u0442\u0438\u0439 \u0440\u0430\u0443\u043d\u0434 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0442\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043e \u043d\u0430 \u043f\u0440\u0435\u0434-\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0442\u0430\u043a\u0442\u0435 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f latency, \u0442\u043e \u0435\u0441\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u0431\u0443\u0434\u0435\u0442 64 \u0442\u0430\u043a\u0442\u0430, \u043d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\/pipeline \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0437\u0430 1 \u0442\u0430\u043a\u0442. \u0415\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043c \u041f\u041b\u0418\u0421 \u043c\u0430\u043b \u0438 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u044e \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0440\u0430\u0443\u043d\u0434\u043e\u0432, \u0442\u043e \u0435\u0435 \u0443\u043a\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442 \u0432\u0434\u0432\u043e\u0435. \u0422\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0443\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0438\u043c\u0435\u044e\u0449\u0435\u044e\u0441\u044f \u041f\u041b\u0418\u0421, \u043d\u043e \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0430\u0434\u0430\u0435\u0442 \u0432\u0434\u0432\u043e\u0435. \u041c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0435\u0449\u0435 \u043c\u0435\u043d\u0435\u0435 \u0435\u043c\u043a\u0443\u044e \u041f\u041b\u0418\u0421 \u0438 \u0432\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0442\u0443\u0434\u0430, \u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u0443\u043a\u043e\u0440\u043e\u0442\u0438\u0442\u044c pipeline \u0438 \u043e\u043f\u044f\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u0430\u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041a\u0430\u043a \u044f \u043f\u043e\u043d\u044f\u043b, \u043d\u0430 \u0432\u0435\u0441\u044c Bitcoin \u043c\u0430\u0439\u043d\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u0432\u0430 \u043f\u043e\u0434\u0440\u044f\u0434 SHA256-transform \u043d\u0443\u0436\u043d\u043e \u043e\u043a\u043e\u043b\u043e 80-\u0442\u0438 \u0442\u044b\u0441\u044f\u0447 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u041f\u041b\u0418\u0421 Altera\/Intel. \u041d\u043e \u044d\u0442\u043e \u044f \u043e\u0442\u0432\u043b\u0435\u043a\u0441\u044f\u2026<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u044f \u0445\u043e\u0447\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0430\u0431\u0441\u0443\u0440\u0434\u043d\u0443\u044e \u0432\u0435\u0449\u044c \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 Verilog \u00ab\u0447\u0438\u0441\u0442\u0443\u044e\u00bb \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 SHA256 \u0431\u0435\u0437 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432, \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0435 \u0431\u0435\u0437 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430. \u0426\u0435\u043b\u044c \u0443 \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u043e\u0433\u0438\u043a\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 SHA256. \u041c\u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0434\u0430\u0435\u0448\u044c \u043d\u0430 \u0432\u0445\u043e\u0434 512 \u0431\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0443 \u0438 256 \u0431\u0438\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f) \u0438 \u043e\u043d\u0430 \u0432\u044b\u0434\u0430\u0435\u0442 256 \u0431\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<p>  \u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u044d\u0442\u043e\u0442 Verilog \u043c\u043e\u0434\u0443\u043b\u044c, \u0433\u0434\u0435-\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u0441\u0430\u043c \u043f\u0438\u0441\u0430\u043b, \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u041c\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u00absha256-test\u00bb.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u043e\u0442 \u0447\u0438\u0441\u0442\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f SHA256, \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>module e0 (x, y); \tinput [31:0] x; \toutput [31:0] y; \tassign y = {x[1:0],x[31:2]} ^ {x[12:0],x[31:13]} ^ {x[21:0],x[31:22]}; endmodule  module e1 (x, y); \tinput [31:0] x; \toutput [31:0] y; \tassign y = {x[5:0],x[31:6]} ^ {x[10:0],x[31:11]} ^ {x[24:0],x[31:25]}; endmodule  module ch (x, y, z, o); \tinput [31:0] x, y, z; \toutput [31:0] o; \tassign o = z ^ (x & (y ^ z)); endmodule  module maj (x, y, z, o); \tinput [31:0] x, y, z; \toutput [31:0] o; \tassign o = (x & y) | (z & (x | y)); endmodule  module s0 (x, y); \tinput [31:0] x; \toutput [31:0] y; \tassign y[31:29] = x[6:4] ^ x[17:15]; \tassign y[28:0] = {x[3:0], x[31:7]} ^ {x[14:0],x[31:18]} ^ x[31:3]; endmodule  module s1 (x, y); \tinput [31:0] x; \toutput [31:0] y; \tassign y[31:22] = x[16:7] ^ x[18:9]; \tassign y[21:0] = {x[6:0],x[31:17]} ^ {x[8:0],x[31:19]} ^ x[31:10]; endmodule  module round (idx, in, k, w, out); \tinput  [7:0]idx; \tinput  [255:0]in; \tinput  [ 31:0]k; \tinput  [ 31:0]w; \toutput [255:0]out; \t \talways @(w) \t\t$display(&quot;i=%d k=%8x w=%8x&quot;,idx,k,w); \t \twire [31:0]a; assign a = in[ 31:  0]; \twire [31:0]b; assign b = in[ 63: 32]; \twire [31:0]c; assign c = in[ 95: 64]; \twire [31:0]d; assign d = in[127: 96]; \twire [31:0]e; assign e = in[159:128]; \twire [31:0]f; assign f = in[191:160]; \twire [31:0]g; assign g = in[223:192]; \twire [31:0]h; assign h = in[255:224]; \t \twire [31:0]e0_w; e0 e0_(a,e0_w); \twire [31:0]e1_w; e1 e1_(e,e1_w); \twire [31:0]ch_w; ch ch_(e,f,g,ch_w); \twire [31:0]mj_w; maj maj_(a,b,c,mj_w); \t \twire [31:0]t1; assign t1 = h+w+k+ch_w+e1_w; \twire [31:0]t2; assign t2 = mj_w+e0_w; \twire [31:0]a_; assign a_ = t1+t2; \twire [31:0]d_; assign d_ = d+t1; \tassign out = { g,f,e,d_,c,b,a,a_ }; endmodule  module sha256_transform( \tinput  wire [255:0]state_in, \tinput  wire [511:0]data_in, \toutput wire [255:0]state_out ); \tlocalparam Ks = { \t\t32'h428a2f98, 32'h71374491, 32'hb5c0fbcf, 32'he9b5dba5, \t\t32'h3956c25b, 32'h59f111f1, 32'h923f82a4, 32'hab1c5ed5, \t\t32'hd807aa98, 32'h12835b01, 32'h243185be, 32'h550c7dc3, \t\t32'h72be5d74, 32'h80deb1fe, 32'h9bdc06a7, 32'hc19bf174, \t\t32'he49b69c1, 32'hefbe4786, 32'h0fc19dc6, 32'h240ca1cc, \t\t32'h2de92c6f, 32'h4a7484aa, 32'h5cb0a9dc, 32'h76f988da, \t\t32'h983e5152, 32'ha831c66d, 32'hb00327c8, 32'hbf597fc7, \t\t32'hc6e00bf3, 32'hd5a79147, 32'h06ca6351, 32'h14292967, \t\t32'h27b70a85, 32'h2e1b2138, 32'h4d2c6dfc, 32'h53380d13, \t\t32'h650a7354, 32'h766a0abb, 32'h81c2c92e, 32'h92722c85, \t\t32'ha2bfe8a1, 32'ha81a664b, 32'hc24b8b70, 32'hc76c51a3, \t\t32'hd192e819, 32'hd6990624, 32'hf40e3585, 32'h106aa070, \t\t32'h19a4c116, 32'h1e376c08, 32'h2748774c, 32'h34b0bcb5, \t\t32'h391c0cb3, 32'h4ed8aa4a, 32'h5b9cca4f, 32'h682e6ff3, \t\t32'h748f82ee, 32'h78a5636f, 32'h84c87814, 32'h8cc70208, \t\t32'h90befffa, 32'ha4506ceb, 32'hbef9a3f7, 32'hc67178f2};  \tgenvar i; \tgenerate \tfor(i=0; i&lt;64; i=i+1) \tbegin : RND \t\t\twire [255:0] state; \t\t\twire [31:0]W; \t\t\t \t\t\tif(i&lt;16) \t\t\tbegin \t\t\t\tassign W = data_in[i*32+31:i*32]; \t\t\tend \t\t\telse \t\t\tbegin \t\t\t\twire [31:0]s0_w; s0 so_(RND[i-15].W,s0_w); \t\t\t\twire [31:0]s1_w; s1 s1_(RND[i-2].W,s1_w); \t\t\t\tassign W = s1_w + RND[i - 7].W + s0_w + RND[i - 16].W; \t\t\tend \t\t\t \t\t\tif(i == 0) \t\t\t\tround R ( \t\t\t\t\t.idx(i[7:0]), \t\t\t\t\t.in(state_in), \t\t\t\t\t.k( Ks[32*(63-i)+31:32*(63-i)] ), \t\t\t\t\t.w(W), \t\t\t\t\t.out(state) ); \t\t\telse \t\t\t\tround R ( \t\t\t\t\t.idx(i[7:0]), \t\t\t\t\t.in(RND[i-1].state), \t\t\t\t\t.k( Ks[32*(63-i)+31:32*(63-i)] ), \t\t\t\t\t.w(W), \t\t\t\t\t.out(state) ); \tend \tendgenerate  \twire [31:0]a; assign a = state_in[ 31:  0]; \twire [31:0]b; assign b = state_in[ 63: 32]; \twire [31:0]c; assign c = state_in[ 95: 64]; \twire [31:0]d; assign d = state_in[127: 96]; \twire [31:0]e; assign e = state_in[159:128]; \twire [31:0]f; assign f = state_in[191:160]; \twire [31:0]g; assign g = state_in[223:192]; \twire [31:0]h; assign h = state_in[255:224];  \twire [31:0]a1; assign a1 = RND[63].state[ 31:  0]; \twire [31:0]b1; assign b1 = RND[63].state[ 63: 32]; \twire [31:0]c1; assign c1 = RND[63].state[ 95: 64]; \twire [31:0]d1; assign d1 = RND[63].state[127: 96]; \twire [31:0]e1; assign e1 = RND[63].state[159:128]; \twire [31:0]f1; assign f1 = RND[63].state[191:160]; \twire [31:0]g1; assign g1 = RND[63].state[223:192]; \twire [31:0]h1; assign h1 = RND[63].state[255:224];\t  \twire [31:0]a2; assign a2 = a+a1; \twire [31:0]b2; assign b2 = b+b1; \twire [31:0]c2; assign c2 = c+c1; \twire [31:0]d2; assign d2 = d+d1; \twire [31:0]e2; assign e2 = e+e1; \twire [31:0]f2; assign f2 = f+f1; \twire [31:0]g2; assign g2 = g+g1; \twire [31:0]h2; assign h2 = h+h1; \t \tassign state_out = {h2,g2,f2,e2,d2,c2,b2,a2}; endmodule <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u0435\u043d \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0441\u0442\u0431\u0435\u043d\u0447, \u0447\u0442\u043e\u0431 \u043f\u043e\u0434\u0430\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0431\u043b\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u043e\u0442 testbench Verilog<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>`timescale 1ns\/1ps  module tb;  \tinitial \tbegin \t\t$dumpfile(&quot;tb.vcd&quot;); \t\t$dumpvars(0, tb); \t\t#100; \t\t$finish; \tend \t \twire [511:0]data; \t \tassign data = 512'h66656463626139383736353433323130666564636261393837363534333231306665646362613938373635343332313066656463626139383736353433323130; \t \twire [255:0]result; \tsha256_transform s( \t\t.state_in( 256'h5be0cd191f83d9ab9b05688c510e527fa54ff53a3c6ef372bb67ae856a09e667 ), \t\t.data_in(data), \t\t.state_out(result) \t); endmodule <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0443 \u0441 \u043e\u0442\u0432\u0435\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043d\u0435 \u0432\u044b\u0434\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f sha256_transform, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C (\u043c\u043e\u0436\u043d\u043e \u044f \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 C? \u044d\u0442\u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043d\u0430 C\/C++ \u043f\u043e\u043b\u043d\u044b\u043c \u043f\u043e\u043b\u043d\u043e). \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/05b\/5ac\/760\/05b5ac76046748dfb8a14b68334e591e.png\"\/><br \/>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u044e \u043d\u0430 C\/C++ \u0432 \u0441\u0440\u0435\u0434\u0435 Visual Studio, \u0430 Verilog \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e icarus verilog \u0438 gtkwave. \u0423\u0431\u0435\u0434\u0438\u043b\u0441\u044f, \u0447\u0442\u043e \u043e\u0442\u0432\u0435\u0442\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442, \u0437\u043d\u0430\u0447\u0438\u0442 \u043c\u043e\u0436\u043d\u043e \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u041f\u041b\u0418\u0421 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0436\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0442\u0430\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f.<br \/>  \u0414\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043b\u044f \u041f\u041b\u0418\u0421:  <\/p>\n<pre><code>module sha256_test( \tinput wire clk, \tinput wire data, \toutput wire [255:0]result );  reg [511:0]d; always @(posedge clk) \td &lt;= { d[510:0],data };  sha256_transform s0( \t\t.state_in( 256'h5be0cd191f83d9ab9b05688c510e527fa54ff53a3c6ef372bb67ae856a09e667 ), \t\t.data_in( d ), \t\t.state_out(result) \t); endmodule <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0432\u0438\u0433\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 512 \u0431\u0438\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043c\u043e\u044e \u00ab\u0447\u0438\u0441\u0442\u0443\u044e\u00bb SHA256_transform. \u0412\u0441\u0435 256 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0431\u0438\u0442 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430\u0440\u0443\u0436\u0443 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u044b \u043d\u0430 \u0432\u044b\u0432\u043e\u0434\u043d\u044b\u0435 \u043f\u0438\u043d\u044b \u041f\u041b\u0418\u0421.<\/p>\n<p>  \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e, \u0434\u043b\u044f FPGA Cyclone IV \u0438 \u0432\u0438\u0436\u0443, \u0447\u0442\u043e \u044d\u0442\u0430 \u0448\u0442\u0443\u043a\u0430 \u0437\u0430\u0439\u043c\u0435\u0442 30,103 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<br \/>  \u0425\u043e\u0440\u043e\u0448\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043c \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e: <b>30103<\/b>\u2026<\/p>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442.<br \/>  \u041f\u0440\u043e\u0435\u043a\u0442 \u00absha256-eliminated\u00bb.  <\/p>\n<pre><code>module sha256_test( \tinput wire clk, \tinput wire data, \toutput wire [255:0]result );  sha256_transform s0( \t\t.state_in( 256'h5be0cd191f83d9ab9b05688c510e527fa54ff53a3c6ef372bb67ae856a09e667 ), \t\t.data_in( 512'h66656463626139383736353433323130666564636261393837363534333231306665646362613938373635343332313066656463626139383736353433323130 ), \t\t.state_out(result) \t);  endmodule <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u044f \u043d\u0435 \u043f\u043e\u0434\u0430\u044e \u0432 \u041f\u041b\u0418\u0421 \u0438\u0437\u0432\u043d\u0435, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0434\u0430\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439, \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u044f sha256_transform.<\/p>\n<p>  \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0432 \u041f\u041b\u0418\u0421. \u0417\u043d\u0430\u0435\u0442\u0435 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435: <b>\u041d\u041e\u041b\u042c<\/b>.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/49e\/e67\/ff9\/49ee67ff90c341a1905131ff79785c89.png\"\/><br \/>  \u0421\u0440\u0435\u0434\u0430 Altera (\u0438\u043b\u0438 \u0443\u0436\u0435 Intel? \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c?) Quartus Prime \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0438 \u043d\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b \u0437\u0430\u0432\u0438\u0441\u0435\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0442\u043e \u0432\u0441\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0440\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f, \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u044f SHA256 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442 \u043f\u0440\u044f\u043c\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u043d\u0430 \u043f\u0438\u043d\u0430\u0445 \u041f\u041b\u0418\u0421. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0440\u0430\u0437\u0443 \u043f\u0438\u0448\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0446\u0435\u043f\u043b\u0435\u043d\u044b \u043d\u0430 \u0437\u0435\u043c\u043b\u044e, \u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a VCC, \u043a \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044e \u043f\u0438\u0442\u0430\u043d\u0438\u044f. \u0422\u0430\u043a \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0430\u0445 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0430\u043c\u0438\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: 0x56, 0x70,\u2026 \u0442\u043e\u0447\u043d\u043e \u043a\u0430\u043a \u0432 \u043c\u043e\u0435\u043c \u0441\u0430\u043c\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<p>  \u041e\u0442\u0441\u044e\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0442\u0430\u043a\u0430\u044f \u043c\u044b\u0441\u043b\u044c. \u0420\u0430\u0437 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0442\u0430\u043a\u043e\u0439 \u0443\u043c\u043d\u044b\u0439 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443, \u0442\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0431\u0438\u0442 \u043e\u0442 sha256? \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0433\u0438\u043a\u0438 \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0431\u0438\u0442?<\/p>\n<p>  \u0412 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435. \u0411\u0438\u0442\u043a\u043e\u0438\u043d\u044b \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0442\u0430\u043a: \u0435\u0441\u0442\u044c \u0431\u043b\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0431\u043b\u043e\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0435\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 nonce, 32 \u0431\u0438\u0442\u0430. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u043b\u043e\u043a\u0435 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043c\u0435\u043d\u044f\u0442\u044c, \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u043b\u0435 nonce \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 sha256 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u00ab\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u00bb, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0430\u0440\u0448\u0438\u0435 \u0431\u0438\u0442\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 sha256-transform \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0432 \u043d\u0443\u043b\u0435.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/21b\/b29\/d85\/21bb29d85a3249148921a7cb2f7822bc.png\"\/><br \/>  \u0412\u043e\u0442 \u0441\u0447\u0438\u0442\u0430\u0435\u043c sha256 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043f\u043e\u0442\u043e\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c nonce \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u043e\u043f\u044f\u0442\u044c \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0445\u044d\u0448, \u043f\u043e\u0442\u043e\u043c \u043e\u043f\u044f\u0442\u044c \u0438 \u043e\u043f\u044f\u0442\u044c. \u0421\u043e\u0442\u043d\u0438, \u0442\u044b\u0441\u044f\u0447\u0438 \u0440\u0430\u0437 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0431\u043b\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u043e \u0447\u0443\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0435 \u043f\u043e\u043b\u0435 nonce. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0431\u0438\u0442\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 sha256, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 256 \u0431\u0438\u0442. \u0410 \u0432\u044b\u0433\u043e\u0434\u043d\u043e \u043b\u0438 \u044d\u0442\u043e \u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438? \u0412\u044b\u0433\u043e\u0434\u043d\u043e \u043b\u0438 \u044d\u0442\u043e \u043f\u043e \u0447\u0438\u0441\u043b\u0443 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432?<\/p>\n<p>  \u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0442\u0430\u0440\u0448\u0438\u0445 \u0431\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u041e\u043d \u0434\u0443\u043c\u0430\u044e \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0431\u043e \u043d\u043e\u043b\u044c \u043b\u0438\u0431\u043e \u0435\u0434\u0438\u043d\u0438\u0446\u0430. \u0415\u0441\u043b\u0438 \u043e\u043d \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439, \u0442\u0430\u043a \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0442\u044b \u0438 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u0417\u0430\u0447\u0435\u043c \u043d\u0430 \u043d\u0438\u0445 \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u0440\u0430\u0433\u043e\u0446\u0435\u043d\u043d\u0443\u044e \u044d\u043d\u0435\u0440\u0433\u0438\u044e?<\/p>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0432 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u044f \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0430 \u0445\u044d\u0448\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432 256 \u0440\u0430\u0437 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0431\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u041d\u043e \u044f \u043e\u0448\u0438\u0431\u0430\u043b\u0441\u044f.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u044d\u0442\u0443 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043b\u044f \u043a\u0432\u0430\u0440\u0442\u0443\u0441\u0430 \u0441 \u0442\u043e\u043f \u043c\u043e\u0434\u0443\u043b\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<pre><code>module sha256_test( \tinput wire clk, \tinput wire data, \toutput wire result );  reg [511:0]d; always @(posedge clk) \td &lt;= { d[510:0],data };  wire [255:0]r; sha256_transform s0( \t\t.state_in( 256'h5be0cd191f83d9ab9b05688c510e527fa54ff53a3c6ef372bb67ae856a09e667 ), \t\t.data_in( d ), \t\t.state_out(r) \t);  assign result = r[187]; \/\/\u043d\u043e\u043c\u0435\u0440 \u0431\u0438\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 endmodule <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u0431\u044b sta256_transform \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0432\u0435\u0441\u044c \u0445\u044d\u0448 \u0438 \u043e\u0442\u0432\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432 \u0441\u0438\u0433\u043d\u0430\u043b\u0435 wire [255:0]r, \u043e\u0434\u043d\u0430\u043a\u043e, \u0432\u044b\u0445\u043e\u0434 \u043c\u043e\u0434\u0443\u043b\u044f Verilog \u2014 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0431\u0438\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 assign result = r[187]; \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0443 \u043b\u043e\u0433\u0438\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0430. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043e \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043c\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0438 \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 256 \u0440\u0430\u0437. \u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u043f\u0438\u0448\u0443 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043a\u0432\u0430\u0440\u0442\u0443\u0441\u0430:  <\/p>\n<pre><code>#!\/usr\/bin\/tclsh  proc read_rpt { i frpt } { set fp [open &quot;output_files\/xxx.map.summary&quot; r] set file_data [read $fp] close $fp set data [split $file_data &quot;\\n&quot;] foreach line $data { set half [split $line &quot;:&quot;] set a [lindex $half 0] set b [lindex $half 1] if { $a == &quot;    Total combinational functions &quot; } { puts [format &quot;%d %s&quot; $i $b] puts $frpt [format &quot;%d %s&quot; $i $b] } } }  proc gen_sha256_src { i } { set fo [open &quot;sha256_test.v&quot; &quot;w&quot;]  puts $fo &quot;module sha256_test(&quot; puts $fo &quot;\tinput wire clk,&quot; puts $fo &quot;\tinput wire data,&quot; puts $fo &quot;\toutput wire result&quot; puts $fo &quot;);&quot; puts $fo &quot;&quot; puts $fo &quot;reg \\[511:0]d;&quot; puts $fo &quot;always @(posedge clk)&quot; puts $fo &quot;\td &lt;= { d\\[510:0],data };&quot; puts $fo &quot;&quot; puts $fo &quot;wire \\[255:0]r;&quot; puts $fo &quot;sha256_transform s0(&quot; puts $fo &quot;\t\t.state_in( 256'h5be0cd191f83d9ab9b05688c510e527fa54ff53a3c6ef372bb67ae856a09e667 ),&quot; puts $fo &quot;\t\t.data_in( d ),&quot; puts $fo &quot;\t\t.state_out(r)&quot; puts $fo &quot;\t);&quot; puts $fo &quot;&quot; puts $fo &quot;assign result = r\\[$i];&quot; puts $fo &quot;&quot; puts $fo &quot;endmodule&quot; close $fo }  set frpt [open &quot;rpt.txt&quot; &quot;w&quot;]  for {set i 0} {$i &lt; 256} {incr i} {  gen_sha256_src $i  exec x.bat  read_rpt $i $frpt } close $frpt exit <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \u0446\u0438\u043a\u043b\u0435 \u0437\u0430\u043d\u043e\u0432\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c sha256_test.v \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0438\u043d \u041f\u041b\u0418\u0421 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0431\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 sha256.<\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u044e \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432 \u0438 \u0432\u0443\u0430\u043b\u044f. \u0415\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a\u043e\u0439 \u0431\u0438\u0442 \u0438\u0437 SHA256 \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c. \u0412\u043e\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0431\u0438\u0442\u0430 SHA256:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/fef\/958\/524\/fef958524ad74a668bf49d4d81590bd7.png\"\/><br \/>  \u041e\u0442\u0441\u044e\u0434\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0431\u0438\u0442 \u043d\u043e\u043c\u0435\u0440 224. \u0414\u043b\u044f \u043d\u0435\u0433\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f <b>27204 <\/b>\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u042d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435-\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u043d\u0430 10% \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0445 256 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0431\u0438\u0442.<\/p>\n<p>  \u0413\u0440\u0430\u0444\u0438\u043a \u0432 \u0432\u0438\u0434\u0435 \u043f\u0438\u043b\u044b \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 SHA256 \u043c\u043d\u043e\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u043e\u0432. \u0412 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0442\u0440\u0443\u0434\u043d\u0435\u0435, \u0447\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043c\u043b\u0430\u0434\u0448\u0438\u0439. \u042d\u0442\u043e \u0438\u0437-\u0437\u0430 \u0441\u0445\u0435\u043c\u044b \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430, \u0432\u0435\u0434\u044c \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u044b \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u043c\u043d\u043e\u0433\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 full-adder.<\/p>\n<p>  \u0412\u043e\u0442 \u0443\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u0438\u0437\u0440\u0430\u0447\u043d\u0430\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \u042f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u0443\u0448\u0430\u0435\u0442 \u044d\u043d\u0435\u0440\u0433\u0438\u044e. \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0438\u0441\u043b\u043e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 LE \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u041f\u041b\u0418\u0421, \u0442\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0442\u0430\u043a\u043e\u0439: \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0431\u0438\u0442, \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u043e\u043b\u044c, \u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439. \u0415\u0441\u043b\u0438 \u043e\u043d \u0435\u0434\u0438\u043d\u0438\u0446\u0430, \u0442\u043e \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u043c \u044d\u043d\u0435\u0440\u0433\u0438\u044e \u0438 \u0441\u0438\u043b\u044b \u0438 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0442\u044b \u0432 \u044d\u0442\u043e\u043c \u0436\u0435 \u0445\u044d\u0448\u0435.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0440\u0443\u0433\u0430\u044f \u043c\u044b\u0441\u043b\u044c, \u0442\u0430\u043a \u0436\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0430\u044f \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443.<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0435 \u043f\u043e\u043b\u044f nonce \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0430 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438, \u0442\u043e, \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043e\u0442 \u0446\u0438\u043a\u043b\u0430 \u043a \u0446\u0438\u043a\u043b\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f \u0438 \u0441\u0447\u0438\u0442\u0430\u044e\u0442 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435. \u0412\u043e\u043f\u0440\u043e\u0441: \u043a\u0430\u043a \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043c \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u0445?<\/p>\n<p>  \u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439. \u041f\u043e\u0441\u0442\u0430\u0432\u0438\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0432\u0430 \u043c\u043e\u0434\u0443\u043b\u044f sha256_transform \u0440\u044f\u0434\u043e\u043c \u0438 \u043f\u043e\u0434\u0430\u0434\u0438\u043c \u043d\u0430 \u043d\u0438\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0443 \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0430. \u0421\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u0438 \u0434\u0432\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0441\u0447\u0438\u0442\u0430\u044e\u0442 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0435 nonce \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0431\u0438\u0442\u043e\u043c.   <\/p>\n<pre><code>module sha256_test( \tinput wire clk, \tinput wire data, \toutput wire [1:0]result );  reg [511:0]d; always @(posedge clk) \td &lt;= { d[510:0],data };  wire [255:0]r0; sha256_transform s0( \t\t.state_in( 256'h5be0cd191f83d9ab9b05688c510e527fa54ff53a3c6ef372bb67ae856a09e667 ), \t\t.data_in( { 1'b0, d[510:0] } ), \t\t.state_out(r0) \t);  wire [255:0]r1; sha256_transform s1( \t\t.state_in( 256'h5be0cd191f83d9ab9b05688c510e527fa54ff53a3c6ef372bb67ae856a09e667 ), \t\t.data_in( { 1'b1, d[510:0] } ), \t\t.state_out(r1) \t);  assign result = { r0[224], r1[224] }; endmodule <\/code><\/pre>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 s0 \u0438 s1 \u0441\u0447\u0438\u0442\u0430\u044e\u0442 \u0441\u0432\u043e\u0439 \u0445\u044d\u0448 \u043e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u0438\u0442 nonce. \u0418\u0437 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u0431\u0438\u0440\u0430\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u044b\u0439 \u00ab\u043b\u0435\u0433\u043a\u0438\u0439\u00bb \u0431\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u0431\u0438\u0442 \u043d\u043e\u043c\u0435\u0440 224.<br \/>  \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0439\u043c\u0435\u0442 \u0442\u0430\u043a\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0432 \u041f\u041b\u0418\u0421? 47,805 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u0432\u0430, \u0442\u043e \u043e\u0434\u0438\u043d \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 47805 \/ 2 = 23902. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0430 \u0445\u044d\u0448\u0430 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0432\u044b\u0433\u043e\u0434\u043d\u0435\u0435, \u0447\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0445 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0431\u0449\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0410 \u0435\u0441\u043b\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 4 \u0445\u044d\u0448\u0430 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e 2 \u0431\u0438\u0442\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043d\u0430 \u043f\u043e\u043b\u0435 nonce? <br \/>  \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f 89009LE \/ 4 = 22252 LE\/SHA256<\/p>\n<p>  \u0410 \u0435\u0441\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u0442\u044c 8 \u0445\u044d\u0448\u0435\u0439?<br \/>  \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f 171418LE \/ 8 = 21427 LE\/SHA256<\/p>\n<p>  \u0412\u043e\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e 30103 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u043f\u043e\u043b\u043d\u044b\u0439 SHA256_transform \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c 256 \u0431\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0438 21427 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043d\u0430 SHA256_transfrom \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 (\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0440\u0430\u0441\u0441\u0447\u0435\u0442\u043e\u0432). \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0442\u0430\u043a\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u043c\u0430\u0439\u043d\u0435\u0440\u0430 \u0433\u0434\u0435-\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u043d\u0430 \u0442\u0440\u0435\u0442\u044c. \u041d\u0443 \u043d\u0430 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044c\u2026 \u041d\u0435 \u0437\u043d\u0430\u044e \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u043e \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043c\u044b\u0441\u043b\u044c. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u043b\u043e\u043a\u0435 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u0444\u0438\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0445\u044d\u0448\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435 nonce. \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0434\u043b\u044f \u041f\u041b\u0418\u0421, \u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043c\u043e\u0433\u043b\u0430 \u0431\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0412\u0435\u0434\u044c \u0432\u044b\u0448\u0435 \u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0440\u0430\u043d\u043d\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0441 \u043f\u0440\u0435\u0434\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e \u043e\u0431\u044a\u0435\u043c\u0443 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0438\u043b\u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044f, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435.<\/p>\n<p>  \u041d\u0443 \u0432\u043e\u0442 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a.<br \/>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044f \u0438 \u0441\u0430\u043c \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d \u0432 \u0441\u0432\u043e\u0435\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044f \u0447\u0435\u0433\u043e-\u0442\u043e \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e \u0438\u043b\u0438 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 \u0434\u0430\u044e\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0440\u044b\u0432\u0430, \u043d\u043e \u043a\u043e\u0435 \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c. \u041f\u043e\u043a\u0430 \u044d\u0442\u043e \u0432\u0441\u0435 \u0441\u043a\u043e\u0440\u0435\u0435 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u00ab\u0447\u0438\u0441\u0442\u0430\u044f\u00bb SHA256 \u043d\u0435 \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u2014 \u0443 \u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430. \u0412\u0432\u043e\u0434\u0438\u0442\u044c pipeline \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0444\u0430\u043a\u0442\u043e\u0440. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 \u0434\u043b\u044f \u0431\u0438\u0442\u043a\u043e\u0438\u043d\u0430 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u043f\u043e\u0434\u0440\u044f\u0434 SHA256_transform. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0439 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u043f\u043e \u0447\u0438\u0441\u043b\u0443 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c\u043e\u0439 \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043a\u0438\u043c \u0443\u0436 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c.<\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 bitcon \u043c\u0430\u0439\u043d\u0435\u0440\u0430 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u044b \u041c\u0430\u0440\u0441\u043e\u0445\u043e\u04343 \u0441 \u041f\u041b\u0418\u0421 Altera MAX10, 50K LE \u0437\u0434\u0435\u0441\u044c: <a href=\"https:\/\/github.com\/marsohod4you\/btc-fpga-miner\">https:\/\/github.com\/marsohod4you\/btc-fpga-miner<\/a><br \/>  \u0417\u0434\u0435\u0441\u044c \u0436\u0435 \u0432 \u043f\u0430\u043f\u043a\u0435 research \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043c\u043e\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c SHA256.<\/p>\n<p>  <a href=\"https:\/\/marsohod.org\/projects\/proekty-dlya-platy-marsokhod3\/340-miner-bitcoin\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u0430\u0439\u043d\u0435\u0440\u0430 \u0434\u043b\u044f \u041f\u041b\u0418\u0421 \u0437\u0434\u0435\u0441\u044c<\/a>.<br \/> \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:\/\/habrahabr.ru\/post\/318174\/\"> https:\/\/habrahabr.ru\/post\/318174\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/cdc\/697\/eac\/cdc697eacc7a4bf4907c3b8407279cf7.jpg\"\/><br \/>  \u0412\u0441\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0431\u043b\u0438\u0436\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0431\u0438\u0442\u043a\u043e\u0438\u043d\u0430\u043c\u0438. \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0438\u0445 \u0434\u043e\u0431\u044b\u0432\u0430\u044e\u0442. \u0421\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u043e \u0431\u0438\u0442\u043a\u043e\u0438\u043d\u044b \u0438 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e, \u043d\u043e \u0442\u0430\u043a\u0438\u0445, \u0447\u0442\u043e\u0431\u044b \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u0442\u0430\u043a\u0438\u0445 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e.<\/p>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 \u0434\u0435\u0442\u0430\u043b\u044f\u0445 \u2014 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438. \u042f \u0432\u0437\u044f\u043b\u0441\u044f \u0438\u0437\u0443\u0447\u0430\u0442\u044c Verilog \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 FPGA \u043c\u0430\u0439\u043d\u0435\u0440\u0430: <a href=\"https:\/\/github.com\/progranism\/Open-Source-FPGA-Bitcoin-Miner\">https:\/\/github.com\/progranism\/Open-Source-FPGA-Bitcoin-Miner.git<\/a>. \u042d\u0442\u043e \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043d\u0430 github, \u0438 \u0432\u0441\u0435 \u043e\u043d\u0438, \u0445\u043e\u0442\u044c \u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u0440\u043e\u0432, \u043f\u043e\u0445\u043e\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u0435. \u0412\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u0440 \u0442\u043e \u0443 \u043d\u0438\u0445 \u0432\u0441\u0435\u0445 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u043b \u043e\u0434\u0438\u043d, \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u044e\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0447\u0438\u043f\u044b \u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043b\u0430\u0442\u044b\u2026 \u041f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u043c\u043d\u0435 \u0442\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c\u2026<\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u044f, \u043f\u043e\u0438\u0437\u0443\u0447\u0430\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 Verilog, \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 github \u043a \u043f\u043b\u0430\u0442\u0435 \u041c\u0430\u0440\u0441\u043e\u0445\u043e\u04343 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u041f\u041b\u0418\u0421 Altera MAX10, 50 \u0442\u044b\u0441. \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u042f \u0441\u043c\u043e\u0433 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043c\u0430\u0439\u043d\u0435\u0440 \u0438 \u0434\u0430\u0436\u0435 \u0441\u043c\u043e\u0433 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0431\u0438\u0442\u043a\u043e\u0438\u043d\u043e\u0432, \u043d\u043e \u0431\u0440\u043e\u0441\u0438\u043b \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b \u0447\u0430\u0441\u0430 \u0438\u0437-\u0437\u0430 \u0431\u0435\u0441\u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043f\u043e \u043d\u044b\u043d\u0435\u0448\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0430\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043e\u0439 FPGA \u043c\u0430\u0439\u043d\u0435\u0440. \u041d\u0443 \u0438 \u043f\u0443\u0441\u0442\u044c.<\/p>\n<p>  \u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043c\u0435\u043d\u044f \u0432\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0438 \u043d\u0435 \u0441\u0430\u043c\u0438 \u0431\u0438\u0442\u043a\u043e\u0438\u043d\u044b (\u043d\u0443 \u0438\u0445, \u044d\u0442\u0438 \u0434\u0435\u043d\u0435\u0436\u043d\u044b\u0435 \u0441\u0443\u0440\u0440\u043e\u0433\u0430\u0442\u044b ))), \u043d\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 SHA256. \u0412\u043e\u0442 \u043e\u0431 \u044d\u0442\u043e\u043c \u044f \u0438 \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c. \u042f \u043f\u0440\u043e\u0432\u0435\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c SHA256, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u044d\u0442\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-282854","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/282854","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=282854"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/282854\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=282854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=282854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=282854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}