diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gna/issue613/t87.vhdl | 17 | ||||
-rwxr-xr-x | testsuite/gna/issue613/testsuite.sh | 10 |
2 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/gna/issue613/t87.vhdl b/testsuite/gna/issue613/t87.vhdl new file mode 100644 index 000000000..847bf4e47 --- /dev/null +++ b/testsuite/gna/issue613/t87.vhdl @@ -0,0 +1,17 @@ +entity t87 is +end; + +architecture behav of t87 is + constant t1 : time := 1 ns; + constant t2 : natural := time'pos (t1); +begin + assert t1 = 1000 ps; + process + variable v : natural; + begin + -- Time resolution must be ps + v := time'pos(ps); + assert v = 1 severity failure; + wait; + end process; +end behav; diff --git a/testsuite/gna/issue613/testsuite.sh b/testsuite/gna/issue613/testsuite.sh index 90e38214a..4fb7d0126 100755 --- a/testsuite/gna/issue613/testsuite.sh +++ b/testsuite/gna/issue613/testsuite.sh @@ -17,6 +17,16 @@ else elab_simulate --time-resolution=us ent elab_simulate --time-resolution=auto ent + + analyze t87.vhdl + elab_simulate --time-resolution=ps t87 + elab_simulate --time-resolution=auto t87 + clean + + GHDL_STD_FLAGS=--std=87 + analyze t87.vhdl + elab_simulate --time-resolution=ps t87 + elab_simulate_failure --time-resolution=auto t87 clean fi |