VERILOG082: “output”, “inout” and “ref” directions should not be used in function arguments
Summary
| Reliability | Security | Maintainability | Code attribute | Effort to fix | Tags |
|---|---|---|---|---|---|
| MEDIUM | - | - | Intentionality | Logical | 20min | synthesis, vscode, lowrisc, linter |
Description
output, inout and ref directions should not be used in function arguments in
synthesizable code.
Articles & blog posts
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
Parameters
No parameters.