2 use ieee.std_logic_1164.all;
3 use ieee.numeric_std.all;
6 port (l : std_logic_vector(3 downto 0);
7 r : std_logic_vector(3 downto 0);
16 architecture behav of cmp01 is
18 eq <= '1' when unsigned(l) = unsigned(r) else '0';
19 ne <= '1' when unsigned(l) /= unsigned(r) else '0';
20 lt <= '1' when unsigned(l) < unsigned(r) else '0';
21 le <= '1' when unsigned(l) <= unsigned(r) else '0';
22 gt <= '1' when unsigned(l) > unsigned(r) else '0';
23 ge <= '1' when unsigned(l) >= unsigned(r) else '0';