[問題] Verilog instance 是都要宣告成wire嗎?
請教Verilog instance connect是input/output都需要宣告成wire嗎?
Ex. module abc (a1, a2 , c)
input a1, a2;
output c;
wire a1, a2;
wire c;
adder xadder (
.a(a1),
.b(a2),
.c(c)
);
endmodule
//////////////////////////
module adder (a,b,c)
input a,b;
output c;
wire c =a+b;
endmodule
請問在module abc是a1, a2, c 只要是port 都要宣告成wire?
還是只要 input要自己宣告 wire?
output 自動是會變 wire? 可不宣告
請問哪樣才是正確的呢?
謝謝大家
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.82.133.94
※ 文章網址: https://www.ptt.cc/bbs/Electronics/M.1441716407.A.0A2.html
→
09/08 21:47, , 1F
09/08 21:47, 1F
推
09/09 00:38, , 2F
09/09 00:38, 2F
不好意思,如果是multi-bit 的也不用? 謝謝
※ 編輯: zmudd (60.251.198.231), 09/09/2015 10:34:42
推
09/09 19:18, , 3F
09/09 19:18, 3F