VERILOG2040: Constant functions should not access nonexistent elements of associative arrays
Summary
| Reliability | Security | Maintainability | Code attribute | Effort to fix | Tags |
|---|---|---|---|---|---|
| HIGH | - | - | Intentionality | Logical | 10min | synthesis, vscode, linter, simulation |
Description
A constant function tried to access a nonexistent element of an associative array.
Noncompliant code example
localparam int foo = func(); function int func; int i[string]; return i["Hello"]; // Noncompliant endfunction
Parameters
No parameters.