diff options
| author | Tristan Gingold <tgingold@free.fr> | 2016-01-10 12:38:09 +0100 | 
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2016-01-11 21:26:44 +0100 | 
| commit | 5146525c6fb0c907c4030b1ba012203c8721c45f (patch) | |
| tree | 458e61bb1784956b39c11ef1252a507c5fc8e466 | |
| parent | 15cf5147f7a97759ac3385d214533d5500b3f9c3 (diff) | |
| download | ghdl-5146525c6fb0c907c4030b1ba012203c8721c45f.tar.gz ghdl-5146525c6fb0c907c4030b1ba012203c8721c45f.tar.bz2 ghdl-5146525c6fb0c907c4030b1ba012203c8721c45f.zip  | |
Add attribute specification in issue10.
| -rw-r--r-- | testsuite/gna/issue10/test_attr.vhdl | 20 | ||||
| -rwxr-xr-x | testsuite/gna/issue10/testsuite.sh | 7 | 
2 files changed, 26 insertions, 1 deletions
diff --git a/testsuite/gna/issue10/test_attr.vhdl b/testsuite/gna/issue10/test_attr.vhdl new file mode 100644 index 000000000..e33403297 --- /dev/null +++ b/testsuite/gna/issue10/test_attr.vhdl @@ -0,0 +1,20 @@ +entity test_attr is +end entity; + +architecture rtl of test_attr is +  type T_TUPLE is record +    A  : NATURAL; +    B  : NATURAL; +  end record; +  type T_VECTOR is array (NATURAL range <>) of T_TUPLE; + +  attribute attr : t_vector; +  attribute attr of t_tuple : type is ((8, 32), (8, 20), (8, 36)); +begin +  genTests : for i in t_tuple'attr'range generate +    constant LOCAL_A : NATURAL := t_tuple'attr(i).A; +    constant LOCAL_B : NATURAL := t_tuple'attr(i).B; +  begin +    -- my tests +  end generate; +end architecture; diff --git a/testsuite/gna/issue10/testsuite.sh b/testsuite/gna/issue10/testsuite.sh index e40366d6e..cdac78956 100755 --- a/testsuite/gna/issue10/testsuite.sh +++ b/testsuite/gna/issue10/testsuite.sh @@ -2,8 +2,13 @@  . ../../testenv.sh -analyze_failure --std=93 test_id.vhdl +analyze --std=93 test_id.vhdl +elab_simulate --std=93 test_id  analyze test_id.vhdl +elab_simulate test_id + +analyze test_attr.vhdl +elab_simulate test_attr  clean  | 
