blob: 8aadd3f4b25fa80c32dc612b73fb2ee01c8a549d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity test is
port (in_vec : in std_logic_vector);
end entity;
architecture rtl of test is
signal A : natural;
begin
gen2 : if in_vec'length <= 2 generate
A <= 2;
end generate;
gen3 : if in_vec'length > 2 generate
A <= 3;
end generate;
end architecture;
|