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

Subversion Repositories adaptive_lms_equalizer

[/] [adaptive_lms_equalizer/] [trunk/] [code/] [bin_to_7seg.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 digish
--  Copyright (C) 2004-2005 Digish Pandya <digish.pandya@gmail.com>
2
 
3
--  This program is free software; you can redistribute it and/or modify
4
--  it under the terms of the GNU General Public License as published by
5
--  the Free Software Foundation; either version 2 of the License, or
6
--  (at your option) any later version.
7
--
8
--  This program is distributed in the hope that it will be useful,
9
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
10
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
--  GNU General Public License for more details.
12
--
13
--  You should have received a copy of the GNU General Public License
14
--  along with this program; if not, write to the Free Software
15
--  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
16
 
17
 
18
-- seven segment display mapping from 8 bit no
19
 
20
 
21
 
22
library IEEE;
23
use IEEE.STD_LOGIC_1164.ALL;
24
use IEEE.STD_LOGIC_ARITH.ALL;
25
use IEEE.STD_LOGIC_UNSIGNED.ALL;
26
 
27
 
28
entity bin_to_7seg is
29
    Port ( din : in std_logic_vector(3 downto 0);
30
           dis_out : out std_logic_vector(7 downto 0));
31
end bin_to_7seg;
32
 
33
architecture Behavioral of bin_to_7seg is
34
 
35
begin
36
 
37
 
38
dis_out <=      "00000010" when din = "0000" else
39
                        "10011110" when din = "0001" else
40
                        "00100100" when din = "0010" else
41
                        "00001100" when din = "0011" else
42
                        "10011000" when din = "0100" else
43
                        "01001000" when din = "0101" else
44
                        "01000000" when din = "0110" else
45
                        "00011110" when din = "0111" else
46
                        "00000000" when din = "1000" else
47
                        "00011000" when din = "1001" else
48
                        "00010000" when din = "1010" else
49
                        "11000000" when din = "1011" else
50
                        "01100010" when din = "1100" else
51
                        "10000100" when din = "1101" else
52
                        "01100000" when din = "1110" else
53
                        "01110000";
54
 
55
 
56
end Behavioral;

powered by: WebSVN 2.1.0

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