-
Notifications
You must be signed in to change notification settings - Fork 0
/
DisplayUnit.vhd
67 lines (46 loc) · 1.97 KB
/
DisplayUnit.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
-- Unidade de display tempo com operação blink
Library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity DisplayUnit is
port( clk : in std_logic;
AcerH : in std_logic;
AcerM : in std_logic;
min_U : in std_logic_vector(3 downto 0);
min_D : in std_logic_vector(3 downto 0);
horas_U : in std_logic_vector(3 downto 0);
horas_D : in std_logic_vector(3 downto 0);
dispOut0 : out std_logic_vector(6 downto 0);
dispOut1 : out std_logic_vector(6 downto 0);
dispOut2 : out std_logic_vector(6 downto 0);
dispOut3 : out std_logic_vector(6 downto 0));
end DisplayUnit;
architecture Behavioral of DisplayUnit is
signal s_blink, s_outOperatM, s_outOperatH : std_logic;
begin
pulseBlink : entity work.BlinkPulseGenerator(Behavioral)
generic map( NUMBER_STEPS => 50_000_000)
port map( clk => clk,
blink => s_blink);
operateBlink : entity work.BlinkOperation(Behavioral)
port map( AcerH => AcerH,
AcerM => AcerM,
blink => s_blink,
outOperatM => s_outOperatM,
outOperatH => s_outOperatH);
DisplayMinUni : entity work.Bin7SegDecoderEn(Behavioral)
port map( binInput => min_U,
enable => s_outOperatM,
decOut_n => dispOut0);
DisplayMinDez : entity work.Bin7SegDecoderEn(Behavioral)
port map( binInput => min_D,
enable => s_outOperatM,
decOut_n => dispOut1);
DisplayHorUni : entity work.Bin7SegDecoderEn(Behavioral)
port map( binInput => horas_U,
enable => s_outOperatH,
decOut_n => dispOut2);
DisplayHorDez : entity work.Bin7SegDecoderEn(Behavioral)
port map( binInput => horas_D,
enable => s_outOperatH,
decOut_n => dispOut3);
end Behavioral;