{"id":357380,"date":"2024-05-20T23:49:41","date_gmt":"2024-05-20T23:49:41","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=357380"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=357380","title":{"rendered":"<span>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0441 AXI-Stream \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438. \u0427\u0430\u0441\u0442\u044c 1<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h4>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/h4>\n<ul>\n<li>\n<p>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440<\/p>\n<\/li>\n<li>\n<p>\u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<\/ul>\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f RTL-\u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Verilog. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 AXI-Stream \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438. \u041c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0435\u043c\u044b \u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b, \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0442\u0438\u043f\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 RTL-\u043c\u043e\u0434\u0443\u043b\u0435\u0439.<\/p>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043d\u0430\u043c\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430. \u041f\u0440\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044d\u0442\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\u0445. \u041c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043a \u0441\u043b\u043e\u0436\u043d\u043e\u043c\u0443 \u0438 \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u043c\u0438 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h4>\u041a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440<\/h4>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440. \u0421\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434\u044b <code>data1_i<\/code> \u0438 <code>data2_i<\/code>. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>WIDTH<\/code> \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c. \u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0448\u0438\u0440\u0438\u043d\u0430 \u0448\u0438\u043d\u044b \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 <code>data_o<\/code> \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0448\u0438\u0440\u0438\u043d\u044b \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 Verilog \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432\u0441\u0435\u0433\u043e \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>assign<\/code>:<\/p>\n<pre><code>\/\/! \u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440. \/\/! \u0420\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445.  module adder_comb #(     parameter integer WIDTH = 4     \/\/! \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 ) (     input  [WIDTH-1:0] data1_i,     \/\/! \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435     input  [WIDTH-1:0] data2_i,     \/\/! \u0432\u0442\u043e\u0440\u043e\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435     output [  WIDTH:0] data_o       \/\/! \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f );    \/\/! \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u0435 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435   assign data_o = data1_i + data2_i;  endmodule <\/code><\/pre>\n<p>\u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0438\u0436\u0435. \u0412 \u0432\u0438\u0434\u0435 \u043e\u0431\u043b\u0430\u043a\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u0435\u043d\u0442\u0438\u043b\u0438.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/tw\/j-\/wv\/twj-wvnguufe_xulxoz9wbxlk0a.png\" data-src=\"https:\/\/habrastorage.org\/webt\/tw\/j-\/wv\/twj-wvnguufe_xulxoz9wbxlk0a.png\"\/><\/figure>\n<p>\u0418\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0445\u0435\u043c.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/3w\/ol\/cm\/3wolcmgqfhr4fp-yih8bqbe8nh0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/3w\/ol\/cm\/3wolcmgqfhr4fp-yih8bqbe8nh0.png\"\/><\/figure>\n<h4>\u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432<\/h4>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0442\u043e\u043d\u043e\u043c \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u043d\u0430 \u0438\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c FPGA \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0434\u0438\u043a\u0442\u043e\u0432\u0430\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043a \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e, \u0438\u043d\u0430\u0447\u0435 \u0438\u0445 \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u043e\u0449\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0430\u043a\u0442\u043e\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c. \u0427\u0430\u0441\u0442\u043e\u0442\u0430, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438. \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0438, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0432\u044b\u0445\u043e\u0434\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u044f. \u041c\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0438 \u0443\u0431\u0435\u0434\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u0432 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0442\u0430\u043a\u0442\u043e\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u0435. \u041d\u0430\u0448 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0431\u043b\u043e\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0432\u044b\u0445\u043e\u0434\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f. \u0422\u0430\u043a \u0441\u043e\u0432\u043f\u0430\u043b\u043e, \u0447\u0442\u043e \u043e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0441\u0432\u043e\u0439 \u0431\u043b\u043e\u043a \u0431\u0435\u0437 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u041a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0432\u0445\u043e\u0434 \u043c\u043e\u0434\u0443\u043b\u044f \u043a\u043e\u043b\u043b\u0435\u0433\u0438 \u0432 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439. \u0422\u0430\u043a \u043a\u0430\u043a \u0438\u043d\u043e\u0433\u0434\u0430 \u0431\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0431\u043b\u043e\u043a\u0438, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e, \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043a\u0438 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430 \u0435\u0433\u043e \u0432\u0445\u043e\u0434\u044b \u0438 \u0432\u044b\u0445\u043e\u0434\u044b \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0441\u0445\u0435\u043c\u0430 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/_j\/od\/7t\/_jod7trlbljb254f0e0unu3jgfe.png\" data-src=\"https:\/\/habrastorage.org\/webt\/_j\/od\/7t\/_jod7trlbljb254f0e0unu3jgfe.png\"\/><\/figure>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u043f\u0443\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u043d\u043e\u0441\u0438\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0432 \u043e\u0434\u0438\u043d \u043f\u0435\u0440\u0438\u043e\u0434 \u0442\u0430\u043a\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0434\u0432\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0430\u0447\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445. \u042d\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e \u043d\u0438\u0436\u0435 \u043d\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u0445:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vv\/p4\/fx\/vvp4fxa1cw7uc0l0spijiaccga0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/vv\/p4\/fx\/vvp4fxa1cw7uc0l0spijiaccga0.png\"\/><\/figure>\n<p>\u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0440\u0442 <code>reset<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0441\u0431\u0440\u043e\u0441\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0432 \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f.<\/p>\n<h4>\u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0442\u0430\u043a\u0442\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0438\u0445 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0422\u043e \u0435\u0441\u0442\u044c, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0444\u0440\u043e\u043d\u0442\u0430 \u0442\u0430\u043a\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430, \u043d\u0430 \u0432\u0445\u043e\u0434\u0430\u0445 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u043e, \u0442\u043e \u0432\u043e \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0438 \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0445 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u043e\u0434\u0443\u043b\u044f. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044d\u0442\u0438 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043c\u043e\u0434\u0443\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u0432\u044b\u0445\u043e\u0434\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u0434\u043d\u043e\u0431\u0438\u0442\u043d\u044b\u0439 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b <code>valid_i<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c\u0438. \u042d\u0442\u043e\u0442 \u0441\u0438\u0433\u043d\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a\u043e \u0432\u0445\u043e\u0434\u0430\u043c clock enable (ce) \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 <code>valid_i<\/code>, \u0438 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u0443\u043c\u043c\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0421\u0445\u0435\u043c\u0430 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/yf\/i3\/qi\/yfi3qiyjxjpuxdtrodsmr_zj5bu.png\" data-src=\"https:\/\/habrastorage.org\/webt\/yf\/i3\/qi\/yfi3qiyjxjpuxdtrodsmr_zj5bu.png\"\/><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0440\u0430\u043d\u0435\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u043e\u043c, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043a \u043d\u0435\u043c\u0443 \u0442\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0432\u0430 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0440\u0442 clock enable. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0430 Verilog \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0438\u0436\u0435. \u0411\u043b\u043e\u043a\u0438 <code>always<\/code> \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 <code>data1_i_reg<\/code>, <code>data2_i_reg<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b. \u0411\u043b\u043e\u043a <code>always<\/code> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c  <code>data_o_reg<\/code> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440.<\/p>\n<pre><code>\/\/! \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c.  module adder_valid_i #(     parameter integer WIDTH = 4  \/\/! \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 ) (     input clk,                      \/\/! \u0442\u0430\u043a\u0442\u043e\u0432\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b     input reset,                    \/\/! \u0441\u0438\u0433\u043d\u0430\u043b \u0441\u0431\u0440\u043e\u0441\u0430, \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c - 1     input valid_i,                  \/\/! \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b     input [WIDTH-1:0] data1_i,      \/\/! \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435     input [WIDTH-1:0] data2_i,      \/\/! \u0432\u0442\u043e\u0440\u043e\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435     output reg [WIDTH:0] data_o     \/\/! \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f );    reg  [WIDTH-1:0] adder_in_1;  \/\/! \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0445\u043e\u0434 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430   reg  [WIDTH-1:0] adder_in_2;  \/\/! \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0445\u043e\u0434 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430   wire [  WIDTH:0] adder_out;   \/\/! \u0432\u044b\u0445\u043e\u0434 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430    \/\/! \u0432\u0445\u043e\u0434\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0433\u043e   always @(posedge clk) begin : data1_i_reg     if (reset) adder_in_1 &lt;= '0;     else if (valid_i) adder_in_1 &lt;= data1_i;   end    \/\/! \u0432\u0445\u043e\u0434\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0433\u043e   always @(posedge clk) begin : data2_i_reg     if (reset) adder_in_2 &lt;= '0;     else if (valid_i) adder_in_2 &lt;= data2_i;   end    \/\/! \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440   adder_comb #(       .WIDTH(WIDTH)   ) adder_comb (       .data1_i(adder_in_1),       .data2_i(adder_in_2),       .data_o (adder_out)   );    \/\/! \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440   always @(posedge clk) begin : data_o_reg     if (reset) data_o &lt;= '0;     else data_o &lt;= adder_out;   end   endmodule <\/code><\/pre>\n<p>\u0418\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u043c\u043e\u0434\u0443\u043b\u044f \u0440\u0430\u0432\u0435\u043d \u0441\u0443\u043c\u043c\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/sk\/7d\/ro\/sk7dro7kv1b5qeazmzb7-piavha.png\" data-src=\"https:\/\/habrastorage.org\/webt\/sk\/7d\/ro\/sk7dro7kv1b5qeazmzb7-piavha.png\"\/><\/figure>\n<h4>\u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u041a\u0430\u043a \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0445 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043f\u043e\u043a\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434\u044b \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u043d\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u044f\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0435\u0433\u043e \u0432\u044b\u0445\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u042d\u0442\u043e \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u0432\u044b\u0445\u043e\u0434\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430, \u0435\u0441\u043b\u0438 \u0435\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0449\u0435\u043b\u043a\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435, \u0430 \u043d\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c <code>valid_i<\/code> \u0438 \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430, \u0442\u043e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0447\u0435\u0440\u0435\u0437 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f.<\/p>\n<p>\u041b\u0443\u0447\u0448\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0430\u0448 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u043e\u0434\u043d\u043e\u0431\u0438\u0442\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0440\u0442 <code>valid_o<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b. \u0411\u043b\u043e\u043a, \u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430, \u0431\u0443\u0434\u0435\u0442 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u0430 <code>valid_o<\/code> \u043f\u0440\u0438 \u0437\u0430\u0449\u0435\u043b\u043a\u0438\u0432\u0430\u043d\u0438\u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/l0\/8b\/ts\/l08btsytogzmbfcuep9rbzgb_io.png\" data-src=\"https:\/\/habrastorage.org\/webt\/l0\/8b\/ts\/l08btsytogzmbfcuep9rbzgb_io.png\"\/><\/figure>\n<p>\u041b\u043e\u0433\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u0432 \u043d\u0430 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430 \u0441\u0438\u0433\u043d\u0430\u043b <code>valid_i<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432. \u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0438\u0436\u0435:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/sv\/bg\/9c\/svbg9cu8i-9pp5uceii6txsq_t0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/sv\/bg\/9c\/svbg9cu8i-9pp5uceii6txsq_t0.png\"\/><\/figure>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0445\u0435\u043c\u0430, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u0432\u0443\u0445 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u043e \u0441\u0445\u0435\u043c\u043e\u0439 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0421\u0445\u0435\u043c\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u0438\u0434:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/tf\/sy\/21\/tfsy21raunxzvaek7vz4azeunke.png\" data-src=\"https:\/\/habrastorage.org\/webt\/tf\/sy\/21\/tfsy21raunxzvaek7vz4azeunke.png\"\/><\/figure>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Verilog. \u041c\u043e\u0434\u0443\u043b\u044c <code>adder_valid_i<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438. \u0411\u043b\u043e\u043a <code>always<\/code> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>valid_i_shift_reg<\/code> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043b\u0438\u043d\u0438\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u0430 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0441\u0434\u0432\u0438\u0433\u0430. \u0412\u044b\u0445\u043e\u0434 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0441\u0434\u0432\u0438\u0433\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0441\u0438\u0433\u043d\u0430\u043b \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 <code>valid_o<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>assign<\/code>.<\/p>\n<pre><code> \/\/! \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c.  module adder_valid_io #(     parameter integer WIDTH = 4  \/\/! \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 ) (     input              clk,      \/\/! \u0442\u0430\u043a\u0442\u043e\u0432\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b     input              reset,    \/\/! \u0441\u0438\u0433\u043d\u0430\u043b \u0441\u0431\u0440\u043e\u0441\u0430, \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c - 1     input              valid_i,  \/\/! \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b     input  [WIDTH-1:0] data1_i,  \/\/! \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435     input  [WIDTH-1:0] data2_i,  \/\/! \u0432\u0442\u043e\u0440\u043e\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435     output             valid_o,  \/\/! \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b     output [  WIDTH:0] data_o    \/\/! \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f );    \/\/! \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0441\u0434\u0432\u0438\u0433\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b\u0430   reg [1:0] valid_shift_reg;    \/\/! \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c   adder_valid_i #(       .WIDTH(WIDTH)   ) adder_valid_i (       .clk    (clk),       .reset  (reset),       .data1_i(data1_i),       .data2_i(data2_i),       .valid_i(valid_i),       .data_o (data_o)   );    \/\/! \u0437\u0430\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b \u043d\u0430 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430 \u0434\u043b\u044f   \/\/! \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u0435\u0433\u043e \u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438   always @(posedge clk) begin : valid_i_shift_reg     if (reset) valid_shift_reg &lt;= 2'b00;     else valid_shift_reg &lt;= {valid_shift_reg[0], valid_i};   end   assign valid_o = valid_shift_reg[1];   endmodule <\/code><\/pre>\n<h4>\u0422\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430. \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0442\u0430\u043a\u0442\u0435 \u0431\u0443\u0434\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445. \u0421\u0438\u0433\u043d\u0430\u043b \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u043c \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0435 \u0442\u0440\u0438 \u0442\u0430\u043a\u0442\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 <code>valid_i<\/code>.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0431\u044a\u044f\u0432\u0438\u043c \u0432\u0441\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043d\u0430\u0448\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043a\u043b\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438  <code>$urandom()<\/code> . \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>trans_cnt<\/code> &#8212; \u044d\u0442\u043e \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u0446\u0438\u043a\u043b\u0435, \u0430 <code>trans_number<\/code> &#8212; \u0447\u0438\u0441\u043b\u043e \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u0442\u0430. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>$urandom()<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>seed<\/code>. \u0418\u0437\u043c\u0435\u043d\u044f\u044f \u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445.<\/p>\n<pre><code>\/\/ Testbench \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c module adder_valid_io_tb ();    localparam integer WIDTH = 4;  \/\/ \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445    integer seed = 0;           \/\/ \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b   integer trans_number = 10;  \/\/ \u0447\u0438\u0441\u043b\u043e \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439   integer trans_cnt;          \/\/ \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439    reg clk = 1'b0;    \/\/ \u0442\u0430\u043a\u0442\u043e\u0432\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b   reg reset = 1'b1;  \/\/ \u0441\u0438\u0433\u043d\u0430\u043b \u0441\u0431\u0440\u043e\u0441\u0430, \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c - 1    \/\/ \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b\u044b   reg  valid_i;   wire valid_o;    \/\/ \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0435 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0443\u043c\u043c\u044b   reg  [WIDTH-1:0] data1_i;   reg  [WIDTH-1:0] data2_i;   wire [WIDTH:0]   data_o;  <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0432\u0441\u0435 \u0435\u0433\u043e \u043f\u043e\u0440\u0442\u044b.<\/p>\n<pre><code>  \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c   adder_valid_io #(       .WIDTH(WIDTH)   ) dut (       .clk(clk),       .reset(reset),       .valid_i(valid_i),       .data1_i(data1_i),       .data2_i(data2_i),       .data_o(data_o),       .valid_o(valid_o)   ); <\/code><\/pre>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u043b\u043e\u043a\u0430 <code>always<\/code> \u0431\u0443\u0434\u0435\u043c \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0442\u043e\u0432\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u0435 \u043a\u0430\u0436\u0434\u044b\u0435 5 ns, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0438\u043e\u0434 \u0442\u0430\u043a\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d 10 ns. \u0421\u0438\u0433\u043d\u0430\u043b \u0441\u0431\u0440\u043e\u0441\u0430 \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u043b\u043e\u043a\u0430 <code>initial<\/code>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0446\u0438\u043a\u043b <code>repeat (3)<\/code>, \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0436\u0438\u0434\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0445 \u0444\u0440\u043e\u043d\u0442\u043e\u0432 \u0442\u0430\u043a\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 <code>@(posedge clk)<\/code>, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0441\u0438\u0433\u043d\u0430\u043b \u0441\u0431\u0440\u043e\u0441\u0430 \u0432 \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<\/p>\n<pre><code> \/\/ \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430   always #5 clk = ~clk;    \/\/ \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0441\u0431\u0440\u043e\u0441\u0430 \u0432 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 3 \u0442\u0430\u043a\u0442\u043e\u0432   initial begin     repeat (3) @(posedge clk);     reset &lt;= 1'b0;   end  <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0431\u043b\u043e\u043a \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e\u0436\u0438\u0434\u0430\u0435\u043c\u0441\u044f \u0441\u043f\u0430\u0434\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0441\u0431\u0440\u043e\u0441\u0430 <code>@(negedge reset)<\/code>, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430\u0448 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0442\u043e\u0432 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u043d\u0443\u0442\u0440\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0446\u0438\u043a\u043b\u0430 <code>for<\/code> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u0443 <code>valid_i<\/code> \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0446\u0438\u043a\u043b\u0430 <code>repeat(2)<\/code> \u043e\u0436\u0438\u0434\u0430\u0435\u043c \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430 <code>@(posedge clk)<\/code>. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u043b <code>valid_i<\/code> \u0432 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0438 \u0436\u0434\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0442\u0430\u043a\u0442. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u0438\u0433\u043d\u0430\u043b \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043d\u0430 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0440\u0435\u0442\u0438\u0439 \u0442\u0430\u043a\u0442. \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0442\u0430\u043a\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>$urandom()<\/code> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u043c <code>data1_i<\/code> \u0438 <code>data2_i<\/code> \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 <code>trans_number<\/code> \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u043c \u0442\u0435\u0441\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>$finish<\/code>.<\/p>\n<pre><code>  \/\/ \u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439.    initial begin     \/\/ \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0441\u043d\u044f\u0442\u0438\u044f \u0441\u0431\u0440\u043e\u0441\u0430     @(negedge reset);      for (trans_cnt = 0; trans_cnt &lt; trans_number; trans_cnt = trans_cnt + 1) begin       \/\/ \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u0431\u0430 \u0432 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430       \/\/ \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0438\u044f \u0441\u0442\u0440\u043e\u0431 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0444\u0438\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435       valid_i &lt;= 1'b0;       repeat(2) begin           data1_i &lt;= $urandom(seed);           data2_i &lt;= $urandom(seed);           @(posedge clk);       end       \/\/ \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u043d\u0438\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u0442\u0440\u043e\u0431\u0430       valid_i &lt;= 1'b1;       data1_i &lt;= $urandom(seed);       data2_i &lt;= $urandom(seed);       @(posedge clk);     end     \/\/ \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u0430     $finish;   end <\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0435\u0446 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d <code>initial<\/code> \u0431\u043b\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0432 \u0444\u0430\u0439\u043b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 VCD.<\/p>\n<pre><code>  \/\/ \u0434\u0430\u043c\u043f waveforms \u0432 VCD \u0444\u043e\u0440\u043c\u0430\u0442\u0435   initial begin     $dumpfile(\"wave_dump.vcd\");     $dumpvars(0);   end endmodule <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/yy\/ln\/dr\/yylndrmzxsaxmr-xuqfyilffny0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/yy\/ln\/dr\/yylndrmzxsaxmr-xuqfyilffny0.png\"\/><\/figure>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0430\u0440\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u0433\u043d\u0430\u043b \u0441\u0431\u0440\u043e\u0441\u0430 <code>reset<\/code> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u0438 \u0437\u0430\u0442\u0435\u043c \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u0444\u0440\u043e\u043d\u0442\u0435 \u0442\u0430\u043a\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0414\u0430\u043b\u0435\u0435 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0435 \u0438 \u043a\u0430\u0436\u0434\u044b\u0435 \u0442\u0440\u0438 \u0442\u0430\u043a\u0442\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0438\u0433\u043d\u0430\u043b \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u043d \u043d\u0430 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430. \u0421\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u0433\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u043c\u0438 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u0434\u043d\u0430\u043a\u043e, \u0443 \u043d\u0430\u0441 \u0435\u0449\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0440 \u0434\u043b\u044f \u0435\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f. \u041e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u0441\u0432\u043e\u0438\u0445 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e \u0438 \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430 \u043d\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0442\u043e\u0432 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u044c. \u042d\u0442\u043e \u0443\u0436\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 &#8212; AMBA AXI-Stream. \u041c\u044b \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u044d\u0442\u0438\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c.<\/p>\n<p>\u0410\u0432\u0442\u043e\u0440: \u0428\u0435\u0432\u0446\u0435\u0432 \u0412\u043b\u0430\u0434\u0438\u043c\u0438\u0440 \u0410\u043d\u0434\u0440\u0435\u0435\u0432\u0438\u0447, FPGA\u00a0\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><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:\/\/habr.com\/ru\/articles\/767196\/\"> https:\/\/habr.com\/ru\/articles\/767196\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h4>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/h4>\n<ul>\n<li>\n<p>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440<\/p>\n<\/li>\n<li>\n<p>\u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<\/ul>\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f RTL-\u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Verilog. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 AXI-Stream \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438. \u041c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0435\u043c\u044b \u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b, \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0442\u0438\u043f\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 RTL-\u043c\u043e\u0434\u0443\u043b\u0435\u0439.<\/p>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043d\u0430\u043c\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430. \u041f\u0440\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044d\u0442\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\u0445. \u041c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043a \u0441\u043b\u043e\u0436\u043d\u043e\u043c\u0443 \u0438 \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u043c\u0438 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h4>\u041a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440<\/h4>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440. \u0421\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434\u044b <code>data1_i<\/code> \u0438 <code>data2_i<\/code>. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>WIDTH<\/code> \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c. \u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0448\u0438\u0440\u0438\u043d\u0430 \u0448\u0438\u043d\u044b \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 <code>data_o<\/code> \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0448\u0438\u0440\u0438\u043d\u044b \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 Verilog \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432\u0441\u0435\u0433\u043e \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>assign<\/code>:<\/p>\n<pre><code>\/\/! \u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440. \/\/! \u0420\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445.  module adder_comb #(     parameter integer WIDTH = 4     \/\/! \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 ) (     input  [WIDTH-1:0] data1_i,     \/\/! \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435     input  [WIDTH-1:0] data2_i,     \/\/! \u0432\u0442\u043e\u0440\u043e\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435     output [  WIDTH:0] data_o       \/\/! \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f );    \/\/! \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u0435 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435   assign data_o = data1_i + data2_i;  endmodule <\/code><\/pre>\n<p>\u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0438\u0436\u0435. \u0412 \u0432\u0438\u0434\u0435 \u043e\u0431\u043b\u0430\u043a\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u0435\u043d\u0442\u0438\u043b\u0438.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0418\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0445\u0435\u043c.<\/p>\n<figure class=\"\"><\/figure>\n<h4>\u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432<\/h4>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0442\u043e\u043d\u043e\u043c \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u043d\u0430 \u0438\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c FPGA \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0434\u0438\u043a\u0442\u043e\u0432\u0430\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043a \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e, \u0438\u043d\u0430\u0447\u0435 \u0438\u0445 \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u043e\u0449\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0430\u043a\u0442\u043e\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c. \u0427\u0430\u0441\u0442\u043e\u0442\u0430, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438. \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0438, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0432\u044b\u0445\u043e\u0434\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u044f. \u041c\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0438 \u0443\u0431\u0435\u0434\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u0432 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0442\u0430\u043a\u0442\u043e\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u0435. \u041d\u0430\u0448 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0431\u043b\u043e\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0432\u044b\u0445\u043e\u0434\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f. \u0422\u0430\u043a \u0441\u043e\u0432\u043f\u0430\u043b\u043e, \u0447\u0442\u043e \u043e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0441\u0432\u043e\u0439 \u0431\u043b\u043e\u043a \u0431\u0435\u0437 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u041a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0432\u0445\u043e\u0434 \u043c\u043e\u0434\u0443\u043b\u044f \u043a\u043e\u043b\u043b\u0435\u0433\u0438 \u0432 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439. \u0422\u0430\u043a \u043a\u0430\u043a \u0438\u043d\u043e\u0433\u0434\u0430 \u0431\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0431\u043b\u043e\u043a\u0438, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e, \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043a\u0438 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430 \u0435\u0433\u043e \u0432\u0445\u043e\u0434\u044b \u0438 \u0432\u044b\u0445\u043e\u0434\u044b \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0441\u0445\u0435\u043c\u0430 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u043f\u0443\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u043d\u043e\u0441\u0438\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0432 \u043e\u0434\u0438\u043d \u043f\u0435\u0440\u0438\u043e\u0434 \u0442\u0430\u043a\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0434\u0432\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0430\u0447\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445. \u042d\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e \u043d\u0438\u0436\u0435 \u043d\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u0445:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0440\u0442 <code>reset<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0441\u0431\u0440\u043e\u0441\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0432 \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f.<\/p>\n<h4>\u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0442\u0430\u043a\u0442\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0438\u0445 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0422\u043e \u0435\u0441\u0442\u044c, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0444\u0440\u043e\u043d\u0442\u0430 \u0442\u0430\u043a\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430, \u043d\u0430 \u0432\u0445\u043e\u0434\u0430\u0445 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u043e, \u0442\u043e \u0432\u043e \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0438 \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0445 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u043e\u0434\u0443\u043b\u044f. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044d\u0442\u0438 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043c\u043e\u0434\u0443\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u0432\u044b\u0445\u043e\u0434\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u0434\u043d\u043e\u0431\u0438\u0442\u043d\u044b\u0439 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b <code>valid_i<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c\u0438. \u042d\u0442\u043e\u0442 \u0441\u0438\u0433\u043d\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a\u043e \u0432\u0445\u043e\u0434\u0430\u043c clock enable (ce) \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 <code>valid_i<\/code>, \u0438 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u0443\u043c\u043c\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0421\u0445\u0435\u043c\u0430 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0440\u0430\u043d\u0435\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u043e\u043c, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043a \u043d\u0435\u043c\u0443 \u0442\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0432\u0430 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0440\u0442 clock enable. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0430 Verilog \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0438\u0436\u0435. \u0411\u043b\u043e\u043a\u0438 <code>always<\/code> \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 <code>data1_i_reg<\/code>, <code>data2_i_reg<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b. \u0411\u043b\u043e\u043a <code>always<\/code> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c  <code>data_o_reg<\/code> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440.<\/p>\n<pre><code>\/\/! \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c.  module adder_valid_i #(     parameter integer WIDTH = 4  \/\/! \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 ) (     input clk,                      \/\/! \u0442\u0430\u043a\u0442\u043e\u0432\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b     input reset,                    \/\/! \u0441\u0438\u0433\u043d\u0430\u043b \u0441\u0431\u0440\u043e\u0441\u0430, \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c - 1     input valid_i,                  \/\/! \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b     input [WIDTH-1:0] data1_i,      \/\/! \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435     input [WIDTH-1:0] data2_i,      \/\/! \u0432\u0442\u043e\u0440\u043e\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435     output reg [WIDTH:0] data_o     \/\/! \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f );    reg  [WIDTH-1:0] adder_in_1;  \/\/! \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0445\u043e\u0434 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430   reg  [WIDTH-1:0] adder_in_2;  \/\/! \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0445\u043e\u0434 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430   wire [  WIDTH:0] adder_out;   \/\/! \u0432\u044b\u0445\u043e\u0434 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430    \/\/! \u0432\u0445\u043e\u0434\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0433\u043e   always @(posedge clk) begin : data1_i_reg     if (reset) adder_in_1 &lt;= '0;     else if (valid_i) adder_in_1 &lt;= data1_i;   end    \/\/! \u0432\u0445\u043e\u0434\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0433\u043e   always @(posedge clk) begin : data2_i_reg     if (reset) adder_in_2 &lt;= '0;     else if (valid_i) adder_in_2 &lt;= data2_i;   end    \/\/! \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440   adder_comb #(       .WIDTH(WIDTH)   ) adder_comb (       .data1_i(adder_in_1),       .data2_i(adder_in_2),       .data_o (adder_out)   );    \/\/! \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440   always @(posedge clk) begin : data_o_reg     if (reset) data_o &lt;= '0;     else data_o &lt;= adder_out;   end   endmodule <\/code><\/pre>\n<p>\u0418\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u043c\u043e\u0434\u0443\u043b\u044f \u0440\u0430\u0432\u0435\u043d \u0441\u0443\u043c\u043c\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<figure class=\"\"><\/figure>\n<h4>\u0421\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u041a\u0430\u043a \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0445 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043f\u043e\u043a\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434\u044b \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u043d\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u044f\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0435\u0433\u043e \u0432\u044b\u0445\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u042d\u0442\u043e \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u0432\u044b\u0445\u043e\u0434\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430, \u0435\u0441\u043b\u0438 \u0435\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0449\u0435\u043b\u043a\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435, \u0430 \u043d\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c <code>valid_i<\/code> \u0438 \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430, \u0442\u043e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0447\u0435\u0440\u0435\u0437 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f.<\/p>\n<p>\u041b\u0443\u0447\u0448\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0430\u0448 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u043e\u0434\u043d\u043e\u0431\u0438\u0442\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0440\u0442 <code>valid_o<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b. \u0411\u043b\u043e\u043a, \u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430, \u0431\u0443\u0434\u0435\u0442 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u0430 <code>valid_o<\/code> \u043f\u0440\u0438 \u0437\u0430\u0449\u0435\u043b\u043a\u0438\u0432\u0430\u043d\u0438\u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041b\u043e\u0433\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u0432 \u043d\u0430 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430 \u0441\u0438\u0433\u043d\u0430\u043b <code>valid_i<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432. \u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440\u0430 \u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0438\u0436\u0435:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0445\u0435\u043c\u0430, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u0432\u0443\u0445 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u043e \u0441\u0445\u0435\u043c\u043e\u0439 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0421\u0445\u0435\u043c\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u0438\u0434:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Verilog. \u041c\u043e\u0434\u0443\u043b\u044c <code>adder_valid_i<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438. \u0411\u043b\u043e\u043a <code>always<\/code> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>valid_i_shift_reg<\/code> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043b\u0438\u043d\u0438\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u0430 \u0434\u0432\u0430 \u0442\u0430\u043a\u0442\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0441\u0434\u0432\u0438\u0433\u0430. \u0412\u044b\u0445\u043e\u0434 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0441\u0434\u0432\u0438\u0433\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0441\u0438\u0433\u043d\u0430\u043b \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 <code>valid_o<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>assign<\/code>.<\/p>\n<pre><code> \/\/! \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c.  module adder_valid_io #(     parameter integer WIDTH = 4  \/\/! \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 ) (     input              clk,      \/\/! \u0442\u0430\u043a\u0442\u043e\u0432\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b     input              reset,    \/\/! \u0441\u0438\u0433\u043d\u0430\u043b \u0441\u0431\u0440\u043e\u0441\u0430, \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c - 1     input              valid_i,  \/\/! \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b     input  [WIDTH-1:0] data1_i,  \/\/! \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435     input  [WIDTH-1:0] data2_i,  \/\/! \u0432\u0442\u043e\u0440\u043e\u0435 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435     output             valid_o,  \/\/! \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b     output [  WIDTH:0] data_o    \/\/! \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f );    \/\/! \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0441\u0434\u0432\u0438\u0433\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0441\u0442\u0440\u043e\u0431-\u0441\u0438\u0433\u043d\u0430\u043b\u0430   reg [1:0] valid_shift_reg;    \/\/! \u0441\u0443\u043c\u043c\u0430\u0442\u043e\u0440 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-357380","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/357380","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=357380"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/357380\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=357380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=357380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=357380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}