aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/gen01/pkg04.vhdl
blob: ccca9056ed01f8ef0d277f818e67be91330e662f (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
package gen is
  generic (val : integer);

  constant c : integer := val;

  function get_val (x : integer := c) return integer;
end;

package body gen is
  function get_val (x : integer := c) return integer is
  begin
    return x + val;
  end get_val;
end;

package inst1 is new work.gen generic map (val => 5);

entity pkg04 is
  port (i : in integer;
        o : out integer);
end pkg04;

architecture behav of pkg04 is
  use work.inst1.all;
begin
  o <= i + get_val;
end behav;