I know that we can use parameters to make generic modules, and to improve readability of code. My question is whether we can have these parameters themselves as a variable. Something like this:
module parameterModule #(parameter p1, ...)(<ports>);
...
...
endmodule
module changingParameterModule (output [p1_width-1:0] p1);
...
...
endmodule
Here, I want p1
port of the changingParameterModule to be treated as the parameter p1
for the parameterModule. Is this possible?
I use icarus-verilog and Quartus Prime Lite.