From 25faaa93e9b2585dd0e48b4fe365fa53474a3a3b Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 22 Mar 2016 05:45:15 +0100 Subject: Add testcase for psl endpoints. --- testsuite/gna/issue45/test2.vhdl | 34 ++++++++++++++++++++++++++++++++++ testsuite/gna/issue45/testsuite.sh | 3 +++ 2 files changed, 37 insertions(+) create mode 100644 testsuite/gna/issue45/test2.vhdl (limited to 'testsuite/gna/issue45') diff --git a/testsuite/gna/issue45/test2.vhdl b/testsuite/gna/issue45/test2.vhdl new file mode 100644 index 000000000..6e8c2451a --- /dev/null +++ b/testsuite/gna/issue45/test2.vhdl @@ -0,0 +1,34 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity psl_test2_endpoint is +end entity psl_test2_endpoint; + +architecture test of psl_test2_endpoint is + signal s_clk : std_logic := '0'; + signal req, grant : std_logic; +begin + + grant <= '0'; + + process + begin + for i in 1 to 10 loop + s_clk <= not s_clk; + if i = 5 then + req <= '1'; + end if; + wait for 10 ns; + end loop; + wait; + end process; + + -- psl endpoint e_test is {req; not(grant)} @rising_edge (s_clk); + + process + begin + wait until e_test; + report "e_test hit" severity error; + wait; + end process; +end architecture test; diff --git a/testsuite/gna/issue45/testsuite.sh b/testsuite/gna/issue45/testsuite.sh index 71bfe447b..79e947ecc 100755 --- a/testsuite/gna/issue45/testsuite.sh +++ b/testsuite/gna/issue45/testsuite.sh @@ -10,6 +10,9 @@ elab_simulate psl_test_endpoint --psl-report=psl.out grep -q '"cover-pass": 3' psl.out rm psl.out +analyze test2.vhdl +elab_simulate psl_test2_endpoint --assert-level=error --expect-failure + clean echo "Test successful" -- cgit v1.2.3