aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/func01/tb_func08b.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-09-28 07:07:04 +0200
committerTristan Gingold <tgingold@free.fr>2019-09-28 07:07:04 +0200
commit563d56b60c08d70fc30277f26b8f7fc1628b4fe9 (patch)
tree13911e63f018a99f8bec65c29b7d21f6994cbd6b /testsuite/synth/func01/tb_func08b.vhdl
parentdf9c9a3e8db99bc9647e1c349c22f77e4566ecc9 (diff)
downloadghdl-563d56b60c08d70fc30277f26b8f7fc1628b4fe9.tar.gz
ghdl-563d56b60c08d70fc30277f26b8f7fc1628b4fe9.tar.bz2
ghdl-563d56b60c08d70fc30277f26b8f7fc1628b4fe9.zip
testsuite/synth/func01: replace func08 by func08b (need to optimize).
Diffstat (limited to 'testsuite/synth/func01/tb_func08b.vhdl')
-rw-r--r--testsuite/synth/func01/tb_func08b.vhdl34
1 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/synth/func01/tb_func08b.vhdl b/testsuite/synth/func01/tb_func08b.vhdl
new file mode 100644
index 000000000..918225e5c
--- /dev/null
+++ b/testsuite/synth/func01/tb_func08b.vhdl
@@ -0,0 +1,34 @@
+entity tb_func08b is
+end tb_func08b;
+
+library ieee;
+use ieee.std_logic_1164.all;
+
+architecture behav of tb_func08b is
+ signal v : std_ulogic_vector(3 downto 0);
+ signal r : integer;
+begin
+ dut: entity work.func08b
+ port map (v, r);
+
+ process
+ begin
+ v <= x"0";
+ wait for 1 ns;
+ assert r = 4 severity failure;
+
+ v <= x"1";
+ wait for 1 ns;
+ assert r = 3 severity failure;
+
+ v <= x"8";
+ wait for 1 ns;
+ assert r = 0 severity failure;
+
+ v <= x"3";
+ wait for 1 ns;
+ assert r = 2 severity failure;
+
+ wait;
+ end process;
+end behav;