I have read about parameters and how to redefine them at module instantiation, but what if I have a parameter inside a module inside a module? Say that I have a small module called gen
:
module gen(input,output);
parameter n=2;
parameter m=10;
//do something
endmodule
That module is instantiated in another module called top
:
module top(inputs,output);
gen gen1(inputs,output);
//do something
endmodule;
I am trying to make a testbench on the big module where I need to redefine the two parameters n and m:
module tb;
reg input;
wire output;
top top1(input,output);
endmodule
How can I do that?