Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

verilog

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?

like image 575
WriteBackCMO Avatar asked Jan 12 '23 07:01

WriteBackCMO


1 Answers

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

like image 65
dwikle Avatar answered Feb 27 '23 16:02

dwikle