-
Notifications
You must be signed in to change notification settings - Fork 0
/
portBlinky.vhd
72 lines (63 loc) · 1.52 KB
/
portBlinky.vhd
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
66
67
68
69
70
71
72
-- portBlinky.vhd
library ieee;
use ieee.std_logic_1164.all;
library altera;
use altera.altera_syn_attributes.all;
entity portBlinky is
port (
-- Define ports for connecting with other modules
ipin_S1 : in std_logic;
ipin_S2 : in std_logic;
ipin_clk50 : in std_logic;
opin_D1 : out std_logic;
opin_D5 : out std_logic
);
end portBlinky;
architecture rtl of portBlinky is
-- Include the required component declarations for your modules
component S1toD1
port
(
i_S1 : IN STD_LOGIC;
o_intermediate : OUT STD_LOGIC
);
end component;
component ANDFILE
port
(
i_intermediate : IN STD_LOGIC;
i_S2 : IN STD_LOGIC;
o_D1 : OUT STD_LOGIC
);
end component;
component blink
port
(
i_clk : IN STD_LOGIC;
o_flashing : OUT STD_LOGIC
);
end component;
-- Signals for interconnecting modules
signal signal_interconnect1 : std_logic;
begin
-- Instantiate S1toD1
inst_S1toD1: S1toD1
port map (
-- Connect ports of S1toD1 to ports or signals of the top level
i_S1 => ipin_S1,
o_intermediate => signal_interconnect1
);
-- Instantiate ANDFILE
inst_ANDFILE: ANDFILE
port map (
-- Connect ports of ANDFILE to ports or signals of the top level
i_intermediate => signal_interconnect1,
i_S2 => ipin_S2,
o_D1 => opin_D1
);
inst_blink: blink
port map(
i_clk => ipin_clk50,
o_flashing => opin_D5
);
end rtl;