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

Subversion Repositories uart_fpga_slow_control_migrated

[/] [uart_fpga_slow_control/] [trunk/] [code/] [library/] [gh_DECODE_3to8.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 aborga
-----------------------------------------------------------------------------
2
--      Filename:       gh_DECODE_3to8.vhd
3
--
4
--      Description:
5
--              a 3 to 8 decoder         
6
--
7
--      Copyright (c) 2005 by George Huber 
8
--              an OpenCores.org Project
9
--              free to use, but see documentation for conditions 
10
--
11
--      Revision        History:
12
--      Revision        Date            Author          Comment
13
--      --------        ----------      ---------       -----------
14
--      1.0             09/17/05        G Huber         Initial revision
15
--      1.1             05/05/06        G Huber         fix typo
16
--
17
-----------------------------------------------------------------------------
18
LIBRARY ieee;
19
USE ieee.std_logic_1164.all;
20
 
21
ENTITY gh_decode_3to8 IS
22
        PORT(
23
                A   : IN  STD_LOGIC_VECTOR(2 DOWNTO 0); -- address
24
                G1  : IN  STD_LOGIC; -- enable positive
25
                G2n : IN  STD_LOGIC; -- enable negative
26
                G3n : IN  STD_LOGIC; -- enable negative
27
                Y   : out STD_LOGIC_VECTOR(7 downto 0)
28
                );
29
END gh_decode_3to8 ;
30
 
31
ARCHITECTURE a OF gh_decode_3to8 IS
32
 
33
 
34
BEGIN
35
 
36
        Y <= x"00" when (G3n = '1') else
37
             x"00" when (G2n = '1') else
38
             x"00" when (G1 = '0') else
39
             x"80" when (A= o"7") else
40
             x"40" when (A= o"6") else
41
             x"20" when (A= o"5") else
42
             x"10" when (A= o"4") else
43
             x"08" when (A= o"3") else
44
             x"04" when (A= o"2") else
45
             x"02" when (A= o"1") else
46
             x"01";-- when (A= o"0")
47
 
48
 
49
END a;
50
 

powered by: WebSVN 2.1.0

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