aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/synth27
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-09-25 20:39:46 +0200
committerTristan Gingold <tgingold@free.fr>2019-09-25 20:39:46 +0200
commit6e9336d11dfc4f53dba234e1f02a2b0172461e0c (patch)
tree12f93ed2cbbb62c0e8e2fb6b7124201fe0a216bd /testsuite/synth/synth27
parentdcc353b07b82a84f2aa598de3884c58f406e0652 (diff)
downloadghdl-6e9336d11dfc4f53dba234e1f02a2b0172461e0c.tar.gz
ghdl-6e9336d11dfc4f53dba234e1f02a2b0172461e0c.tar.bz2
ghdl-6e9336d11dfc4f53dba234e1f02a2b0172461e0c.zip
testsuite/synth: rename issueXX to synthXX for ghdlsynth-beta issues.
Diffstat (limited to 'testsuite/synth/synth27')
-rw-r--r--testsuite/synth/synth27/dff.vhdl40
-rwxr-xr-xtestsuite/synth/synth27/testsuite.sh8
2 files changed, 48 insertions, 0 deletions
diff --git a/testsuite/synth/synth27/dff.vhdl b/testsuite/synth/synth27/dff.vhdl
new file mode 100644
index 000000000..2bf3ebec8
--- /dev/null
+++ b/testsuite/synth/synth27/dff.vhdl
@@ -0,0 +1,40 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity dff is
+ generic(
+ formal_g : boolean := true
+ );
+ port(
+ reset : in std_logic;
+ clk : in std_logic;
+ d : in std_logic;
+ q : out std_logic
+ );
+end entity dff;
+
+architecture rtl of dff is
+ signal q_int : std_logic;
+begin
+
+ dff_proc : process(clk, reset)
+ begin
+ if reset = '1' then
+ q_int <= '0';
+ elsif rising_edge(clk) then
+ q_int <= d;
+ end if;
+ end process dff_proc;
+
+ -- drive q_int to output port
+ q <= q_int;
+
+ formal_gen : if formal_g = true generate
+ begin
+ -- set all declarations to run on clk
+ default clock is rising_edge(clk);
+ d_in_check : assert always {d} |=> {q_int};
+ not_d_in_check : assert always {not d} |=> {not q_int};
+ end generate formal_gen;
+
+end rtl;
diff --git a/testsuite/synth/synth27/testsuite.sh b/testsuite/synth/synth27/testsuite.sh
new file mode 100755
index 000000000..b5ed1a2b7
--- /dev/null
+++ b/testsuite/synth/synth27/testsuite.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+synth dff.vhdl -e dff > syn_dff.vhdl
+
+echo "Test successful"