diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-06-12 05:38:52 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-06-12 05:38:52 +0200 |
commit | 15f250b53c21dc9898126d9476edb4322cdbb6b4 (patch) | |
tree | 3a15e42b4cceaf34f3279c8a3385f529e562d99b /testsuite/gna/issue301/repro.vhdl | |
parent | d986b9af22f4e927e887f1bd6f9ff5174dde4aca (diff) | |
download | ghdl-15f250b53c21dc9898126d9476edb4322cdbb6b4.tar.gz ghdl-15f250b53c21dc9898126d9476edb4322cdbb6b4.tar.bz2 ghdl-15f250b53c21dc9898126d9476edb4322cdbb6b4.zip |
Add reproducer for #301
Diffstat (limited to 'testsuite/gna/issue301/repro.vhdl')
-rw-r--r-- | testsuite/gna/issue301/repro.vhdl | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/testsuite/gna/issue301/repro.vhdl b/testsuite/gna/issue301/repro.vhdl new file mode 100644 index 000000000..04369e197 --- /dev/null +++ b/testsuite/gna/issue301/repro.vhdl @@ -0,0 +1,40 @@ +package pkgc is + constant width : natural; +end pkgc; + +package body pkgc is + constant width : natural := 4; +end pkgc; + +use work.pkgc.all; +package pkgcomp is + component comp is + generic (val : bit_vector (width -1 downto 0)); + port (b : out bit); + end component; +end pkgcomp; + +use work.pkgc.all; +entity comp is + generic (val : bit_vector (width -1 downto 0)); + port (b : out bit); +end comp; + +architecture behav of comp is +begin + b <= val (val'left); +end behav; + +entity repro is +end repro; + +use work.pkgc.all; +use work.pkgcomp.all; + +architecture behav of repro is + signal res : bit; +begin + inst : comp + generic map (val => "0010") + port map (b => res ); +end behav; |