OpenCores
URL https://opencores.org/ocsvn/am9080_cpu_based_on_microcoded_am29xx_bit-slices/am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk

Subversion Repositories am9080_cpu_based_on_microcoded_am29xx_bit-slices

[/] [am9080_cpu_based_on_microcoded_am29xx_bit-slices/] [trunk/] [Am9080/] [Am25139.vhd] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 zpekic
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: 
4
-- 
5
-- Create Date: 09/20/2017 11:51:21 PM
6
-- Design Name: 
7
-- Module Name: Am25139 - Behavioral
8
-- Project Name: 
9
-- Target Devices: 
10
-- Tool Versions: 
11
-- Description: 
12
-- 
13
-- Dependencies: 
14
-- 
15
-- Revision:
16
-- Revision 0.01 - File Created
17
-- Additional Comments:
18
-- 
19
----------------------------------------------------------------------------------
20
 
21
 
22
library IEEE;
23
use IEEE.STD_LOGIC_1164.ALL;
24
 
25
-- Uncomment the following library declaration if using
26
-- arithmetic functions with Signed or Unsigned values
27
--use IEEE.NUMERIC_STD.ALL;
28
 
29
-- Uncomment the following library declaration if instantiating
30
-- any Xilinx leaf cells in this code.
31
--library UNISIM;
32
--use UNISIM.VComponents.all;
33
 
34
entity Am25139 is
35
    Port ( nG1 : in STD_LOGIC;
36
           B1 : in STD_LOGIC;
37
           A1 : in STD_LOGIC;
38
           nY1 : out STD_LOGIC_VECTOR (3 downto 0);
39
           nG2 : in STD_LOGIC;
40
           B2 : in STD_LOGIC;
41
           A2 : in STD_LOGIC;
42
           nY2 : out STD_LOGIC_VECTOR (3 downto 0));
43
end Am25139;
44
 
45
architecture Behavioral of Am25139 is
46
 
47
signal sel1, sel2: std_logic_vector(1 downto 0);
48
 
49
begin
50
 
51
sel1 <= B1 & A1;
52
sel2 <= B2 & A2;
53
 
54
decoder1: process(nG1, sel1)
55
begin
56
    if (nG1 = '0') then
57
        case sel1 is
58
            when "00" =>
59
                nY1 <= "1110"; -- 0
60
            when "01" =>
61
                nY1 <= "1101"; -- 1
62
            when "10" =>
63
                nY1 <= "1011"; -- 2
64
            when "11" =>
65
                nY1 <= "0111"; -- 3
66
            when others =>
67
                                        null;
68
        end case;
69
    else
70
        nY1 <= "1111";
71
    end if;
72
end process;
73
 
74
decoder2: process(nG2, sel2)
75
begin
76
    if (nG2 = '0') then
77
        case sel2 is
78
            when "00" =>
79
                nY2 <= "1110"; -- 0
80
            when "01" =>
81
                nY2 <= "1101"; -- 1
82
            when "10" =>
83
                nY2 <= "1011"; -- 2
84
            when "11" =>
85
                nY2 <= "0111"; -- 3
86
            when others =>
87
                                        null;
88
        end case;
89
    else
90
        nY2 <= "1111";
91
    end if;
92
end process;
93
 
94
end Behavioral;

powered by: WebSVN 2.1.0

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