N
nv
Guest
Is it possible in verilog2k or system verilog to pass a parameter to a
function that can be used to determine the size of the other parameters
being passed to it. Can this be synthesized?.
Example
function [size :0] add;
input [31:0] size;
input [(size-1):0] A;
input [(size-1):0] B;
add = A + B;
endfunction
function that can be used to determine the size of the other parameters
being passed to it. Can this be synthesized?.
Example
function [size :0] add;
input [31:0] size;
input [(size-1):0] A;
input [(size-1):0] B;
add = A + B;
endfunction