blob: 7bebb2168998c40e29213bbfed34657b2cd3fb80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
entity e is end entity;
architecture a of e is
type p is protected
function f(a:bit) return boolean;
end protected;
type p is protected body
function f(a:bit) return boolean is begin return a='1'; end function;
end protected body;
shared variable v :p;
component bb1 is port( s :out bit ); end component;
component bb2 is port( s :in boolean ); end component;
signal s1 :boolean;
signal s2 :bit;
begin
i1: component bb1 port map( v.f(s) => s1 );
i2: component bb2 port map( s => v.f(s2) );
end architecture;
|