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/] [Am29XX/] [Am2922.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 10:32:16 PM
6
-- Design Name: 
7
-- Module Name: Am2922 - 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 Am2922 is
35
    Port ( clk : in STD_LOGIC;
36
           a : in STD_LOGIC;
37
           b : in STD_LOGIC;
38
           c : in STD_LOGIC;
39
           pol : in STD_LOGIC;
40
           nME : in STD_LOGIC;
41
           nRE : in STD_LOGIC;
42
           nCLR : in STD_LOGIC;
43
           nOE : in STD_LOGIC;
44
           d : in STD_LOGIC_VECTOR (7 downto 0);
45
           y : out STD_LOGIC);
46
end Am2922;
47
 
48
architecture Behavioral of Am2922 is
49
 
50
signal mux, muxen: std_logic;
51
signal q: std_logic_vector(3 downto 0) := "0000";
52
 
53
begin
54
 
55
muxen <= not nME;
56
mux <= not (
57
        (muxen and q(2)       and q(1)       and q(0)       and d(7)) or
58
        (muxen and q(2)       and q(1)       and (not q(0)) and d(6)) or
59
        (muxen and q(2)       and (not q(1)) and q(0)       and d(5)) or
60
        (muxen and q(2)       and (not q(1)) and (not q(0)) and d(4)) or
61
        (muxen and (not q(2)) and q(1)       and q(0)       and d(3)) or
62
        (muxen and (not q(2)) and q(1)       and (not q(0)) and d(2)) or
63
        (muxen and (not q(2)) and (not q(1)) and q(0)       and d(1)) or
64
        (muxen and (not q(2)) and (not q(1)) and (not q(0)) and d(0))
65
    );
66
y <= (q(3) xor mux) when (nOE = '0') else 'Z';
67
 
68
load_q: process(clk, a, b, c, pol, nCLR, nRE)
69
begin
70
    if (nCLR = '0') then
71
        q <= "0000";
72
    else
73
        if (rising_edge(clk) and (nRE = '0')) then
74
            q <= pol & c & b & a;
75
        end if;
76
    end if;
77
end process;
78
 
79
end Behavioral;

powered by: WebSVN 2.1.0

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