Why is this an issue?

output, inout and ref directions should not be used in function arguments in synthesizable code.

How to fix it

Code examples

Noncompliant code example

function automatic logic [2:0] fly(
  logic [2:0] a,
  output logic [2:0] b // Noncompliant: 'b' argument has 'output' direction
);
  ...
endfunction

Compliant solution

function automatic logic [2:0] fly(
  logic [2:0] a,
  logic [2:0] b
);
  ...
endfunction

Resources

Articles & blog posts