OpenCores
URL https://opencores.org/ocsvn/wb_lpc/wb_lpc/trunk

Subversion Repositories wb_lpc

[/] [wb_lpc/] [trunk/] [examples/] [lpc_7seg/] [disp_dec.vhd] - Blame information for rev 7

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 hharte
--------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer:
4
--
5
-- Create Date:    16:07:18 01/02/06
6
-- Design Name:    
7
-- Module Name:    dip_dec - Behavioral
8
-- Project Name:   
9
-- Target Device:  
10
-- Tool versions:  
11
-- Description:
12
--
13
-- Dependencies:
14
-- 
15
-- Revision:
16
-- Revision 0.01 - File Created
17
-- Additional Comments:
18
-- 
19
--------------------------------------------------------------------------------
20
library IEEE;
21
use IEEE.STD_LOGIC_1164.ALL;
22
use IEEE.STD_LOGIC_ARITH.ALL;
23
use IEEE.STD_LOGIC_UNSIGNED.ALL;
24
 
25
---- Uncomment the following library declaration if instantiating
26
---- any Xilinx primitives in this code.
27
--library UNISIM;
28
--use UNISIM.VComponents.all;
29
 
30
entity disp_dec is
31
port    (
32
                disp_dec_in             : in std_logic_vector(3 downto 0);
33
                disp_dec_out    : out std_logic_vector(6 downto 0)
34
                );
35
end disp_dec;
36
 
37
 
38
architecture disp_dec_behave of disp_dec is
39
 
40
begin
41
 
42
 
43
process (disp_dec_in)
44
begin
45
        case disp_dec_in is
46
                when "0000" =>
47
                        disp_dec_out <= "1000000";
48
                when "0001" =>
49
                        disp_dec_out <= "1111001";
50
                when "0010" =>
51
                        disp_dec_out <= "0100100";
52
                when "0011" =>
53
                        disp_dec_out <= "0110000";
54
                when "0100" =>
55
                        disp_dec_out <= "0011001";
56
                when "0101" =>
57
                        disp_dec_out <= "0010010";
58
                when "0110" =>
59
                        disp_dec_out <= "0000010";
60
                when "0111" =>
61
                        disp_dec_out <= "1111000";
62
                when "1000" =>
63
                        disp_dec_out <= "0000000";
64
                when "1001" =>
65
                        disp_dec_out <= "0010000";
66
                when "1010" =>
67
                        disp_dec_out <= "0001000";
68
                when "1011" =>
69
                        disp_dec_out <= "0000011";
70
                when "1100" =>
71
                        disp_dec_out <= "1000110";
72
                when "1101" =>
73
                        disp_dec_out <= "0100001";
74
                when "1110" =>
75
                        disp_dec_out <= "0000110";
76
                when "1111" =>
77
                        disp_dec_out <= "0001110";
78
                when others     =>
79
                         disp_dec_out <= "1111111";
80
        end case;
81
end process;
82
 
83
end disp_dec_behave;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.