aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/comp04/tb_comp04.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/synth/comp04/tb_comp04.vhdl')
-rw-r--r--testsuite/synth/comp04/tb_comp04.vhdl28
1 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/synth/comp04/tb_comp04.vhdl b/testsuite/synth/comp04/tb_comp04.vhdl
new file mode 100644
index 000000000..d9a9de54a
--- /dev/null
+++ b/testsuite/synth/comp04/tb_comp04.vhdl
@@ -0,0 +1,28 @@
+entity tb_comp04 is
+end tb_comp04;
+
+library ieee;
+use ieee.std_logic_1164.all;
+
+architecture behav of tb_comp04 is
+ signal v : std_logic_vector (7 downto 0);
+ signal r : std_logic_vector (7 downto 0);
+begin
+ comp04_1: entity work.comp04
+ port map (
+ v => v,
+ r => r);
+
+ process
+ begin
+ v <= b"1100_0011";
+ wait for 1 ns;
+ assert r = b"1100_0011" severity failure;
+
+ v <= b"1100_0010";
+ wait for 1 ns;
+ assert r = b"0000_0000" severity failure;
+
+ wait;
+ end process;
+end behav;