blob: 2fb32023f7ca04c65495185b6371f0ce2b78a3bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package pkg1 is
type int_arr is array (natural range <>) of integer;
end pkg1;
use work.pkg1.all;
package pkg2 is
function func (a : int_arr) return natural;
end pkg2;
package body pkg2 is
function func (a : int_arr) return natural is
begin
return a'length;
end func;
end pkg2;
entity tb is
end tb;
use work.pkg2.all;
architecture behav of tb is
begin
process
constant c : natural := func (a => (1, 2, 3));
begin
wait;
end process;
end behav;
|