[問題] Verilog instance 是都要宣告成wire嗎?

看板Electronics作者 (Zmud)時間10年前 (2015/09/08 20:46), 10年前編輯推噓2(201)
留言3則, 3人參與, 最新討論串1/1
請教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
都不用再wire一次 只寫input或output的話就自動是wire了
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
multi-bit 依舊是in/output啊,一樣不用
09/09 19:18, 3F
文章代碼(AID): #1LxjYt2Y (Electronics)