raghava216
Junior Member level 3
I am trying to instantiate a verilog module 'comp' in another.
module comp(a,b);
input [1:0] a;
output b;
// some logic
endmodule
In another module, 'my_module', lets say a, b and c are declared.
'comp' is instantiated as follows:
comp X (.a[0](a),.a[1](b),.b(c));
While compiling, I get an error with the above line of code.
Whats wrong with this?
Any idea?
module comp(a,b);
input [1:0] a;
output b;
// some logic
endmodule
In another module, 'my_module', lets say a, b and c are declared.
'comp' is instantiated as follows:
comp X (.a[0](a),.a[1](b),.b(c));
While compiling, I get an error with the above line of code.
Whats wrong with this?
Any idea?
Last edited: