WriteBackCMO
WriteBackCMO

Reputation: 619

what is this error "invalid module item" in verliog?

I have defined two modules, datapath and ctrl.

Then I define another module in the same file which instantiates both datapath and ctrl

module mult(input reset, input [3:0] i0,i1, output o);  
   wire [3:0] cnt, sh;
   wire load, go,ld1 
   datapath d0(i0,i1,cnt,sh,load,go,o);
   ctrl c0(reset, clk,sh,cnt,ld1,load,go);
endmodule

But verilog complains about "invalid module item" on the line "datapath d0...", WHY?

Upvotes: 4

Views: 14927

Answers (1)

dwikle
dwikle

Reputation: 6988

You are missing a semi-colon on the previous line.

Upvotes: 11

Related Questions