diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-05-28 08:00:40 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-05-28 08:00:40 +0200 |
commit | 57612b1e15ceef2c7b2a43e2262493d010199d6b (patch) | |
tree | 1088e1092bcb8d492d068db93e12786e265b3315 /testsuite/gna | |
parent | ed658a2907c3344b62f66bd0d44769afcef00723 (diff) | |
download | ghdl-57612b1e15ceef2c7b2a43e2262493d010199d6b.tar.gz ghdl-57612b1e15ceef2c7b2a43e2262493d010199d6b.tar.bz2 ghdl-57612b1e15ceef2c7b2a43e2262493d010199d6b.zip |
vhdl: add testcase for previous patch.
Diffstat (limited to 'testsuite/gna')
-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 |