hector.j.cabrera
Newbie level 1
Hi, I'm new using verilog, so I starter with a simple design of a 4 bit full adder:
I try differents port declaration style but I still get the next warning:
What its wrong with the code? how can I remove the warning?
Thanks!
Code:
module full_adder( a, b, c_in, c_out, sum);
input [3:0] a,b;
input c_in;
output reg c_out;
output reg [3:0] sum;
/*input wire [3:0] a, b,
input wire c_in,
output reg [3:0] sum,
output reg c_out
);*/
reg [4:0] sum_tmp;
always @(a or b or c_in)
begin
sum_tmp = a + b +c_in;
{c_out, sum} = sum_tmp;
end
endmodule
I try differents port declaration style but I still get the next warning:
Code:
WARNING:Xst:646 - Signal <sum_tmp> is assigned but never used. This unconnected signal will be trimmed during the optimization process.
What its wrong with the code? how can I remove the warning?
Thanks!