I was going through a book, and there is this exercise that I need to solve with Verilog. I wrote this code, but it's giving me this error:
main.v:20: syntax error
main.v:20: error: Invalid module instantiation
Any help would be hugely appreciated. Code is:
module Exercise(A,B,C);
input A,B;
output C;
wire w1,w2;
not not1(w1,B);
or or1(w2,B,w1);
or or2(C,A,w2);
endmodule
module main;
reg A,B;
wire C;
Exercise exer1(C,A,B);
initial
begin
A = 0;
B = 1;
#5;
$display("Result = ",C);
end
endmodule
