VERILOG2055: Implicit conversion from a floating point value to a boolean value should be reviewed
Summary
| Reliability | Security | Maintainability | Code attribute | Effort to fix | Tags |
|---|---|---|---|---|---|
| HIGH | - | - | Intentionality | Logical | 10min | synthesis, vscode, simulation, linter |
Description
A floating point value is implicitly converted to a boolean predicate (such as in an if statement or loop
condition).
This is not necessarily wrong but can indicate mistakes where you intended to compare the value to something.
Noncompliant code example
module fly; real r; initial if (r) begin end endmodule
Compliant solution
module fly; real r; initial if (r != 0) begin end endmodule
Parameters
No parameters.