modelsim compiling error:external function 'xxxxx' may not be used in a constant expr
Consider the following code: package pkg;
function bit bitgen(int bit1idx);
automatic bit res = '0;
if (bit1idx >= 0 && bit1idx < 16)
res = 1'b1;
return res;
endfunction
func...