VHDL140: Concurrent assignments should be complete to avoid undesired latch inference
Summary
| Reliability | Security | Maintainability | Code attribute | Effort to fix | Tags |
|---|---|---|---|---|---|
| MEDIUM | - | - | Intentionality | Logical | 5min | synthesis, do254, vscode, do254-ss6, simulation, linter, cnes, cnes-std-05500, latch |
Description
Noncompliant code example
f <= a when a = '1'; -- Noncompliant: No "else" with a select g <= '0' when '0'; -- Noncompliant: No "when others"
Compliant solution
f <= a when a = '1' else b; with a select g <= '0' when '0', '1' when others;
Concurrent assignments (assignments outside of processes) should be complete to avoid undesired latch inference. All
select assignments should end with a when others clause and conditional assignments with an
else clause.
Parameters
No parameters.