Excess 3 to gray code using verilog

Guest #5013766
Rate this post
• ▲ useful
▼ not useful
I started working on Verilog since last night(less than 24 hours)
I'm trying to write a code for 4bit excess3 to gray code converter

i came up with this code but since I'm beginner i need your help to know 
what's my mistake
module ex3togry (A, B, C, D, , W, X, Y, Z,);
  input A,B,C,D;
  output X,W,Y,Z;
assign W= (A && B) || (A && C && D);
assign X= A || (B && C && D);
assign Y= (~B && ~ C && ~D) || ( B && D) || ( B && C);
assign Z= ~C;
endmodule

module converter3(Exin, Gout)
input [3:0] Exin;
output [3:0] Gout];

ex3togry FB0 (A [0] ,B[0],C[0],D[0],W[0] , X[0], Y[0], Z[0] );
ex3togry FB1 ( A[1],B[1],C[1],D[0],W[1] , X[1] , Y[1], Z[1]);
ex3togry FB2 ( A[2],B[2],C[2],D[2],W[2], X[2], Y[2], Z[2]);
ex3togry FB3 ( A[3],B[3],C[3],D[3],W[3], X[3] Y[3], Z [3] );
endmodule

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.