Why is this an issue?

Default input direction should not be used in function arguments.

How to fix it

Code examples

Noncompliant code example

function automatic logic [2:0] fly(
  input logic [2:0] a, // Noncompliant: 'a' argument has 'input' direction that can be safely removed
  logic [2:0] b
);
  b = b + 1;
  return a + b;
endfunction

Compliant solution

function automatic logic [2:0] fly(
  logic [2:0] a,
  logic [2:0] b
);
  b = b + 1;
  return a + b;
endfunction

Resources

Articles & blog posts