aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1123/b.vhdl
blob: 36e18b9e918c67695541fce0d3dca21ea909bc25 (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
31
32
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity A is
port(x: in std_ulogic_vector(4 downto 0));
end entity;

architecture test of A is
begin
end architecture;

entity B is
end entity;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

architecture test of B is
    function to_vector(signal d: unsigned(4 downto 0)) return std_ulogic_vector is
    begin
        return std_ulogic_vector(d);
    end function;

    signal s: unsigned(4 downto 0) := (others => '0');
begin
    test: entity work.A
    port map(
        x => to_vector(s)
    );
end architecture;