4

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?

1
  • Which compiler are you using? Can you post the code for datapath and ctrl?
    – dwikle
    Commented Sep 24, 2013 at 18:45

1 Answer 1

11

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.