Académique Documents
Professionnel Documents
Culture Documents
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
---------------------------------------------------------------------
architecture TB of Comparator_TB is
component Comparator
port( A: in std_logic_vector(1 downto 0);
B: in std_logic_vector(1 downto 0);
less: out std_logic;
equal: out std_logic;
greater: out std_logic
);
end component;
begin
process
begin
-- Case 3
A <= "01";
B <= "01";
wait for 10 ns;
assert (equal='1') report "Comparison Error detected!"
severity error;
if (equal/='1') then
err_cnt:=err_cnt+1;
end if;
wait;
end process;
end TB;
-------------------------------------------------------------------
configuration CFG_TB of Comparator_TB is
for TB
end for;
end CFG_TB;
--------------------------------------------------------------------