i have a simple test bench for an adder module, but I am getting the wrong input:
module adderTestbench;
wire [31:0] fromAdd;
adder lol(32'h00000000,fromAdd);
initial begin //forcing program to be sequential
#100; //wait 100
end //end begin
initial begin
$display("%h",fromAdd);
end
endmodule
module adder(addIn,addOut);
input [31:0] addIn;
output reg [0:31] addOut;
always @(addIn)
begin
addOut <= addIn + 32'h00000004;
end
endmodule
It displays xxxxxxxx
.
Can anyone explain why it is not displaying 4, instead it's displaying x's?