i'm beginner in modelSim and verilog
modelsim doesn't care about my name declaration and every name for Half_Adder module compile successfully
in section below i have Half_ that is not correct( because my module name is Half_Adder)but modelsim compile it with no errors
module Half_Adder(input a,b,output s,c );
xor (s,a,b);
and(c,a,b);
endmodule
module Full_Adder(input a,b,c,output sum,carry);
wire sum1,carry1,carry2;
Half_ m1(a,b,sum1,carry1);
Half_Adder m2(sum1,c,sum,carry2);
or(carry,carry1,carry2);
endmodule
all above code is in one .v file i don't know it's correct or not
i tested above code in jdoodle online verilog compiler and it has error in name declaration : jdoodle.v:8: error: Unknown module type: Half_
but it's true in modelsim!