How can I call a function inside a module in verilog, with the function having parameters, and define the parameters to it?
For a trivial instance:
function automatic void inv();
parameter W = 1;
input logic [W:0] in;
output logic [W:0] out;
out = ~in;
endfunction
How would I call this and define W in the call?