diff options
| -rw-r--r-- | testsuite/synth/issue1034/ent.vhdl | 14 | ||||
| -rw-r--r-- | testsuite/synth/issue1034/p.vhdl | 11 | ||||
| -rw-r--r-- | testsuite/synth/issue1034/tb_ent.vhdl | 12 | ||||
| -rwxr-xr-x | testsuite/synth/issue1034/testsuite.sh | 16 | 
4 files changed, 53 insertions, 0 deletions
diff --git a/testsuite/synth/issue1034/ent.vhdl b/testsuite/synth/issue1034/ent.vhdl new file mode 100644 index 000000000..371e687be --- /dev/null +++ b/testsuite/synth/issue1034/ent.vhdl @@ -0,0 +1,14 @@ +use work.p.all; + +entity ent is +	generic ( +		WIDTH : natural := 8 +	); +	port ( +		test : in bit_vector(id(WIDTH)-1 downto 0) +	); +end ent; + +architecture a of ent is +begin +end a; diff --git a/testsuite/synth/issue1034/p.vhdl b/testsuite/synth/issue1034/p.vhdl new file mode 100644 index 000000000..a91e5dce9 --- /dev/null +++ b/testsuite/synth/issue1034/p.vhdl @@ -0,0 +1,11 @@ +package p is +	function id(val : natural) return natural; +end package; + +package body p is +	function id(val : natural) return natural is +	begin +		return val; +	end function; +end package body; + diff --git a/testsuite/synth/issue1034/tb_ent.vhdl b/testsuite/synth/issue1034/tb_ent.vhdl new file mode 100644 index 000000000..fdeda6146 --- /dev/null +++ b/testsuite/synth/issue1034/tb_ent.vhdl @@ -0,0 +1,12 @@ +entity tb_ent is +end tb_ent; + +library ieee; +use ieee.std_logic_1164.all; + +architecture behav of tb_ent is +  signal a : bit_vector(7 downto 0); +begin +  dut: entity work.ent +    port map (a); +end behav; diff --git a/testsuite/synth/issue1034/testsuite.sh b/testsuite/synth/issue1034/testsuite.sh new file mode 100755 index 000000000..045165428 --- /dev/null +++ b/testsuite/synth/issue1034/testsuite.sh @@ -0,0 +1,16 @@ +#! /bin/sh + +. ../../testenv.sh + +for t in ent; do +    analyze p.vhdl $t.vhdl tb_$t.vhdl +    elab_simulate tb_$t +    clean + +    synth p.vhdl $t.vhdl -e $t > syn_$t.vhdl +    analyze p.vhdl syn_$t.vhdl tb_$t.vhdl +    elab_simulate tb_$t --ieee-asserts=disable-at-0 +    clean +done + +echo "Test successful"  | 
