diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-06-14 05:52:33 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-06-14 05:52:33 +0200 |
commit | 9a9e16ab09872600576421ef81385d4dc39c8261 (patch) | |
tree | 6afff7237cd33f9257937f8e3dfc6d28b27e883b /testsuite/synth | |
parent | 02901338441cc151c746fe7f181d27194bea6fd0 (diff) | |
download | ghdl-9a9e16ab09872600576421ef81385d4dc39c8261.tar.gz ghdl-9a9e16ab09872600576421ef81385d4dc39c8261.tar.bz2 ghdl-9a9e16ab09872600576421ef81385d4dc39c8261.zip |
testsuite/synth: add a test for #2054
Diffstat (limited to 'testsuite/synth')
-rw-r--r-- | testsuite/synth/issue2054/flip_flop.vhdl | 16 | ||||
-rwxr-xr-x | testsuite/synth/issue2054/testsuite.sh | 11 |
2 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/synth/issue2054/flip_flop.vhdl b/testsuite/synth/issue2054/flip_flop.vhdl new file mode 100644 index 000000000..a5bbe5d27 --- /dev/null +++ b/testsuite/synth/issue2054/flip_flop.vhdl @@ -0,0 +1,16 @@ +library ieee; +use ieee.numeric_std.all; +use ieee.std_logic_1164.all; + +entity flip_flop is + port ( + clk : in std_logic; + wire : in std_logic; + reg : out std_logic + ); +end; + +architecture a_flip_flop of flip_flop is +begin + reg <= wire when rising_edge(clk); +end; diff --git a/testsuite/synth/issue2054/testsuite.sh b/testsuite/synth/issue2054/testsuite.sh new file mode 100755 index 000000000..af0825e54 --- /dev/null +++ b/testsuite/synth/issue2054/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +synth --out=verilog flip_flop.vhdl -e > syn_flip_flop.v + +if grep "input wire" syn_flip_flop.v; then + exit 1 +fi + +echo "Test successful" |