VHDL-2008 now provides relational operators that return bit or std_logic types. In the previous VHDL standard, the relational operators (=, <, >=…) returned boolean types. With the new types, code that needed to be written as:
if x = y then
out1 <= ‘1’;
else
out1 <= ‘0’;
end if;
Can now be written as:
out1 <= x ?= y;
The following table lists the relational operators supported in Vivado.
Operator |
Usage |
Description |
---|---|---|
?= |
x ?= y |
x equal to y |
?/= |
x ?/= y |
x not equal to y |
?< |
x ?< y |
x less than y |
?<= |
x ?<= y |
x less than or equal to y |
?> |
x ?> y |
x greater than y |
?>= |
x ?>= y |
x greater than or equal to y |