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/] [rom32x8.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/24/2017 01:49:44 PM
6
-- Design Name: 
7
-- Module Name: rom32x8 - 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 rom32x8 is
35
    Port ( nCS : in STD_LOGIC;
36
           address : in STD_LOGIC_VECTOR (3 downto 0);
37
           data : out STD_LOGIC_VECTOR (4 downto 0));
38
end rom32x8;
39
 
40
architecture Behavioral of rom32x8 is
41
 
42
signal data_int: std_logic_vector(4 downto 0);
43
 
44
begin
45
 
46
sequence: process(address)
47
begin
48
    case address is
49
        when "0000" =>
50
            data_int <= "01000"; -- C
51
        when "0001" =>
52
            data_int <= "01001"; -- R
53
        when "0010" =>
54
            data_int <= "01011"; -- D
55
        when "0011" =>
56
            data_int <= "01001"; -- R
57
        when "0100" =>
58
            data_int <= "01000"; -- C
59
        when "0101" =>
60
            data_int <= "00101"; -- SBR
61
        when "0110" =>
62
            data_int <= "01001"; -- R
63
        when "0111" =>
64
            data_int <= "00010"; -- RTN
65
        when "1000" =>
66
            data_int <= "11010"; -- F
67
        when "1001" =>
68
            data_int <= "00101"; -- SBR
69
        when "1010" =>
70
            data_int <= "00000"; -- POP
71
        when "1011" =>
72
            data_int <= "00001"; -- PR
73
        when "1100" =>
74
            data_int <= "01001"; -- R
75
        when "1101" =>
76
            data_int <= "00100"; -- PUSH
77
        when "1110" =>
78
            data_int <= "01001"; -- R
79
        when "1111" =>
80
            data_int <= "11010"; -- F
81
        when others =>
82
            data_int <= "11111";
83
    end case;
84
end process;
85
 
86
data <= data_int when (nCS = '0') else "ZZZZZ";
87
 
88
end Behavioral;

powered by: WebSVN 2.1.0

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