aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/comp02/tb_mixer.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-06 17:44:25 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-06 17:53:24 +0200
commitbe9cdfbbe25b64ee587ba3316898fcc988830c0a (patch)
tree8d0dbb580abb0dda2d9ec260bcf3bdf5b715785b /testsuite/synth/comp02/tb_mixer.vhdl
parent74348ad90435e6a28a86c4050d17a989f5434e9d (diff)
downloadghdl-be9cdfbbe25b64ee587ba3316898fcc988830c0a.tar.gz
ghdl-be9cdfbbe25b64ee587ba3316898fcc988830c0a.tar.bz2
ghdl-be9cdfbbe25b64ee587ba3316898fcc988830c0a.zip
testsuite/synth: add a test for previous commit.
Diffstat (limited to 'testsuite/synth/comp02/tb_mixer.vhdl')
-rw-r--r--testsuite/synth/comp02/tb_mixer.vhdl32
1 files changed, 32 insertions, 0 deletions
diff --git a/testsuite/synth/comp02/tb_mixer.vhdl b/testsuite/synth/comp02/tb_mixer.vhdl
new file mode 100644
index 000000000..4085ba9a9
--- /dev/null
+++ b/testsuite/synth/comp02/tb_mixer.vhdl
@@ -0,0 +1,32 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity tb_mixer is
+end tb_mixer;
+
+architecture behav of tb_mixer is
+ signal h, l, o : std_logic_vector (7 downto 0);
+begin
+ dut : entity work.mixer
+ port map (h => h, l => l, o => o);
+
+ process
+ begin
+ h <= x"00";
+ l <= x"ab";
+ wait for 1 ns;
+ assert o = x"0b" severity failure;
+
+ h <= x"50";
+ l <= x"a6";
+ wait for 1 ns;
+ assert o = x"56" severity failure;
+
+ h <= x"a3";
+ l <= x"5c";
+ wait for 1 ns;
+ assert o = x"af" severity failure;
+
+ wait;
+ end process;
+end behav;