diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-03-22 05:45:15 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-03-22 05:45:15 +0100 |
commit | 25faaa93e9b2585dd0e48b4fe365fa53474a3a3b (patch) | |
tree | 20f24b3bd5f29bfc0ed94467d3301ca222aec35a /testsuite/gna | |
parent | db9df06f901abe21976ae8f5d3b680965daef70b (diff) | |
download | ghdl-25faaa93e9b2585dd0e48b4fe365fa53474a3a3b.tar.gz ghdl-25faaa93e9b2585dd0e48b4fe365fa53474a3a3b.tar.bz2 ghdl-25faaa93e9b2585dd0e48b4fe365fa53474a3a3b.zip |
Add testcase for psl endpoints.
Diffstat (limited to 'testsuite/gna')
-rw-r--r-- | testsuite/gna/issue45/test2.vhdl | 34 | ||||
-rwxr-xr-x | testsuite/gna/issue45/testsuite.sh | 3 |
2 files changed, 37 insertions, 0 deletions
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" |