I want to have parameterized module. It has the following definition:
module example (...);
parameter A = 2;
parameter B = 2;
parameter C = A + B;
endmodule
However, when I print out the parameter values, I get A = 2, B = 2, and C = 1... Any ideas why?
Found a solution - use localparam.
module example (...);
parameter A = 2;
parameter B = 2;
localparam C = A + B;
endmodule
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With