VERILOG101: Function return value should have an explicit storage type
Summary
| Reliability | Security | Maintainability | Code attribute | Effort to fix | Tags |
|---|---|---|---|---|---|
| MEDIUM | - | MEDIUM | Intentionality | Clear | 10min | synthesis, vscode, linter, lowrisc |
Description
Articles & blog posts
Noncompliant code example
function automatic fly(); // Noncompliant: No return type endfunction function automatic signed [2:0] dream(); // Noncompliant: Implicit return type endfunction
Compliant solution
function automatic logic fly(); // Compliant endfunction function automatic logic [2:0] dream(); // Compliant endfunction
Function return value should have an explicit storage type.
This rule applies on synthesizable code only.
Parameters
No parameters.