2016-10-03 60 views
0

Verilogで加算器を作成しようとしていますが、今まではそれを処理できませんでした。Verilogで全加算器を作成する

***** START RUN ***** 
ERROR:HDLCompiler:806 - "fulladder.v" Line 8: Syntax error near "w1". 
ERROR:HDLCompiler:1059 - "fulladder.v" Line 8: w1 is an unknown type 
WARNING:HDLCompiler:329 - "fulladder.v" Line 10: Target <w2> of concurrent assignment or output port connection should be a net type. 
WARNING:HDLCompiler:329 - "fulladder.v" Line 11: Target <w3> of concurrent assignment or output port connection should be a net type. 
WARNING:HDLCompiler:329 - "fulladder.v" Line 12: Target <w4> of concurrent assignment or output port connection should be a net type. 
ERROR:HDLCompiler:598 - "fulladder.v" Line 1: Module <fulladder> ignored due to previous errors. 
***** OUTPUT ***** 
***** RESULT ***** 
FAIL 
:私はfulladderを使用する場合(なし.V)私はエラーの多くを得る私は構文エラーを取得しますが、モジュールの後fulladder.vでそれを実行すると

module fulladder.v(
input a, 
input b, 
input c, 
output sum, 
output carry 
); 
wire (w1, w2, w3, w4); 
xor(sum, a, w2); 
xor(w2, b, c); 
and (w3, b, c); 
and (w4, b, c); 
and (w5, c, a); 
or (carry, w3, w4, w5); 
endmodule 

: はここに私のコードです

誰かが間違っていることを知っていますか?私はどんな助けにも非常に感謝しています!

おかげ

答えて

1

適切な構文は、w1を使用しない、また

wire w1, w2, w3, w4; 

で、あなたはw5を使用しますが、それを宣言しないでください。

関連する問題