VERILOG081: Function and task arguments should have an explicit storage type
Summary
| Reliability | Security | Maintainability | Code attribute | Effort to fix | Tags |
|---|---|---|---|---|---|
| MEDIUM | - | MEDIUM | Intentionality | Clear | 10min | synthesis, vscode, lowrisc, linter |
Description
Articles & blog posts
Function and task arguments should have an explicit storage type.
Noncompliant code example
function automatic logic [2:0] fly( a, // Noncompliant: Storage type is not defined [2:0] b, // Noncompliant: No explicit storage type logic [2:0] c // Compliant ); ... endfunction
Compliant solution
function automatic logic [2:0] fly( logic a, logic [2:0] b, logic [2:0] c ); ... endfunction
Parameters
No parameters.