longtim 发表于 2010-6-26 12:10:43

output 有可能是reg型的,也不能用assign赋值<br>
应该放always里

CHANG 发表于 2010-6-26 12:52:30

原帖由 &lt;i&gt;guoerhui&lt;/i&gt; 于 2007-6-28 19:56 发表 &lt;a href="http://www.edacn.net/bbs/redirect.php?goto=findpost&amp;pid=780896&amp;ptid=88242" target="_blank"&gt;&lt;img src="http://www.edacn.net/bbs/images/common/back.gif" border="0" onload="if(this.width&gt;screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width&gt;screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.edacn.net/bbs/images/common/back.gif');}" onmousewheel="return imgzoom(this);" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;<br>
<br>
&lt;br /&gt;<br>
Verilog-2000是可以这样写的 &lt;br /&gt;<br>
是么?<br>
就算是,最好也别这么写。为什么强调代码风格,就是为了方便阅读,方便维护,方便交接。定义了reg类型的信号统一在always里面赋值。

VVIC 发表于 2010-6-26 13:32:01

好東西<br>
直得推薦

Sunlife 发表于 2015-6-25 09:51:12

Verilog-2000是可以这样写的
页: 1 [2]
查看完整版本: 在verilog的变量定义的时候是否就可以直接赋初值?