From 5665fedba4ec5034df43efdb520b961455c45319 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 29 Oct 2021 18:51:26 +0200 Subject: testsuite/synth: add a test for #1903 --- testsuite/synth/issue1903/tb.vhdl | 23 +++++++++++++++++++++++ testsuite/synth/issue1903/testsuite.sh | 7 +++++++ 2 files changed, 30 insertions(+) create mode 100644 testsuite/synth/issue1903/tb.vhdl create mode 100755 testsuite/synth/issue1903/testsuite.sh diff --git a/testsuite/synth/issue1903/tb.vhdl b/testsuite/synth/issue1903/tb.vhdl new file mode 100644 index 000000000..aab6a85fe --- /dev/null +++ b/testsuite/synth/issue1903/tb.vhdl @@ -0,0 +1,23 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity tb is port ( + clk : in std_logic; + rst : in std_logic; + a : in std_logic; + y : out std_logic); +end entity; + +architecture beh of tb is +signal yo : std_logic; + +procedure ff(signal c: in std_logic; r: in std_logic; i: in std_logic; signal o: out std_logic) is +begin + wait until c'event and c ='1'; + if r = '1' then o <= '0'; else o <= i; end if; +end ff; + +begin + ff(clk, rst, a, yo); + y <= yo; +end beh; diff --git a/testsuite/synth/issue1903/testsuite.sh b/testsuite/synth/issue1903/testsuite.sh new file mode 100755 index 000000000..38a92fd7f --- /dev/null +++ b/testsuite/synth/issue1903/testsuite.sh @@ -0,0 +1,7 @@ +#! /bin/sh + +. ../../testenv.sh + +synth_failure tb.vhdl -e + +echo "Test successful" -- cgit v1.2.3