summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold2015-09-10 20:57:12 +0200
committerTristan Gingold2015-09-10 20:57:12 +0200
commit95632804220716d4993d3e4b0d0cba06d984a837 (patch)
tree7341256ddcb14055fb6f32c524d42442eb7e7fd9 /testsuite
parentb195da2af5c575b246e73753dd2c0cab5b1f995c (diff)
downloadghdl-95632804220716d4993d3e4b0d0cba06d984a837.tar.gz
ghdl-95632804220716d4993d3e4b0d0cba06d984a837.tar.bz2
ghdl-95632804220716d4993d3e4b0d0cba06d984a837.zip
Add reproducer for ticket92.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/ticket92/cover_report.vhd59
-rwxr-xr-xtestsuite/gna/ticket92/testsuite.sh11
2 files changed, 70 insertions, 0 deletions
diff --git a/testsuite/gna/ticket92/cover_report.vhd b/testsuite/gna/ticket92/cover_report.vhd
new file mode 100644
index 0000000..e7f1e30
--- /dev/null
+++ b/testsuite/gna/ticket92/cover_report.vhd
@@ -0,0 +1,59 @@
+library ieee;
+ use ieee.std_logic_1164.all;
+
+library std;
+ use std.env.all;
+
+
+
+entity cover_report is
+end entity cover_report;
+
+
+
+architecture test of cover_report is
+
+
+ signal s_a : std_logic;
+ signal s_b : std_logic;
+ signal s_c : std_logic;
+ signal s_clk : std_logic := '0';
+
+
+begin
+
+
+ s_clk <= not(s_clk) after 5 ns;
+
+
+ process is
+ begin
+ s_a <= '0';
+ s_b <= '0';
+ s_c <= '0';
+ wait until rising_edge(s_clk);
+ s_a <= '1';
+ wait until rising_edge(s_clk);
+ s_a <= '0';
+ s_b <= '1';
+ wait until rising_edge(s_clk);
+ s_b <= '0';
+ s_c <= '1';
+ wait until rising_edge(s_clk);
+ s_c <= '0';
+ stop(0);
+ end process;
+
+
+ -- psl default clock is rising_edge(s_clk);
+ --
+ -- psl property test_p is ({s_a; s_b});
+ --
+ -- DOES WORK
+ -- -- psl TEST : cover test_p;
+ --
+ -- DOESN'T WORK:
+ -- psl cover test_p report "Covered";
+
+
+end architecture test;
diff --git a/testsuite/gna/ticket92/testsuite.sh b/testsuite/gna/ticket92/testsuite.sh
new file mode 100755
index 0000000..8a76a98
--- /dev/null
+++ b/testsuite/gna/ticket92/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS="--std=08 -fpsl"
+
+analyze cover_report.vhd
+elab_simulate cover_report
+clean
+
+echo "Test successful"