blob: 999691c5f6e0dc050577ab9c59da49ac8f0d26fb (
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
|
library ieee;
use ieee.std_logic_1164.all;
entity one is
generic (
PORT_WIDTH : integer
);
port (
INPUT : in std_logic_vector(PORT_WIDTH-1 downto 0)
);
end entity;
architecture rtl of one is
begin
end architecture;
-----------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std_unsigned.all;
entity two is
end entity;
architecture rtl of two is
signal ctr : integer range 0 to 7;
begin
one_inst : entity work.one
generic map (
PORT_WIDTH => 3
)
port map (
INPUT => to_slv(ctr, 3)
);
end architecture;
|