blob: d23cccd3646c93cce8716733765d43235dc504a5 (
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
33
|
entity foo is
port (
a0 : in bit_vector(1 downto 0)
);
end entity;
architecture bar of foo is
begin
assert a0(0) = '0';
end architecture;
entity foo_tb is
generic
( DEFAULT_X : bit_vector(1 downto 0) := (others => '0')
);
end entity;
architecture tb of foo_tb is
function compute_stuff_with_x(x : bit_vector) return bit_vector is
begin
return x;
end compute_stuff_with_x;
begin
foo_inst:
entity work.foo
port map
( a0 => compute_stuff_with_x(DEFAULT_X)
);
end architecture;
|