-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSEG7_LUT.vhd
56 lines (51 loc) · 1.62 KB
/
SEG7_LUT.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
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity SEG7_LUT is
port (
iDIG : in std_logic_vector( 3 downto 0 );
oSEG : out std_logic_vector( 6 downto 0 )
);
end entity;
architecture rtl of SEG7_LUT is
begin
process(iDIG)
begin
case ( iDIG ) is
when X"1" =>
oSEG <= B"1111001" ;
when X"2" =>
oSEG <= B"0100100" ;
when X"3" =>
oSEG <= B"0110000" ;
when X"4" =>
oSEG <= B"0011001" ;
when X"5" =>
oSEG <= B"0010010" ;
when X"6" =>
oSEG <= B"0000010" ;
when X"7" =>
oSEG <= B"1111000" ;
when X"8" =>
oSEG <= B"0000000" ;
when X"9" =>
oSEG <= B"0011000" ;
when X"a" =>
oSEG <= B"0001000" ;
when X"b" =>
oSEG <= B"0000011" ;
when X"c" =>
oSEG <= B"1000110" ;
when X"d" =>
oSEG <= B"0100001" ;
when X"e" =>
oSEG <= B"0000110" ;
when X"f" =>
oSEG <= B"0001110" ;
when X"0" =>
oSEG <= B"1000000" ;
when others =>
oSEG <= B"0111111" ;
end case;
end process;
end architecture;