diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-02-11 07:43:06 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-02-11 18:55:29 +0100 |
commit | 6090543d0315b2e04374d3ad19b393ea22016974 (patch) | |
tree | f010b7cb059b1a8416fb0add291bc456249fb53f /testsuite | |
parent | 8e832e1b538f60f4bec8d67e59699a8a9c439b04 (diff) | |
download | ghdl-6090543d0315b2e04374d3ad19b393ea22016974.tar.gz ghdl-6090543d0315b2e04374d3ad19b393ea22016974.tar.bz2 ghdl-6090543d0315b2e04374d3ad19b393ea22016974.zip |
testsuite/gna: add a test for #1640
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gna/issue1640/test.vhdl | 30 | ||||
-rwxr-xr-x | testsuite/gna/issue1640/testsuite.sh | 9 |
2 files changed, 39 insertions, 0 deletions
diff --git a/testsuite/gna/issue1640/test.vhdl b/testsuite/gna/issue1640/test.vhdl new file mode 100644 index 000000000..d0db05141 --- /dev/null +++ b/testsuite/gna/issue1640/test.vhdl @@ -0,0 +1,30 @@ +package cpu_types is + + constant word_size : positive := 2147483649; + constant address_size : positive := 24; + + subtype word is bit_vector(word_size - 1 downto 0); + subtype address is bit_vector(address_size - 1 downto 0); + + type status_value is ( halted, idle, fetch, mem_read, mem_write, + io_read, io_write, int_ack ); + +end package cpu_types; + +-- end code from book + + + +package fg_08_01 is + + constant status : + -- code from book + work.cpu_types.status_value + -- end code from book + := + -- code from book + work.cpu_types.status_value'(work.cpu_types.fetch) + -- end code from book + ; + +end package fg_08_01; diff --git a/testsuite/gna/issue1640/testsuite.sh b/testsuite/gna/issue1640/testsuite.sh new file mode 100755 index 000000000..f8534f54e --- /dev/null +++ b/testsuite/gna/issue1640/testsuite.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze test.vhdl + +clean + +echo "Test successful" |