VERILOG083: Default “input” direction should not be used in function arguments
Summary
| Reliability | Security | Maintainability | Code attribute | Effort to fix | Tags |
|---|---|---|---|---|---|
| - | - | LOW | Consistency | Conventional | 5min | synthesis, readability, vscode, linter, simulation, lowrisc |
Description
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
Articles & blog posts
Default input direction should not be used in function arguments.
Parameters
No parameters.