I see the following warning from VCS compile with a simple example below.
Is it bad practice to call function from function? Is there an example of why this might go wrong?
Warning-[USVS-ACWCFC] Unsupported SystemVerilog construct
“q::f1”
The always_comb block has nested hierarchical or interface function calls.
The sensitivity list is based on function argument rather than the function
bodies.
Please avoid always_comb with nested hierarchical function calls.
package p;
function automatic logic f2(input logic a);
f2 = !a;
endfunction
endpackage
package q;
import p::*;
function automatic logic f1(input logic a);
f1=f2(a);
endfunction
endpackage
module m(
input logic c,
output logic b,
);
import q::*;
import p::*;
always_comb b = f1(c);
endmodule