# VHDL027: Identical expressions should not be used on both sides of a binary operator ## Summary ```{raw} html

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
HIGH--Intentionality | Logical10minsynthesis, vscode, simulation, linter
``` ## Description ```{raw} html

Using the same value on either side of a binary operator is almost always a mistake. In the case of logical operators, it is either a copy/paste error and therefore a bug, or it is simply wasted code, and should be simplified.

This rule ignores +, &, *, and **.

Noncompliant code example

if a = a then -- always true
  ...
end if;

if a /= a then -- always false
  ...
end if;

if a = b AND a = b then -- if the first one is true, the second one is too
  ...
end if;

if a = b OR a = b then -- if the first one is true, the second one is too
  ...
end if;

j := 5 / 5; -- always 1
k := 5 - 5; -- always 0

Compliant solution

if a = b then
  ...
end if;

if a = b then
  ...
end if;

j := 1;
k := 0;
``` ## Parameters No parameters. ```{raw} html ```