blob: fd81a9ca98ce687bb2938c5aa656d36b8df0a67b (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
library ieee;
use ieee.std_logic_1164.all;
library work;
use work.ext_comp.all;
entity ent is
-- This case works.
-- generic ( CONFIG_C1: boolean := false );
port (
i : in std_logic;
o : out std_logic;
q : out std_logic
);
constant CONFIG_C1 : boolean := false;
end;
architecture a of ent is
begin
gen: if false generate
o <= '1';
else generate
o <= '0';
end generate;
maybe_c1:
if CONFIG_C1 generate
c1_inst: c1 port map (i => i, o=> q);
end generate;
maybe_c2:
if not CONFIG_C1 generate
c2_inst: c2 port map (i => i, o=> q);
end generate;
end;
-- Added entities to satisfy simulation:
library ieee;
use ieee.std_logic_1164.all;
entity c1 is
port (i: in std_logic; o : out std_logic);
end entity;
architecture a of c1 is
begin
o <= i;
end a;
library ieee;
use ieee.std_logic_1164.all;
entity c2 is
port (i: in std_logic; o : out std_logic);
end entity;
architecture a of c2 is
begin
o <= i;
end a;
|