From a4dc62f6b5a8886085cf9364a66f3a118ff020e3 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 20 Jul 2019 11:03:24 +0200 Subject: synth: add a test for previous commit. --- testsuite/synth/func01/func02.vhdl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 testsuite/synth/func01/func02.vhdl (limited to 'testsuite/synth/func01/func02.vhdl') diff --git a/testsuite/synth/func01/func02.vhdl b/testsuite/synth/func01/func02.vhdl new file mode 100644 index 000000000..9476c9130 --- /dev/null +++ b/testsuite/synth/func01/func02.vhdl @@ -0,0 +1,20 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity func02 is + port (a : std_logic_vector (7 downto 0); + b : out std_logic_vector (7 downto 0)); +end func02; + +architecture behav of func02 is + function gen_mask (len : natural) return std_logic_vector is + variable res : std_logic_vector (len - 1 downto 0); + begin + res := (0 => '1', others => '0'); + return res; + end gen_mask; + +begin + b <= a and gen_mask (8); +end behav; + -- cgit v1.2.3