{"id":3531,"date":"2023-04-06T14:34:08","date_gmt":"2023-04-06T06:34:08","guid":{"rendered":"http:\/\/www.hellofpga.com\/?p=3531"},"modified":"2023-04-06T16:20:19","modified_gmt":"2023-04-06T08:20:19","slug":"verilog_01","status":"publish","type":"post","link":"http:\/\/www.hellofpga.com\/index.php\/2023\/04\/06\/verilog_01\/","title":{"rendered":"Verilog \u5feb\u901f\u4e0a\u624b\u7b14\u8bb0"},"content":{"rendered":"\n<p>\u672c\u6587\u4e3a\u81ea\u5df1\u6574\u7406\u7684Verilog\u5feb\u901f\u4e0a\u624b\u7b14\u8bb0\uff0c<strong>\u7b14\u8bb0\u501f\u9274\u4e86\u590f\u5b87\u95fb\u8001\u5e08\u7684 \u300aVerilog\u6570\u5b57\u7cfb\u7edf\u8bbe\u8ba1\u6559\u7a0b\u300b<\/strong>\uff0c\u4ee5\u53ca\u81ea\u5df1\u5bf9verilog\u7684\u4e00\u4e9b\u7406\u89e3\uff0c\u4e5f\u501f\u9274\u4e86\u7f51\u7edc\u4e0a\u7684\u4e00\u4e9b\u5173\u4e8everilog\u7684\u8d44\u6599\u6574\u7406\u800c\u6765<\/p>\n\n\n\n<p>\u56e0\u4e3a\u7b14\u8bb0\u6bd4\u8f83\u7b80\u5355\uff0c\u800cverilog\u672c\u8eab\u53c8\u6bd4\u8f83\u5e9e\u5927\uff0c\u52a0\u4e0a\u81ea\u5df1\u80fd\u529b\u4e5f\u6709\u5c40\u9650\uff0c\u6240\u4ee5\u4ec5\u4f9b\u6ca1\u6709verilog\u57fa\u7840\u7684\u4eba\u5feb\u901f\u4e86\u89e3\u4e4b\u7528\uff0c \u5982\u9700\u6df1\u5165\u7cfb\u7edf\u7684\u5b66\u4e60verilog \u8fd8\u662f\u5efa\u8bae\u5927\u5bb6\u770b\u5b8c\u6574\u7684verilog\u4e66\u7c4d\u6765\u7cfb\u7edf\u5b66\u4e60\u6700\u4f73<\/p>\n\n\n\n<p>\u53e6\u5916 \u867d\u7136verilog\u5728\u5f88\u591a\u8bed\u6cd5\u4e0a\u548cc\u8bed\u8a00\u975e\u5e38\u7c7b\u4f3c  \uff0c\u4f46\u662f\u4e00\u5b9a\u8981\u8bb0\u4f4f <strong>verilog\u662f\u4e00\u95e8\u786c\u4ef6\u63cf\u8ff0\u8bed\u8a00\uff0c\u8bf7\u628a\u5b83\u548c\u8f6f\u4ef6\u7f16\u7a0b\u8bed\u8a00\u533a\u5206\u5f00\uff0c\u56e0\u4e3a\u4f60\u6240\u5199\u7684\u6bcf\u4e00\u4e2a\u903b\u8f91\u90fd\u4f1a\u6700\u7ec8\u5bf9\u5e94\u6210\u5b9e\u5b9e\u5728\u5728\u7684\u786c\u4ef6\u8d44\u6e90\u7684<\/strong><\/p>\n\n\n\n<p>\u8d44\u6599\u5199\u7684\u867d\u7136\u6d45\u663e\uff0c\u4f46\u662f\u4e5f\u662f\u82b1\u4e86\u597d\u4e9b\u65e5\u5b50\u6574\u7406\u7684\uff0c\u5927\u5bb6\u6709\u4ec0\u4e48\u7591\u95ee\u76f4\u63a5 \u5728\u7f51\u7ad9\u4e0b\u65b9\u7559\u8a00\u5373\u53ef\uff0c\u770b\u5230\u4f1a\u56de\u590d  \u540e\u7eed\u6709\u7cbe\u529b\u4f1a\u6574\u7406\u5177\u4f53\u7684verilog \u5c0f\u6a21\u5757\u4f8b\u5b50<\/p>\n\n\n\n<p>\u8d44\u6599\u6574\u7406\u5728\u7f51\u7ad9hellofpga.com\u4e0b\uff0c\u5982\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u6a21\u5757\u7684\u7ed3\u6784<\/strong><\/h2>\n\n\n\n<p>Verilog\u8bbe\u8ba1\u7684\u57fa\u672c\u5355\u5143\u662f\u6a21\u5757&#8221;module&#8221; \u4e5f\u79f0\u4f5c(block)\uff0c\u6a21\u5757\u7531\u4e24\u90e8\u5206\u7ec4\u6210\uff0c\u4e00\u90e8\u5206\u63cf\u8ff0\u63a5\u53e3\uff0c\u53e6\u4e00\u90e8\u5206\u63cf\u8ff0\u903b\u8f91\u529f\u80fd\uff08\u903b\u8f91\u529f\u80fd\u5373\u6a21\u5757\u7684\u529f\u80fd\uff0c\u5373\u8f93\u5165\u5982\u4f55\u5f71\u54cd\u8f93\u51fa\uff09<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">1 module and_block(\n2   input A ,\n3   input B ,\n4   output Y\n5 );\n6\n7 assign Y = A &amp; B;\n8\n9 endmodule<\/pre>\n\n\n\n<p>\u4e0a\u9762\u63cf\u8ff0\u4e86\u4e00\u4e2a\u4e0e\u95e8\u7684\u5b8c\u6574\u6a21\u5757\uff0c\u6211\u4eec\u7740\u91cd\u5173\u6ce8\u4e0b\u4ee3\u7801\u7684\u7ed3\u6784<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6a21\u5757\u7531 module \u5f00\u59cb  \uff0c\u7531endmodule \u7ed3\u675f<\/strong><\/li>\n\n\n\n<li><strong>module \u540e\u8ddf\u7740\u7684\u662f\u6a21\u5757\u540d<\/strong>\uff0c\u8fd9\u91cc\u662fand_block(\u8fd9\u91cc\u540d\u79f0\u53ef\u4ee5\u6839\u636e\u8bbe\u8ba1\u7684\u529f\u80fd\u81ea\u884c\u66f4\u6539)<\/li>\n\n\n\n<li><strong>\u6a21\u5757\u58f0\u660e\u7684\u62ec\u53f7\u4e2d\u7684\u662f  \u7aef\u53e3\u4fe1\u53f7\uff0c\u5176\u4e2dinput\u4ee3\u8868\u8f93\u5165\u4fe1\u53f7\uff0coutput\u4ee3\u8868\u8f93\u51fa\u4fe1\u53f7\uff0cinout\u4ee3\u8868\u53cc\u5411\u8f93\u5165\u8f93\u51fa\u53e3<\/strong>\uff0c\u6bcf\u4e00\u4e2a\u4fe1\u53f7\u4ee5&#8221;,&#8221;\u6765\u5212\u5206\uff0c \u6700\u540e\u4e00\u4e2a\u4fe1\u53f7 \u4e0d\u52a0\u4efb\u4f55\u6807\u70b9<\/li>\n\n\n\n<li><strong>\u6a21\u5757\u7684\u903b\u8f91\u529f\u80fd\u90e8\u5206\uff08\u6a21\u5757\u7684\u529f\u80fd\uff0c\u5373\u8f93\u5165\u5982\u4f55\u5f71\u54cd\u8f93\u51fa\uff0c\u8fd9\u91cc\u662fY = A &amp; B\uff09<\/strong><\/li>\n\n\n\n<li><strong>\u6a21\u5757\u58f0\u660e\u7ed3\u675f\u540e \u5fc5\u987b\u8981\u5728\u53f3\u62ec\u53f7\u540e\u589e\u52a0\u5206\u53f7\u201c\uff1b\u201d<\/strong><\/li>\n<\/ul>\n\n\n\n<p>\u4e0a\u8ff0\u4ee3\u7801\u7684\u529f\u80fd\u5f88\u7b80\u5355\uff0c\u5b9e\u9645\u7684\u529f\u80fd\u5c31\u662f  \u8f93\u51fay\u7684\u7ed3\u679c \u7b49\u4e8e \u8f93\u5165a\u548cb\u7684\u76f8\u4e0e\uff0c\u5176\u529f\u80fd\u5c31\u76f8\u5f53\u4e8e\u4e0b\u56fe\u7684\u4e0e\u95e8\u529f\u80fd<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/03\/image-92.png\" alt=\"\" class=\"wp-image-3533\" width=\"218\" height=\"94\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u5176\u5b9e\u6a21\u5757\u7684\u58f0\u660e\u6709\u591a\u79cd\u65b9\u5f0f    \u540c\u6837\u62ff\u4e0a\u9762\u7684\u4ee3\u7801\u6765\u4e3e\u4f8b  \u7533\u660e\u53ef\u4ee5\u662f\u4e0b\u9762\u4e24\u79cd\u5f62\u5f0f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">1 module and_block(\n2   input A ,\n3   input B ,\n4   output Y\n5 );<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">1 module and_block(A,B,Y);\n\n2   input A ;\n3   input B ;\n4   output Y ;<\/pre>\n\n\n\n<p>\u4e0a\u9762\u4e24\u79cd\u65b9\u5f0f\u90fd\u662f\u53ef\u4ee5\u7684\uff0c\u533a\u522b\u5c31\u662f\u5728\u7533\u660e\u7684\u65f6\u5019\u5b9a\u4e49\u7aef\u53e3\u7c7b\u578b\uff0c \u8fd8\u662f\u5148\u7533\u660e\u6709\u54ea\u4e9b\u4fe1\u53f7\u540e\uff0c\u518d\u5728\u540e\u9762\u63cf\u8ff0\u7aef\u53e3\u7684\u7c7b\u578b<\/p>\n\n\n\n<p><strong>\u6ce8\u610f\uff0c\u4e0a\u8ff0\u7684A \uff0cB \u548c Y\u4fe1\u53f7\u90fd\u662f1\u4f4d\u7684\uff0c \u5927\u90e8\u5206\u4f7f\u7528\u573a\u5408\u8f93\u5165\u8f93\u51fa\u4fe1\u53f7\u90fd\u4e0d\u6b621\u4f4d\u7684\u65f6\u5019\uff0c\u90a3\u5b9a\u4e49\u63a5\u53e3\u7c7b\u578b\u7684\u65f6\u5019\u5c31\u8981\u6309\u4e0b\u8ff0\u65b9\u6cd5\u6765\u5b9a\u4e49\u4e86<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>input  &#91;\u4fe1\u53f7\u4f4d\u5bbd-1:0]\u7aef\u53e3\u540d;  \u8f93\u5165\u53e3\noutput &#91;\u4fe1\u53f7\u4f4d\u5bbd-1:0]\u7aef\u53e3\u540d;  \u8f93\u51fa\u53e3\ninout  &#91;\u4fe1\u53f7\u4f4d\u5bbd-1:0]\u7aef\u53e3\u540d;  \u8f93\u5165\/\u8f93\u51fa\u53e3<\/strong>\n\n<strong>\u4e3e\u4e2a\u4f8b\u5b50<\/strong>\n<strong>input &#91;2-1:0]A;  \u5c31\u662f\u5b9a\u4e49\u4e86\u4e00\u4e2a2\u4e2abit\u4f4d\u5bbd\u7684 \u8f93\u5165\u4fe1\u53f7A<\/strong>\n<strong>\u5907\u6ce8(\u6ca1\u6709\u8bf4\u660ereg \u6216\u8005 wire\u7c7b\u578b\u7684\u65f6\u5019\uff0c input output \u9ed8\u8ba4\u5b9a\u4e49\u7684A\u90fd\u662f wire\u7c7b\u578b\u7684)<\/strong><\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6570\u636e\u7c7b\u578b \u5e38\u91cf<\/h2>\n\n\n\n<p><strong>1.\u6570\u5b57\u7c7b\u578b<\/strong>  <\/p>\n\n\n\n<p>\u5728Verilog HDL \u4e2d\uff0c\u6574\u5f62\u5e38\u91cf\u6709\u4ee5\u4e0b\u56db\u79cd\u8868\u793a\u65b9\u5f0f<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4e8c\u8fdb\u5236   b\u6216B<\/li>\n\n\n\n<li>\u5341\u8fdb\u5236   d\u6216D<\/li>\n\n\n\n<li>\u5341\u516d\u8fdb\u5236   h\u6216H<\/li>\n\n\n\n<li>\u516b\u8fdb\u5236      o\u6216\u8005O<\/li>\n<\/ul>\n\n\n\n<p><strong>\u6570\u5b57\u7684\u8868\u793a\u65b9\u5f0f\u4e00\u822c\u7531   &lt;\u4f4d\u5bbd&gt;&lt;\u8fdb\u5236&gt;&lt;\u6570\u5b57&gt;\u5f62\u5f0f\u8fdb\u884c\u63cf\u8ff0<\/strong>   \u4e3e\u51e0\u4e2a\u4f8b\u5b50<\/p>\n\n\n\n<p>8&#8217;d128     8\u4ee3\u88688bit \u4f4d\u5bbd\uff08\u540e\u8fb9\u8ddf\u4e00\u4e2a\u7b26\u53f7 &#8216; \uff09\uff0cd\u4ee3\u8868\u5341\u8fdb\u5236  \uff0c128\u4ee3\u8868\u5341\u8fdb\u5236\u7684128\u7684\u610f\u601d<\/p>\n\n\n\n<p>8\u2018b00000001   \u540c\u6837\u4ee3\u8868 8bit\u7684  \u4e8c\u8fdb\u5236\u7684 00000001\uff08\u5176\u503c\u7b49\u540c\u4e8e 8&#8217;d1 \u53738bit\u5341\u8fdb\u5236\u76841\uff09<\/p>\n\n\n\n<p>\u4f46\u662f 8&#8217;d500   \u8fd9\u4e2a\u5c31\u662f<strong>\u9519\u8bef<\/strong>\u7684\uff0c\u56e0\u4e3a500\u5bf9\u5e94\u7684 \u4e8c\u8fdb\u5236\u662f 111110100 \u4e00\u5171\u662f9\u4f4d\uff0c\u5df2\u7ecf\u8d85\u8fc78\u4f4d\u4f4d\u5bbd\u4e86\uff0c8bit\u7684\u8303\u56f4\u53ea\u80fd\u662f0-255  \uff0c\u8fd9\u91cc\u8981\u7279\u522b\u6ce8\u610f\uff0c\u5426\u5219\u5199\u7a0b\u5e8f\u7684\u65f6\u5019\u5bb9\u6613\u6ea2\u51fa<\/p>\n\n\n\n<p><strong>2. x\u548cz \u503c<\/strong><\/p>\n\n\n\n<p>\u5728\u6570\u5b57\u7535\u8def\u4e2d\uff0c\u9664\u4e860\u548c1\u4ee5\u5916\uff0c\u8fd8\u6709\u53e6\u5916\u4e24\u79cd\u60c5\u51b5\uff0c\u90a3\u5c31\u662f \u4e0d\u5b9a\u503c \u548c\u9ad8\u963b\u6001\uff0c \u5176\u4e2dx \u4ee3\u8868\u4e0d\u5b9a\u503c\uff0c z\u4ee3\u8868\u9ad8\u963b\u6001\uff0c\u5bf9\u4e8e\u6ca1\u6709\u8fdb\u884c\u521d\u59cb\u5316\u7684\u4fe1\u53f7\uff0c\u4e00\u822c\u5904\u4e8e\u4e0d\u786e\u5b9a\u503c x\uff08\u4eff\u771f\u7684\u65f6\u5019\u7ecf\u5e38\u4f1a\u51fa\u73b0\uff09\uff0c\u9ad8\u963b\u6001\u8868\u793a\u8be5\u4fe1\u53f7\u6ca1\u6709\u88ab\u5176\u4ed6\u4fe1\u53f7\u9a71\u52a8\uff08\u53ef\u4ee5\u7b80\u5355\u7406\u89e3\u4e3a\u60ac\u7a7a\u72b6\u6001\uff09<\/p>\n\n\n\n<p>x\u548cz \u5728\u4e8c\u8fdb\u5236\u4e2d\u4ee3\u88681\u4f4d\uff0c\u5728\u516b\u8fdb\u5236\u4e2d\u4ee33\u4f4dx\u6216\u8005z\uff0c\u5728\u5341\u516d\u8fdb\u5236\u4e2d\u4ee3\u88684\u4f4dx\u6216\u8005z<\/p>\n\n\n\n<p><strong>3. \u4e0b\u5212\u7ebf  _ <\/strong><\/p>\n\n\n\n<p>\u4e0b\u5212\u7ebf\u53ea\u662f\u7528\u6765\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u7684\uff0c\u5f53\u4e00\u4e32\u6570\u5b57\u6bd4\u8f83\u957f\u7684\u65f6\u5019 \u6211\u4eec\u5c31\u53ef\u4ee5\u7528\u4e0b\u5212\u7ebf\u6765\u8fdb\u884c\u5206\u5272<\/p>\n\n\n\n<p>\u6bd4\u65b9\u8bf425&#8217;d50_000_000   \u8fd9\u91cc\u5176\u5b9e\u7b49\u540c\u4e8e25&#8217;d50000000\u53ea\u662f\u4ee3\u7801\u53ef\u8bfb\u6027\u66f4\u5f3a\u4e86<\/p>\n\n\n\n<p><strong>4. \u53c2\u6570parameter <\/strong><\/p>\n\n\n\n<p>\u53ef\u4ee5\u7406\u89e3\u4e3aC\u8bed\u8a00\u4e2d\u5b9a\u4e49\u7684\u5e38\u91cf\uff0cparameter \u53c2\u6570\u540d=\u6570\u503c  <\/p>\n\n\n\n<p>\u5982 parameter a=25\uff1b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6570\u636e\u7c7b\u578b \u53d8\u91cf<\/h2>\n\n\n\n<p><strong>\u53d8\u91cf<\/strong> \uff08\u5373\u7a0b\u5e8f\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u5176\u503c\u53ef\u4ee5\u6539\u53d8\u7684\u91cf\uff09\u5e38\u7528\u7684\u53d8\u91cf\u7684\u6570\u636e\u7c7b\u578b\u6709 reg \uff0cwire<\/p>\n\n\n\n<p><strong>wire\u578b<\/strong><\/p>\n\n\n\n<p><strong>wire \u53ef\u4ee5\u7406\u89e3\u4e3a\u7269\u7406\u8fde\u7ebf<\/strong>\uff0c\u5373\u53ea\u8981\u8f93\u5165\u6709\u53d8\u5316\uff0c\u8f93\u51fa\u9a6c\u4e0a\u65e0\u6761\u4ef6\u5730\u53cd\u6620\uff0c\u4e0d\u80fd\u4fdd\u5b58\u6570\u636e\uff0c\u800c\u4e14\u5fc5\u987b\u6536\u5230\u9a71\u52a8\u5668\uff08\u5982\u95e8\u6216\u8005\u8fde\u7eed\u8d4b\u503c\u8bed\u53e5assgin\uff09\u7684\u9a71\u52a8\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wire &#91;n-1:0]\u6570\u636e\u540d;    n-1\u4ee3\u8868\u6570\u636e\u7684\u4f4d\u5bbd\u662fn\u4f4d ,\u6570\u636e\u540d\u4ee3\u8868\u6570\u636e\u7684\u540d\u79f0 \u4e3e\u4e2a\u4f8b\u5b50\nwire &#91;8-1:0]a ;    \u5b9a\u4e49\u4e86\u4e00\u4e2a8\u4f4d\u7684wire\u578b\u6570\u636e\uff0c\u5e76\u4e14\u547d\u540d\u4e3aa\n\u5982\u679c\u53ea\u5b9a\u4e491\u4f4d\u7684wire\u578b \u5c31\u4e0d\u9700\u8981\u5b9a\u4e49\u4f4d\u5bbd \u6bd4\u65b9\u8bf4 \nwire b;  \u5c31\u4ee3\u8868\u5b9a\u4e49\u4e861\u4f4d\u7684wire\u578b<\/code><\/pre>\n\n\n\n<p><strong>reg\u578b<\/strong><\/p>\n\n\n\n<p><strong>reg\u4ee3\u8868\u5bc4\u5b58\u5668<\/strong>\uff0c\u5bc4\u5b58\u5668\u53ea\u6709\u624d\u5728\u89e6\u53d1\u7684\u6761\u4ef6\u4e0b\u624d\u80fd\u6539\u53d8\u503c\uff0c\u6ca1\u6709\u8f93\u5165\u7684\u65f6\u5019\u53ef\u4ee5\u4fdd\u5b58\u539f\u6765\u7684\u503c\uff08\u5373\u5bc4\u5b58\u5668\u53ef\u4ee5\u5728\u4e0b\u4e00\u6b21\u89e6\u53d1\u4e4b\u524d\u9501\u5b58\u5f53\u524d\u7684\u6570\u636e\uff09<\/p>\n\n\n\n<p><strong>reg\u548cwire\u7684\u533a\u522b<\/strong>\u662f \uff1areg\u53ef\u4ee5\u4fdd\u6301\u6700\u540e\u4e00\u6b21\u7684\u8d4b\u503c\uff0c\u800cwire\u6570\u636e\u9700\u8981\u6301\u7eed\u7684\u9a71\u52a8  wire \u901a\u5e38\u9700\u8981assign \u8bed\u53e5\u8fdb\u884c\u8fde\u63a5\uff0c  \u800creg \u4e00\u822c\u9700\u8981\u5728 initial \u548calways \u5757\u4e2d\u8fdb\u884c\u8d4b\u503c \uff08\u5728\u201calways\u201d\u5757\u5185\u88ab\u8d4b\u503c\u7684\u6bcf\u4e00\u4e2a\u4fe1\u53f7\u90fd\u5fc5\u987b\u5b9a\u4e49\u6210reg\u578b\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nreg\u7684\u5b9a\u4e49\u540cwire\u578b\u76f8\u4f3c\nreg&#91;n-1:0]\u6570\u636e\u540d;    n-1\u4ee3\u8868\u6570\u636e\u7684\u4f4d\u5bbd\u662fn\u4f4d ,\u6570\u636e\u540d\u4ee3\u8868\u6570\u636e\u7684\u540d\u79f0 \u4e3e\u4e2a\u4f8b\u5b50\nreg &#91;8-1:0]a ;       \u5b9a\u4e49\u4e86\u4e00\u4e2a8\u4f4d\u7684reg\u578b\u6570\u636e\uff0c\u5e76\u4e14\u547d\u540d\u4e3aa\n\u5982\u679c\u53ea\u5b9a\u4e491\u4f4d\u7684reg\u578b \u5c31\u4e0d\u9700\u8981\u5b9a\u4e49\u4f4d\u5bbd \u6bd4\u65b9\u8bf4  \nreg b;   \u5c31\u4ee3\u8868\u5b9a\u4e49\u4e861\u4f4d\u7684reg<\/code><\/pre>\n\n\n\n<p><strong>memory\u578b<\/strong><\/p>\n\n\n\n<p>verilog \u901a\u8fc7\u5bf9reg\u578b\u53d8\u91cf\u5efa\u7acb\u6570\u7ec4\u6765\u5bf9\u5b58\u50a8\u5668\u5efa\u6a21\uff0c\u4ece\u800c\u63cf\u8ff0ram\u6216\u8005rom\u5b58\u50a8\u5668\u3002\u6570\u7ec4\u4e2d\u7684\u6bcf\u4e00\u4e2a\u5355\u5143\u901a\u8fc7\u4e00\u4e2a\u6570\u7ec4\u7d22\u5f15\u8fdb\u884c\u5bfb\u5740\u3002\u5728Verilog\u8bed\u8a00\u4e2d\u6ca1\u6709\u591a\u7ef4\u6570\u7ec4\u5b58\u5728\u3002\uff08memory\u578b\u6570\u636e\u662f\u901a\u8fc7\u6269\u5c55reg\u578b\u6570\u636e\u7684\u5730\u5740\u8303\u56f4\u6765\u751f\u6210\u7684\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>reg &#91;n-1:0] \u5b58\u50a8\u5668\u540d&#91;m-1:0];  \n\u5176\u4e2dreg&#91;n-1:0]\u5b9a\u4e49\u4e86\u5b58\u50a8\u5668\u4e2d\u5b58\u50a8\u5355\u5143\u7684\u4f4d\u5bbd\u4e3an\uff0c\u800c&#91;m-1:0]\u5219\u5b9a\u4e49\u4e86\u53c8\u591a\u5c11\u4e2a\u8fd9\u6837\u7684\u5b58\u50a8\u5355\u5143\n\u5907\u6ce8  reg&#91;n-1:0]a; \u4ee3\u8868\u4e00\u4e2an\u4f4d\u7684\u5bc4\u5b58\u5668  reg a&#91;n-1:0]a;\u4ee3\u8868n\u4e2a1\u4f4d\u7684\u5b58\u50a8\u5668 \u4e0d\u8981\u5f04\u6df7\u4e86<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u8fd0\u7b97\u7b26\u53ca\u8868\u8fbe\u5f0f:<\/h2>\n\n\n\n<p><strong>1) \u7b97\u672f\u8fd0\u7b97\u7b26(+,\uff0d,\u00d7\uff0c\/,\uff05)<\/strong>        <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u7528\u6cd5\u548cC\u8bed\u8a00\u6bd4\u8f83\u7c7b\u4f3c\uff0c\u4f46\u662f\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u5728\u8fdb\u884c\u7b97\u6570\u8fd0\u7b97\u64cd\u4f5c\u65f6\uff0c\u5982\u679c\u67d0\u4e00\u4e2a\u64cd\u4f5c\u6570\u6709\u4e0d\u786e\u5b9a\u7684\u503cx,\u5219\u6574\u4e2a\u7ed3\u679c\u4e5f\u4e3a\u4e0d\u5b9a\u503cx\n\n\u53e6\u5916\uff0cVerilog\u76f4\u63a5\u5b9e\u73b0\u4e58\u9664\u6bd4\u8f83\u6d6a\u8d39\u7ec4\u5408\u903b\u8f91\u8d44\u6e90\uff0c\u5b9e\u9645\u9879\u76ee\u4e2d\u4f1a\u7528FPGA\u7684DSP\u8d44\u6e90\u6765\u4ee3\u66ff\u4e58\u9664\u6cd5\uff0c\u6216\u8005\u75282\u7684\u6307\u6570\u6b21\u5e42\u7684\u4e58\u9664\u6cd5\u76f4\u63a5\u7528\u79fb\u4f4d\u7684\u65b9\u5f0f\u6765\u66ff\u4ee3<\/pre>\n\n\n\n<p>2) \u4f4d\u8fd0\u7b97\u7b26(~,|,^,&amp;,^~)   \u548cC\u8bed\u8a00\u6bd4\u8f83\u7c7b\u4f3c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">~    \/\/\u53d6\u53cd               \u5bf9\u4e00\u4e2a\u64cd\u4f5c\u6570\u8fdb\u884c\u6309\u4f4d\u53d6\u53cd\n&amp;    \/\/\u6309\u4f4d\u4e0e             \u5c06\u4e24\u4e2a\u64cd\u4f5c\u6570\u7684\u5bf9\u5e94\u4f4d\u8fdb\u884c\u4e0e\u8fd0\u7b97\n|    \/\/\u6309\u4f4d\u6216             \u5c06\u4e24\u4e2a\u64cd\u4f5c\u6570\u7684\u76f8\u5e94\u4f4d\u8fdb\u884c\u6216\u8fd0\u7b97\n^    \/\/\u6309\u4f4d\u5f02\u6216\uff08XOR\uff09     \u5c06\u4e24\u4e2a\u64cd\u4f5c\u6570\u7684\u76f8\u5e94\u4f4d\u8fdb\u884c\u5f02\u6216\u8fd0\u7b97\n^~   \/\/\u6309\u4f4d\u540c\u6216\uff08\u5f02\u6216\u975e\uff09   \u5c06\u4e24\u4e2a\u64cd\u4f5c\u6570\u7684\u76f8\u5e94\u4f4d\u8fdb\u884c\u5f02\u6216\u8fd0\u7b97\u518d\u8fdb\u884c\u975e\u8fd0\u7b97<\/pre>\n\n\n\n<p>3) \u903b\u8f91\u8fd0\u7b97\u7b26(&amp;&amp;,||,!)  \u548cC\u8bed\u8a00\u6bd4\u8f83\u7c7b\u4f3c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&amp;&amp;  \u903b\u8f91\u4e0e     \u53c2\u4e0e\u8fd0\u7b97\u7684\u4e24\u4e2a\u6570\u90fd\u4e3a\u771f\u65f6\uff0c\n\u7ed3\u679c\u624d\u4e3a\u771f\n||  \u903b\u8f91\u6216     \u53c2\u4e0e\u8fd0\u7b97\u7684\u4e24\u4e2a\u6570\u5176\u4e2d\u4efb\u610f\u4e00\u4e2a\u4e3a\u771f\uff0c\u7ed3\u679c\u5c31\u4e3a\u771f\n\uff01  \u903b\u8f91\u975e     \u5bf9\u53c2\u6570\u8fdb\u884c\u53d6\u53cd\uff0c\u4e0e~\u4e0d\u540c\u7684\u662f~\u662f\u4e00\u4f4d\u4e00\u4f4d\u53d6\u53cd\uff0c\u800c\uff01\u662f\u5bf9\u6574\u4e2a\u6570\u636e\u53d6\u53cd\uff0c\u5982\u679c                       \u8fd9\u4e2a\u6570\u53d6\u53cd\u524d\u4e0d\u4e3a\u96f6\uff0c\u53d6\u53cd\u540e\u5c31\u662f\u96f6\uff0c\u5982\u679c\u8fd9\u4e2a\u6570\u53d6\u53cd\u524d\u662f\u96f6\uff0c\u53d6\u53cd\u540e\u5c31\u662f1<\/pre>\n\n\n\n<p>4) \u5173\u7cfb\u8fd0\u7b97\u7b26(&gt;,&lt;,&gt;=,&lt;=) \u548cC\u8bed\u8a00\u7528\u6cd5\u6bd4\u8f83\u7c7b\u4f3c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u4e00\u5171\u67094\u79cd\na&lt;b\na&gt;b\na&lt;=b\na&gt;=b\n\u5982\u679c\u5224\u65ad\u7684\u5173\u7cfb\u662f\u5047\uff0c\u5219\u8fd4\u56de0\uff0c\u5982\u679c\u5224\u65ad\u7684\u5173\u7cfb\u4e3a\u771f\uff0c\u5219\u8fd4\u56de\u4e3a1\n\u5982\u679c\u67d0\u4e2a\u64cd\u4f5c\u6570\u7684\u503c\u4e0d\u5b9a\uff0c\u5219\u8fd4\u56de\u503c\u4e5f\u662f\u4e0d\u5b9a\u503c<\/pre>\n\n\n\n<p>5\uff09\u7b49\u5f0f\u8fd0\u7b97\u7b26<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">==    \/\/\u7b49\u4e8e\n\uff01=   \/\/\u4e0d\u7b49\u4e8e\n===   \/\/\u7b49\u4e8e\n\uff01==  \/\/\u4e0d\u7b49\u4e8e\n\n\u5176\u4e2d == \u548c!= \u5982\u679c\u64cd\u4f5c\u6570\u4e2d\u542b\u6709\u4e0d\u5b9a\u503c x  \u5219\u7ed3\u679c\u4e5f\u662fx\n\u800c ===  \u548c!===  \u6bd4\u8f83\u7684\u8fc7\u7a0b\u4e2d\u8fde\u67d0\u4e9b\u4f4d\u7684x\u548cz\u4e5f\u4f1a\u8fdb\u884c\u6bd4\u8f83\uff0c\u4e5f\u5c31\u662f\u64cd\u4f5c\u6570\u6bcf\u4e00\u4f4d\u90fd\u5b8c\u5168\u4e00\u81f4\uff0c\u7ed3\u679c\u624d\u662f1\uff0c\u5426\u5219\u4e3a0<\/pre>\n\n\n\n<p>6) \u79fb\u4f4d\u8fd0\u7b97\u7b26(&lt;&lt;,&gt;&gt;) \u548cC\u8bed\u8a00\u7528\u6cd5\u6bd4\u8f83\u7c7b\u4f3c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;&lt; \u5de6\u79fb\u8fd0\u7b97\u7b26   \u6570\u636e\u4f4e\u4f4d\u88650\n&gt;&gt; \u53f3\u79fb\u8fd0\u7b97\u7b26   \u6570\u636e\u9ad8\u4f4d\u88650<\/pre>\n\n\n\n<p>7) \u62fc\u63a5\u8fd0\u7b97\u7b26({ })<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u53ef\u4ee5\u628a\u4e24\u4e2a\u6216\u591a\u4e2a\u4fe1\u53f7\u7684\u67d0\u4e9b\u4f4d\u62fc\u63a5\u8d77\u6765\u4f5c\u4e3a\u4e00\u4e2a\u65b0\u7684\u4fe1\u53f7\n{a[2:1],b[5:3]}  \u5373\u76f8\u5f53\u4e8e\u628aa\u76842\u52301\u4f4d\uff0cb\u76845\u52303\u4f4d\u62fc\u63a5\u8d77\u6765\u4e86 \u7ed3\u679c\u7b49\u540c\u4e8e{a[2],a[1],b[5],b[4],b[3]}<\/pre>\n\n\n\n<p>8) \u6761\u4ef6\u8fd0\u7b97\u7b26(?:)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u6761\u4ef6\u8fd0\u7b97\u7b26\u53ef\u6839\u636e\u6761\u4ef6\u8bed\u53e5\u7684\u771f\u5047 \u6765\u5c06\u4e0d\u540c\u7684\u4fe1\u53f7\u8fdb\u884c\u8f93\u51fa\n\n\u8981\u4f7f\u7528\u6761\u4ef6\u8fd0\u7b97\u7b26\uff0c\u9700\u8981\u5728 ? \u8fd0\u7b97\u7b26\u4e4b\u524d\u5199\u4e00\u4e2a\u903b\u8f91\u8868\u8fbe\u5f0f\uff0c\u7136\u540e\u5224\u65ad\u5b83\u662f\u771f\u8fd8\u662f\u5047\u3002\u6839\u636e\u8868\u8fbe\u5f0f\u7684\u771f\u5047\u5c06\u4e24\u4e2a\u503c\u4e2d\u7684\u67d0\u4e00\u4e2a\u8d4b\u503c\u7ed9\u8f93\u51fa\n\n\u8f93\u51fa =  \u6761\u4ef6 ?  \u771f\u7684\u60c5\u51b5  :  \u5047\u7684\u60c5\u51b5 ;\n\n\u5982 a = (c &gt; b) ? c : b;    \/\/\u5982\u679cc\u5927\u4e8eb\uff0c\u5219a\u7b49\u4e8ec;\u5426\u5219a\u7b49\u4e8eb<\/pre>\n\n\n\n<p>9) \u8d4b\u503c\u8fd0\u7b97\u7b26(=,&lt;=)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;=  \u975e\u963b\u585e\u8d4b\u503c   \u7528\u4e8e\u65f6\u5e8f\u903b\u8f91\n=   \u963b\u585e\u8d4b\u503c     \u7528\u4e8e\u7ec4\u5408\u903b\u8f91\n\n<strong>\u975e\u963b\u585e(Non_Blocking)\u8d4b\u503c\u65b9\u5f0f<\/strong>( \u5982 b &lt;= a; )\n\u5728\u8bed\u53e5\u5757\u4e2d\uff0c\u4e0a\u9762\u8bed\u53e5\u6240\u8d4b\u7684\u53d8\u91cf\u503c\u4e0d\u80fd\u7acb\u5373\u5c31\u4e3a\u4e0b\u9762\u7684\u8bed\u53e5\u6240\u7528\n\u5757\u7ed3\u675f\u540e\u624d\u5b8c\u6210\u8d4b\u503c\u64cd\u4f5c\uff0c\u800c\u6240\u8d4b\u7684\u53d8\u91cf\u503c\u662f\u4e0a\u4e00\u6b21\u8d4b\u503c\u5f97\u5230\u7684\n\n\u5907\u6ce8  \uff1a\u975e\u963b\u585e\u8d4b\u503c  &lt;=\u4e0e \u8fd0\u7b97\u7b26 \u5c0f\u4e8e\u7b49\u4e8e \u610f\u4e49\u5b8c\u5168\u4e0d\u540c\uff0c\u4e00\u4e2a\u7528\u4e8e\u6bd4\u8f83\u5927\u5c0f\uff0c\u4e00\u4e2a\u7528\u4e8e\u8d4b\u503c\uff0c\u4e0d\u8981\u6df7\u6dc6\n\n\n<strong>\u963b\u585e(Blocking)\u8d4b\u503c\u65b9\u5f0f<\/strong>( \u5982 b = a; )\n\u8d4b\u503c\u8bed\u53e5\u6267\u884c\u5b8c\u540e,\u5757\u624d\u7ed3\u675f\nb\u7684\u503c\u5728\u8d4b\u503c\u8bed\u53e5\u6267\u884c\u5b8c\u540e\u7acb\u523b\u5c31\u6539\u53d8\u7684\n\u5728\u65f6\u5e8f\u903b\u8f91\u4e2d\u4f7f\u7528\u65f6\uff0c\u53ef\u80fd\u4f1a\u4ea7\u751f\u610f\u60f3\u4e0d\u5230\u7684\u7ed3\u679c\u3002<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5757\u8bed\u53e5 <\/h2>\n\n\n\n<p>\uff081\uff09\u987a\u5e8f\u5757\uff1abegin-end<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">begin end \u53ef\u4ee5\u5f88\u7b80\u5355 \u4e5f\u53ef\u4ee5\u5f88\u590d\u6742\uff0c\u5982\u679c\u4f60\u53ea\u662f\u5e0c\u671b\u5b66\u4f1a\u5982\u4f55\u4f7f\u7528\u90a3\u5f88\u7b80\u5355\uff0c\u4f60<strong>\u53ea\u9700\u8981\u628a\u5b83\u5f53\u4f5cC\u8bed\u8a00\u4e2d\u51fd\u6570\u7684\u5927\u62ec\u53f7\u5c31\u53ef\u4ee5\u4e86<\/strong>\n\nalways@(posedge clk)begin\n   if(a==0)begin\n      \u2026\u2026\n   end\n   else begin\n      \u2026\u2026\n   end\nend\n\u4ed4\u7ec6\u89c2\u5bdf  \u4e0a\u9762\u8fd9\u4e2a\u7b80\u6613\u4ee3\u7801\uff0c\u662f\u4e0d\u662f\u53d1\u73b0 \u548cC\u7684\u5927\u62ec\u53f7\u4f7f\u7528\u573a\u666f\u51e0\u4e4e\u4e00\u81f4\uff1f  \u5176\u5b9e\u5bf9\u4e8e\u5927\u591a\u6570\u4eba\u6765\u8bf4\u77e5\u9053\u8fd9\u4e2a\u5c31\u597d\u4e86\n\n\u5982\u679c\u9700\u8981\u6df1\u7a76\uff0c\u8fd9\u91cc\u6709\u70b9\u70b9\u590d\u6742\uff0c \u9996\u5148\u79f0\u547cbegin end \u4e3a\u987a\u5e8f\u5757 \u662f\u56e0\u4e3abegin end \u5757\u5185\u7684\u8bed\u53e5\u662f\u6309\u987a\u5e8f\u6267\u884c\u7684\uff0c\u5373\u53ea\u6709\u4e0a\u9762\u4e00\u6761\u8bed\u53e5\u6267\u884c\u5b8c\u6210\u540e\u4e0b\u9762\u7684\u8bed\u53e5\u624d\u6267\u884c\uff0c \u4f46\u662f\u8fd9\u53c8\u548c\u6211\u4eec\u5b9e\u9645\u5199\u4ee3\u7801\u65f6\u5019\u6709\u70b9\u533a\u522b \uff08\u5927\u591a\u6570\u4eba\u7684\u5370\u8c61\u662f begin end \u4e2d\u7684\u8bed\u53e5\u660e\u660e\u4e5f\u662f\u5e76\u884c\u7684\u5440\uff0c\u522b\u7740\u6025\uff0c\u770b\u4e0b\u9762\uff09\n\u8fd9\u4e2a\u95ee\u9898\u662f\u5206\u4e24\u79cd\u60c5\u51b5\u7684\n1.\u5f53begin end \u4e2d\u662f\u8bd5\u7528\u963b\u585e\u8d4b\u503c\u7684\u7ec4\u5408\u903b\u8f91\u65f6\uff0c\u5185\u90e8\u7684\u7a0b\u5e8f\u5c06\u662f\u4e00\u6761\u6267\u884c\u5b8c\uff0c\u518d\u6267\u884c\u4e0b\u4e00\u53e5\uff0c\u5373\u987a\u5e8f\u6267\u884c\n2.\u5f53begin end \u5757\u5185\u4f7f\u7528\u7684\u662f\u975e\u963b\u585e\u8d4b\u503c&lt;= \u7684\u65f6\u5e8f\u903b\u8f91\u65f6\uff0c\u6b64\u65f6begin end \u65f6\uff0c\u5757\u5185\u6240\u6709\u7684\u8bed\u53e5\u4f1a\u5728\u6a21\u5757\u5b8c\u6210\u65f6\u88ab\u540c\u65f6\u6267\u884c\uff0c\u4e5f\u5c31\u662f\u5e76\u884c\u6267\u884c\u4e86\uff0c\u6240\u4ee5\u5728\u975e\u963b\u585e\u8d4b\u503c\u4e2d begin end \u53ef\u4ee5\u5f53\u4f5c\u662f\u975e\u987a\u5e8f\u7684\n\n\n<strong>\u6709\u70b9\u7ed5\uff0c\u5176\u5b9e\u5bf9\u4e8e\u5165\u95e8\u6765\u8bf4\u6ca1\u5fc5\u8981\u6df1\u7a76\u7684\u592a\u591a\uff0c\u5c31\u77e5\u9053 begin end \u5145\u5f53\u82b1\u62ec\u53f7\u7684\u89d2\u8272\u5c31\u597d<\/strong><\/pre>\n\n\n\n<p>\uff082\uff09\u5e76\u884c\u5757\uff1afork-join   \u56e0\u4e3a\u8fd9\u4e2a\u8bed\u53e5\u4e0d\u53ef\u7efc\u5408\uff0c\u6240\u4ee5\u8fd9\u91cc\u4e0d\u8be6\u7ec6\u5c55\u5f00<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u8d4b\u503c\u8bed\u53e5<\/h2>\n\n\n\n<p id=\"block-4fa13e19-bc82-42a8-bf4a-71809210b4be\">verilog\u6709\u4e09\u79cd\u8d4b\u503c\u65b9\u5f0f 1.assign \u65b9\u5f0f  2. always \u65b9\u5f0f  3.initial \u65b9\u5f0f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>assign \u65b9\u5f0f<\/strong>\nassign \u662f\u4e00\u79cd\u6301\u7eed\u8d4b\u503c\u8bed\u53e5\uff0c\u4e3b\u8981\u5bf9wire\u578b\u53d8\u91cf\u8fdb\u884c\u8d4b\u503c\uff0c\u4f46\u662f\u56e0\u4e3awire\u578b\u53d8\u91cf\u6ca1\u6709\u4fdd\u5b58\u503c\uff0c\u6240\u4ee5\u53ea\u8981\u8f93\u5165\u6709\u53d8\u5316\uff0c\u8f93\u51fa\u9a6c\u4e0a\u65e0\u6761\u4ef6\u5730\u53cd\u6620\n\u4f8b\u5982  assign a=b+c; \u53ea\u8981b\u548cc\u53d1\u751f\u53d8\u5316\u4e86\uff0ca\u7acb\u523b\u4e5f\u53d1\u751f\u53d8\u5316\u4e86  \uff08\u8fd9\u91cc b \u548c c\u53ef\u4ee5\u662freg\u6216\u8005wire\u578b\u53d8\u91cf\uff0c\u4f46\u662fa\u5fc5\u987b\u662fwire \u578b\u7684\uff09<\/pre>\n\n\n\n<pre id=\"block-4fa13e19-bc82-42a8-bf4a-71809210b4be\" class=\"wp-block-preformatted\"><strong>always \u65b9\u5f0f<\/strong> \n\u4e3b\u8981\u7528\u4e8ereg \u578b\u53d8\u91cf\u7684\u8d4b\u503c&nbsp;\uff0c\u56e0\u4e3aalways\u5757\u662f\u9700\u8981\u6ee1\u8db3\u4e00\u5b9a\u7684\u89e6\u53d1\u6761\u4ef6\u624d\u4f1a\u6267\u884c\u7684\uff0c\u6240\u4ee5\u91cc\u9762\u88ab\u8d4b\u503c\u7684\u6570\u636e\u7c7b\u578b\u5fc5\u987b\u662f\u6709\u5b58\u50a8\u6570\u636e\u529f\u80fd\u7684reg \u7c7b\u578b\u3002\n\nalways@ (<strong>\u89e6\u53d1\u4e8b\u4ef6<\/strong>)\uff0c\u6839\u636e\u62ec\u53f7\u5185\u7684\u89e6\u53d1\u4e8b\u4ef6\u7684\u7c7b\u578b\u53ef\u4ee5\u5206\u4e3a <strong>\u7535\u5e73\u89e6\u53d1<\/strong>\uff0c<strong>\u548c \u8fb9\u6cbf\u89e6\u53d1<\/strong>\n\u7531<strong>\u7535\u5e73\u89e6\u53d1<\/strong>\u7684\u65f6\u5019 \uff0c\u901a\u5e38\u88ab\u5f53\u4f5c\u7ec4\u5408\u903b\u8f91\u6765\u4f7f\u7528\uff0c\u8d4b\u503c\u7528\u963b\u585e\u8d4b\u503c(=)\n\u7528<strong>\u65f6\u949f\u8fb9\u6cbf<\/strong>\u6765\u8fdb\u884c\u89e6\u53d1\uff0c\u901a\u5e38\u88ab\u5f53\u4f5c\u65f6\u5e8f\u903b\u8f91\u6765\u4f7f\u7528\uff0c\u8d4b\u503c\u8bed\u53e5\u7528\u975e\u963b\u585e\u8d4b\u503c(&lt;=)\n\n<strong>\u4f8b1<\/strong> \u7528always\u6a21\u5757\u7684<strong>\u7ec4\u5408\u903b\u8f91<\/strong>\nreg a;\nreg b;\nreg c;\nalways @(b or c)begin\n   a=b+c;\nend\n\nalways\u7b26\u5408\u7535\u5e73\u89e6\u53d1\u7684\u7ec4\u5408\u903b\u8f91\uff0c\u5f53b\u548cc\u6709\u53d8\u5316\u7684\u65f6\u5019\uff0ca\u5c31\u4f1a\u7acb\u523b\u8ddf\u7740\u53d8\u5316\n\u8fd9\u91ccalways@(b or c) <strong>\u4e5f\u53ef\u4ee5\u7528 always@(*)\u6765\u66ff\u4ee3<\/strong>\uff0c\u610f\u601d\u662falways\u6a21\u5757\u4e2d\u7684\u4efb\u4f55\u4e00\u4e2a\u8f93\u5165\u4fe1\u53f7\u6216\u7535\u5e73\u53d1\u751f\u53d8\u5316\u65f6\n\n<strong>\u4f8b2<\/strong> \u7528always\u6a21\u5757\u7684<strong>\u65f6\u5e8f\u903b\u8f91<\/strong>\nreg a;\nreg b;\nreg c;\nalways @(<strong>posedge clk<\/strong>)begin\n   a&lt;=b+c;\nend\n\n<strong>\u62ec\u53f7\u5185\u7684 posedge clk \u662f\u4e0a\u5347\u6cbf\u89e6\u53d1\uff0c \u5982\u679c\u8981\u6539\u6210\u4e0b\u964d\u6cbf\u89e6\u53d1  \u5219\u7528negedge  clk<\/strong>\n<strong>\u5982\u679c\u6709\u591a\u4e2a\u89e6\u53d1\u6761\u4ef6 \uff0c\u5219\u4e2d\u95f4\u7528or \u6765\u95f4\u9694<\/strong>  \u6bd4\u65b9\u8bf4always@(posege clk or negedge rstn)\nalways\u7b26\u5408\u8fb9\u6cbf\u89e6\u53d1\u7684\u65f6\u5e8f\u903b\u8f91\uff0c\u89e6\u53d1\u6761\u4ef6\u53d8\u6210clk\u59cb\u7ec8\u7684\u4e0a\u5347\u6cbf\u4e86\uff0c\u6bcf\u5f53\u65f6\u949f\u51fa\u73b0\u4e0a\u5347\u6cbf\uff0c\u6a21\u5757\u5185\u7684\u8bed\u53e5\u5c31\u4f1a\u88ab\u6267\u884c\u4e00\u6b21\n1. \u56e0\u4e3a\u6bcf\u6b21\u53ea\u6709\u65f6\u949f\u6765\u7684\u65f6\u5019a\u624d\u4f1a\u53d8\u5316\uff0c\u6240\u4ee5a\u7684\u6570\u636e\u6bcf\u6b21\u4f1a\u88ab\u9501\u5b58\u4e00\u4e2aclk\u7684\u65f6\u949f\u5468\u671f\n2. a&lt;=b+c;\u5f53\u6a21\u5757\u88ab\u6267\u884c\u5b8c\u540e\u624d\u4f1a\u88ab\u8d4b\u503c\uff0c\u5982\u679calways\u6a21\u5757\u5185\u6709\u591a\u4e2a\u8d4b\u503c\u8bed\u53e5\uff0c\u5219\u591a\u4e2a\u8d4b\u503c\u8bed\u53e5\u5c06\u88ab\u540c\u65f6\u5237\u65b0\u8d4b\u503c\n3. \u5728\u4e0a\u5347\u6cbf\u6ca1\u51fa\u73b0\u7684\u65f6\u5019 b\u548cc\u65e0\u8bba\u5982\u4f55\u53d8\u5316\uff0c\u5bf9a\u90fd\u4e0d\u4f1a\u4ea7\u751f\u5f71\u54cd\uff08\u8fd9\u91cc\u548c\u7535\u5e73\u89e6\u53d1\u6709\u533a\u522b\uff09\n\n<strong>always\u6a21\u5757\u4f7f\u7528\u7684\u6ce8\u610f\u4e8b\u9879<\/strong>\n1.\u4e0d\u8981\u5728\u540c\u4e00\u4e2aalways\u5757\u91cc\u9762\u6df7\u5408\u4f7f\u7528 \u963b\u585e\u8d4b\u503c \u548c \u975e\u963b\u585e\u8d4b\u503c\n2.\u4e0d\u8981\u5728\u4e24\u4e2a\u6216\u4e24\u4e2a\u4ee5\u4e0aalways\u5757\u91cc\u9762\u5bf9\u540c\u4e00\u4e2a\u53d8\u91cf\u8fdb\u884c\u8d4b\u503c\uff08\u56e0\u4e3a\u5404\u4e2aalways \u5757\u662f\u76f8\u4e92\u5e76\u884c\u8fd0\u884c\u7684\uff0c\u5bf9\u540c\u4e00\u4e2a\u53d8\u91cf\u8d4b\u503c\u4f1a\u53d1\u751f\u51b2\u7a81\uff09<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>initial\u65b9\u5f0f<\/strong>\n\u4ee3\u7801\u5757\u53ea\u5728\u7cfb\u7edf\u8fd0\u884c\u7684\u6700\u521d\u6267\u884c\u4e00\u6b21\u3002\u4e00\u65e6initial\u5757\u4e2d\u7684\u6240\u6709\u8bed\u53e5\u88ab\u6267\u884c\uff0cinitial\u5757\u7684\u6267\u884c\u5c31\u7ed3\u675f\u4e86\u3002\n\u5927\u591a\u6570\u7684\u6b63\u5f0f\u6559\u7a0b\u4e0a\u90fd\u63cf\u8ff0\u4e86\uff0cinitial\u8fd9\u4e2a\u8bed\u6cd5\uff0c\u79f0\u5176\u662f\u5728\u4eff\u771f\u7684\u5f00\u59cb\u7ed9\u5bc4\u5b58\u5668\u53d8\u91cf\u7c7b\u578b\u521d\u59cb\u5316\u8d4b\u503c\u7528\u7684\uff0c\u56e0\u6b64\u7406\u8bba\u4e0a\u662f\u4e0d\u53ef\u7efc\u5408\u7684\n\u4f46\u662f\u5b9e\u9645\u4f7f\u7528\u8fc7\u7a0b\u4e2d\uff0c\u5404\u5bb6\u82af\u7247\u5382\u5546\u7684\u7f16\u8bd1\u5668\u90fd\u53ef\u4ee5\u7efc\u5408initial\u8fd9\u4e2a\u8bed\u53e5\u7528\u6765\u7ed9\u5bc4\u5b58\u5668\u53d8\u91cf\u8d4b\u521d\u59cb\u503c\n\n\u6bd4\u65b9\u8bf4\nreg [1:0]dat;\ninitial begin  \n    dat = 2'd2; \nend \n\n\u4e0a\u8ff0\u7a0b\u5e8f\u5b9e\u9645\u5728\u7f16\u8bd1\u5668\u4e2d\u662f\u53ef\u4ee5\u7f16\u8bd1\u7efc\u5408\u901a\u8fc7\u5e76\u4e0b\u8f7d\u5230\u82af\u7247\u91cc\u5de5\u4f5c\u7684\n\u8fd9\u6837\u7cfb\u7edf\u4e0a\u7535\u540e dat\u5c31\u88ab\u8d4b\u503c\u6210\u4e862\u4e86\uff0c<strong>\u4f7f\u7528initial \u521d\u59cb\u5316\u5bc4\u5b58\u5668\u7684\u65b9\u6cd5\u8fd8\u662f\u633a\u5e38\u89c1\u7684<\/strong>\n\u6211\u4e5f\u4e0d\u77e5\u9053\u4e3a\u4ec0\u4e48\u5404\u4e2a\u6559\u7a0b\u90fd\u79f0\u5176\u4e0d\u53ef\u88ab\u7efc\u5408\uff0c\u4e0d\u8fc7\u4efb\u4f55\u4e66\u7c4d\uff0c\u90fd\u4e0d\u5982\u5b9e\u8df5\u5f97\u51fa\u7684\u7ed3\u8bba\u66f4\u6743\u5a01\u5bf9\u5427<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u6761\u4ef6\u5224\u65ad\u8bed\u53e5<\/h2>\n\n\n\n<p>\u6761\u4ef6\u5224\u65ad\u8bed\u53e5 \u6709 if    else  \u548c case<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>if else <\/strong>\n\u7528\u6cd5\u548c  C\u8bed\u8a00\u975e\u5e38\u50cf\n\n\u7528\u6cd5\u6709\u5982\u4e0b\u4e09\u79cd\n\n1.\nif(\u8868\u8fbe\u5f0f)\u6267\u884c\u8bed\u53e5\n\n2.\nif(\u8868\u8fbe\u5f0f1)\u6267\u884c\u8bed\u53e51\nelse \u6267\u884c\u8bed\u53e52\n\n3.\nif   (\u8868\u8fbe\u5f0f1)\u6267\u884c\u8bed\u53e51\nelse (\u8868\u8fbe\u5f0f2)\u6267\u884c\u8bed\u53e52\n\u2026\u2026\nelse (\u8868\u8fbe\u5f0fn-1)\u6267\u884c\u8bed\u53e5n-1\nelse  \u6267\u884c\u8bed\u53e5n\n\n\u8868\u8fbe\u5f0f\u7ed3\u679c\u4e3a\u771f\uff0c\u5219\u6267\u884c\u5bf9\u5e94\u8bed\u53e5\n\n\n\u51e0\u4e2a\u6ce8\u610f\u7684\u5730\u65b9 \n1. \u6761\u4ef6\u8bed\u53e5\u5fc5\u987b\u5728\u8fc7\u7a0b\u5757\u4e2d\u4f7f\u7528  always  \u6216\u8005 initial  \u4e2d\n2. \u8868\u8fbe\u5f0f \u7ed3\u679c\u5982\u679c\u4e3a0\uff0cx\uff0cz  \u90fd\u6309\u5047\u5904\u7406\n3. C \u8bed\u8a00\u4e2d\u7684 if(0&lt;A&lt;5)\u5728 verilog \u4e2d\u4e0d\u80fd\u76f4\u63a5\u5199\uff0c\u5fc5\u987b\u5199\u6210 if((0&lt;A)&amp;&amp;(A&lt;5))\n4. if  else \u6709\u660e\u663e\u7684\u4f18\u5148\u7ea7\uff0c  case \u662f\u5e76\u884c\u7684\u6ca1\u6709\u4f18\u5148\u7ea7\n5. if \u8bb0\u5f97\u52a0\u4e0aelse\uff0c\u907f\u514d\u751f\u6210\u4e0d\u60f3\u8981\u7684\u9501\u5b58\u5668<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>case<\/strong>\ncase \u8bed\u53e5\u662f\u4e00\u79cd\u591a\u5206\u679d\u9009\u62e9\u8bed\u53e5\uff0c\u548cif else \u591a\u5c42\u7ea7\u7684\u4f7f\u7528\u6548\u679c\u7c7b\u4f3c\uff0c\u4f46\u662fif else \u751f\u6210\u7684\u903b\u8f91\u4f1a\u66f4\u7e41\u7410\u4e00\u4e9b\uff0c\u6240\u4ee5\u5f53\u7ed3\u679c\u9700\u8981\u591a\u5206\u652f\u9009\u62e9\u7684\u65f6\u5019\u7528case \u8bed\u53e5\u66f4\u5408\u9002\u4e00\u4e9b\n\ncase(\u8868\u8fbe\u5f0f)\n  \u5206\u652f\u8868\u8fbe\u5f0f\uff1a\u6267\u884c\u8bed\u53e5\n  default\uff1a\u6267\u884c\u8bed\u53e5\nendcase\n\n\u4e00\u4e2a\u7b80\u5355\u7684case \u4f8b\u5b50\uff1a\nreg[2:0]rega;\nreg[2:0]result;\n\nalways@(posedge clk)begin\n    case (rega)\n       3'd0: result&lt;=3'd7;\n       3'd1: result&lt;=3'd6;\n       3'd2: result&lt;=3'd5;\n       default :result&lt;=3'd0;\n    endcase\nend\n\n\n\u4ee3\u7801\u5f88\u5bb9\u6613\u770b\u61c2\uff0c \u5982\u679crega \u7684\u503c\u5f53\u524d\u4e3a3'd0\uff0c\u5219 result\u7684\u503c\u88ab\u9009\u62e9\u4e3a3'd7\uff0c\u5982\u679crega\u7684\u503c\u4e0d\u4e3a3'd0,3'd1,3'd2\uff0c\u5219\u6267\u884cdefualt\u4e2d\u7684  result=3'd0;\n\u56e0\u4e3a\u8fd9\u91cc\u5f15\u5165\u4e86 posedge clk \uff0c\u6240\u4ee5\u8fd9\u91cc\u662f\u4e00\u4e2a\u65f6\u5e8f\u903b\u8f91\u7535\u8def\uff0c\u5e76\u4e14\u6240\u6709\u7684\u7ed3\u679c\u90fd\u9501\u5b58\u4e00\u4e2a\u5468\u671f\u8f93\u51fa\n\n\n1.case \u62ec\u53f7\u5185\u7684\u8868\u8fbe\u5f0f\u4e3a\u63a7\u5236\u8868\u8fbe\u5f0f\uff0c \u4e0b\u9762\u5206\u652f\u9879\u7684\u8868\u8fbe\u5f0f\u4e3a\u5206\u652f\u8868\u8fbe\u5f0f\n2.\u5f53\u63a7\u5236\u8868\u8fbe\u5f0f\u4e0e\u5206\u652f\u8868\u8fbe\u5f0f\u7684\u503c\u76f8\u7b49\u65f6\uff0c\u5219\u6267\u884c\u5bf9\u5e94\u7684\u5206\u652f\u8868\u8fbe\u5f0f\u540e\u9762\u7684\u8bed\u53e5\uff0c\u5982\u679c\u6240\u6709\u7684\u5206\u652f\u8868\u8fbe\u5f0f\u90fd\u6ca1\u6709\u548c\u63a7\u5236\u8868\u8fbe\u5f0f\u5339\u914d\uff0c\u5219\u6267\u884cdefault\u540e\u9762\u7684\u8bed\u53e5\n3.\u4e00\u4e2acase\u8bed\u53e5\u4e2d\u53ea\u51c6\u6709\u4e00\u4e2adefault\u9879\n4.\u5206\u652f\u6267\u884c\u8bed\u53e5\u53ef\u4ee5\u7528begin end\u6765\u8fdb\u884c\u5206\u7ec4\uff0c\u91cc\u9762\u4e00\u6b21\u6027\u6267\u884c\u591a\u6761\u8bed\u53e5\n\n\u6ce8\u610f\u4e8b\u9879\n1.\u6bcf\u4e00\u4e2a\u5206\u652f\u9879\u7684\u5206\u652f\u8868\u8fbe\u5f0f\u5fc5\u987b\u4e92\u4e0d\u76f8\u540c\uff0c\u5426\u5219\u5c31\u4f1a\u51fa\u73b0\u95ee\u9898\n2.\u6267\u884c\u5b8c\u67d0\u4e00\u5206\u652f\u7684\u8bed\u53e5\u540e\uff0c\u5219\u8df3\u51facase\u7ed3\u6784\uff0c\u7ec8\u6b62\u5176\u4ed6case\u8bed\u53e5\u7684\u6267\u884c\n3.case \u8bed\u53e5\u8868\u8fbe\u5f0f\u503c\u5f97\u4f4d\u5bbd\u5fc5\u987b\u76f8\u7b49\n4. \u53e6\u5916 \u4e0d\u4f7f\u7528default\u8bed\u53e5\uff0c\u5bb9\u6613\u9020\u6210\u7cfb\u7edf\u81ea\u52a8\u751f\u6210\u9884\u671f\u4ee5\u5916\u7684\u9501\u5b58\u5668\n\n\u5982 \u4e4b\u524d\u4e0a\u9762\u7684\u4f8b\u5b50,\u5982\u679c\u53bb\u6389defualt \uff0c\u5c31\u4f1a\u9020\u6210\u5f53rega\u4e3a 3'd3 3'd4 3'5\u7b49\u60c5\u51b5\u4e0b\uff0c\u503cresult \u88ab\u4fdd\u6301\uff0c\u7efc\u5408\u6210\u7535\u8def\u5c31\u662f\u751f\u6210\u4e86\u989d\u5916\u7684\u9501\u5b58\u5668\ncase (rega)\n   3'd0: result&lt;=3'd7;\n   3'd1: result&lt;=3'd6;\n   3'd2: result&lt;=3'd5;\nendcase\n\n\u4e3a\u4e86\u907f\u514d\u751f\u6210\u9501\u5b58\u5668 \uff0c\u6700\u597d\u7684\u65b9\u6cd5\u5c31\u662f  if\u8bed\u53e5  \u90fd\u52a0else    case\u8bed\u53e5\u90fd\u52a0 default<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u6a21\u5757\u4f8b\u5316<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">\u6a21\u5757\u4f8b\u5316\uff0c\u5373\u6a21\u5757\u7684\u5b9e\u4f8b\u5316\uff0c\u4e0eC\u8bed\u8a00\u7684\u51fd\u6570\u8c03\u7528\u6bd4\u8f83\u7c7b\u4f3c\uff08\u6ce8\u610f\uff0c\u4e0d\u80fd\u5b8c\u5168\u7406\u89e3\u4e3a\u6a21\u5757\u7684\u8c03\u7528\uff0c\u56e0\u4e3a\u6a21\u5757\u7684\u4f8b\u5316\u662f\u5b9e\u5b9e\u5728\u5728\u751f\u6210\u76f8\u5e94\u7684\u903b\u8f91\u7684\uff0c\u4f8b\u5982\u540c\u4e00\u4e2a\u6a21\u5757\u88ab\u4f8b\u53163\u6b21\uff0c\u5219\u5728FPGA\u5185\u90e8\uff0c\u5b9e\u9645\u751f\u6210\u4e863\u4efd\u76f8\u540c\u6a21\u5757\u7684\u903b\u8f91\u7535\u8def\uff0c\u6240\u4ee5\u79f0\u4f5c\u6a21\u5757\u7684\u5b9e\u4f8b\u5316\uff0c\u7b80\u79f0\u4f8b\u5316\uff09\n\n\u6a21\u5757\u53ef\u4ee5\u5728\u5176\u4ed6\u6a21\u5757\u4e2d\u8fdb\u884c\u4f8b\u5316\uff0c\u5e76\u4e14\u8fd9\u4e9b\u5b9e\u4f8b\u540e\u7684\u6a21\u5757\u53ef\u4ee5\u901a\u8fc7\u7aef\u53e3\uff0c\u4e0e\u4e0a\u5c42\u6a21\u5757\u8fdb\u884c\u4fe1\u53f7\u7684\u8fde\u63a5\n\n\u6a21\u5757\u4f8b\u5316 \u5728verilog\u81ea\u9876\u5411\u4e0b\u7684\u6846\u67b6\u5f00\u53d1\u4e0b\u53ef\u4ee5\u8bf4\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684<\/pre>\n\n\n\n<p>\u4e3e\u4f8b\u8bf4\u660e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8fd9\u91cc\u8bbe\u8ba1\u4e24\u4e2a\u6a21\u5757  \u4e3a\u4e86\u65b9\u4fbf\u7406\u89e3\uff0c\u8fd9\u91cc\u4e24\u4e2a\u6a21\u5757\u5206\u522b\u7528\u4e86\u6700\u6700\u7b80\u5355\u7684  \u6309\u4f4d\u6216\uff0c\u548c\u6309\u4f4d\u53d6\u53cd\u529f\u80fd\n\n\u6a21\u5757Bit_AND \u529f\u80fd\u5f88\u7b80\u5355  \u6838\u5fc3\u903b\u8f91\u5c31\u662f assign C=A&amp;B;\uff0c\u76f8\u5f53\u4e8eC\u7684\u503c\u7b49\u4e8eA\u4e0eB\u7684\u6309\u4f4d\u4e0e\n\nmodule Bit_AND(\n  input [7:0]A,\n  input [7:0]B,\n  output [7:0]C\n);\n  assign C=A&amp;B;\nendmodule\n\n\u6a21\u5757Bit_OR \u529f\u80fd\u5f88\u7b80\u5355  \u6838\u5fc3\u903b\u8f91\u5c31\u662f assign C=A|B;\uff0c\u76f8\u5f53\u4e8eC\u7684\u503c\u7b49\u4e8eA\u4e0eB\u7684\u6309\u4f4d\u6216\nmodule Bit_OR(\n  input [7:0]A,\n  input [7:0]B,\n  output [7:0]C\n);\n  assign C=A|B;\nendmodule\n\n\n\u63a5\u4e0b\u53bb\u662f\u9876\u5c42\u6a21\u5757\u5206\u522b\u5bf9\u4e24\u4e2a\u6a21\u5757\u8fdb\u884c\u4f8b\u5316\uff0c \u5e76\u5c06\u4f8b\u5316\u540e\u7684\u7ed3\u679c\u8fdb\u884c\u76f8\u52a0\uff0c\u5e76\u4f5c\u4e3a\u8f93\u51fa\u4fe1\u53f7\u8fdb\u884c\u8f93\u51fa  \nmodule TOP_module(\n  input [7:0]A_top,\n  input [7:0]B_top,\n  output [7:0]C_top\n);\n\nwire [7:0] C_U1;\nBit_AND U1(\n  .A  (A_top),\n  .B  (B_top),\n  .C  (C_U1)\n);\n\nwire [7:0] C_U2;\nBit_OR U2(\n  .A  (A_top),\n  .B  (B_top),\n  .C  (C_U2)\n);\nassign C_top=C_U1+C_U2;\n\nendmodule<\/pre>\n\n\n\n<p>\u8fd9\u4e2a\u662f \u6839\u636e\u4e0a\u8ff0\u903b\u8f91\u751f\u6210\u7684rtl \u56fe\uff0c\u53ef\u4ee5\u7531\u56fe\u4e0a\u5f97\u5230\uff0cTOP_MODULE\u4e2d\u5206\u522b\u5b9e\u4f8b\u5316\u4e86\u4e00\u4e2aBit_AND\u6a21\u5757\uff08\u5b9e\u4f8b\u540d U1\uff09\uff0c\u4ee5\u53caBit_OR\u6a21\u5757\uff08\u5b9e\u4f8b\u540d U2\uff09\uff0c\u5e76\u4e14\u6700\u7ec8\u4e24\u4e2a\u6a21\u5757\u7684\u8f93\u51fa\u8fdb\u884c\u76f8\u52a0\u7684\u548c\u662f\u6574\u4e2a\u9876\u5c42\u6a21\u5757TOP_MODULE\u7684\u8f93\u51fa\u4fe1\u53f7C_top<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-1024x424.png\" alt=\"\" class=\"wp-image-3731\" width=\"674\" height=\"279\" srcset=\"http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-1024x424.png 1024w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-300x124.png 300w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image-768x318.png 768w, http:\/\/www.hellofpga.com\/wp-content\/uploads\/2023\/04\/image.png 1086w\" sizes=\"auto, (max-width: 674px) 100vw, 674px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">Bit_AND U1(\n  .A  (A_top),\n  .B  (B_top),\n  .C  (C_U1)\n);\n\n\u8fd9\u53e5\u662f\u4e0a\u9762\u4f8b\u4e2d\u7684  Bit_AND \u4f8b\u5316\uff0c\n\u5176\u4e2dBit_AND \u662f\u8981\u4f8b\u5316\u7684\u6a21\u5757\uff0c U1\u662fBit_AND\u4f8b\u5316\u540e\u7684\u5b9e\u4f8b\u540d\u79f0\n.\u8868\u793a\u70b9\u540e\u9762\u7684\u6a21\u5757\u7aef\u53e3\u540d\u3002\u4e0b\u4e00\u4e2a\u62ec\u53f7()\u4e2d\u7ed9\u51fa\u4e86\u8ddf\u8fd9\u4e2a\u7aef\u53e3\u8fde\u63a5\u7684\u4fe1\u53f7<\/pre>\n\n\n\n<p>\u4ee5\u4e0a\u662f\u6211\u7b80\u5355\u6574\u7406\u7684VERILOG\u7684\u8bed\u6cd5\u7b14\u8bb0 \uff0c\u7b14\u8bb0\u6bd4\u8f83\u7b80\u5355\uff0c\u4ec5\u4f9b\u5927\u5bb6\u80fd\u591f\u5feb\u901f\u5bf9verilog\u6709\u4e2a\u6982\u5ff5\u5e76\u80fd\u770b\u61c2\u522b\u4eba\u7684\u5199\u7684\u4ee3\u7801\u4e4b\u7528\uff0c\u53e6\u5916\u5b66\u4e60Verilog\u5176\u5b9e\u6ca1\u6709\u6377\u5f84\uff0c\u53ea\u6709\u4e0d\u65ad\u7684\u52a8\u624b\u5b9e\u8df5\uff0c\u4e0d\u65ad\u5730\u8e29\u5751\u624d\u80fd\u7406\u89e3\u5176\u4e2d\u5730\u5965\u79d8\u5730\u3002<\/p>\n\n\n\n<p>\u53e6\u5916\u672c\u6587\u4ec5\u5bf9verilog\u5e38\u7528\u5730\u4e00\u4e9b\u8bed\u6cd5\u8fdb\u884c\u4ecb\u7ecd\uff0c\u5982\u9700\u6df1\u5165\u7cfb\u7edf\u7684\u5b66\u4e60verilog \u8fd8\u662f\u5efa\u8bae\u5927\u5bb6\u770b\u5b8c\u6574\u7684verilog\u4e66\u7c4d\u6765\u7cfb\u7edf\u5b66\u4e60\u6700\u4f73<\/p>\n\n\n\n<p>\u53e6\u5916 \u867d\u7136verilog\u5728\u5f88\u591a\u8bed\u6cd5\u4e0a\u548cc\u8bed\u8a00\u975e\u5e38\u7c7b\u4f3c  \uff0c\u4f46\u662f\u4e00\u5b9a\u8981\u8bb0\u4f4f <strong>verilog\u662f\u4e00\u95e8\u786c\u4ef6\u63cf\u8ff0\u8bed\u8a00\uff0c\u8bf7\u628a\u5b83\u548c\u8f6f\u4ef6\u7f16\u7a0b\u8bed\u8a00\u533a\u5206\u5f00\uff0c\u56e0\u4e3a\u4f60\u6240\u5199\u7684\u6bcf\u4e00\u4e2a\u903b\u8f91\u90fd\u4f1a\u6700\u7ec8\u5bf9\u5e94\u6210\u5b9e\u5b9e\u5728\u5728\u7684\u786c\u4ef6\u8d44\u6e90\u7684<\/strong><\/p>\n\n\n\n<p>\u8d44\u6599\u5199\u7684\u6bd4\u8f83\u6d45\u663e\uff0c\u5927\u5bb6\u6709\u4ec0\u4e48\u7591\u95ee\u76f4\u63a5\u5728\u7f51\u7ad9\u4e0b\u65b9\u7559\u8a00\u5373\u53ef\uff0c\u770b\u5230\u4f1a\u56de\u590d  <\/p>\n\n\n\n<p>\u672c\u6587\u6574\u7406\u5728\u7f51\u7ad9hellofpga.com\u4e0b\uff0c\u4e0d\u5b9a\u671f\u66f4\u65b0<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u4e3a\u81ea\u5df1\u6574\u7406\u7684Verilog\u5feb\u901f\u4e0a\u624b\u7b14\u8bb0<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-3531","post","type-post","status-publish","format-standard","hentry","category-verilog"],"views":3204,"_links":{"self":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts\/3531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/comments?post=3531"}],"version-history":[{"count":129,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts\/3531\/revisions"}],"predecessor-version":[{"id":3745,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/posts\/3531\/revisions\/3745"}],"wp:attachment":[{"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/media?parent=3531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/categories?post=3531"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hellofpga.com\/index.php\/wp-json\/wp\/v2\/tags?post=3531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}