OpenCores
URL https://opencores.org/ocsvn/vhdl-pipeline-mips/vhdl-pipeline-mips/trunk

Subversion Repositories vhdl-pipeline-mips

[/] [vhdl-pipeline-mips/] [trunk/] [1_instruction_fetching/] [instruction_memory.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 elujan
--
2
-- Memoria de instrucción del procesador MIPS Segmentado
3
--
4
-- Licencia: Copyright 2008 Emmanuel Luján
5
--
6
--      This program is free software; you can redistribute it and/or
7
--      modify it under the terms of the GNU General Public License as
8
--      published by the Free Software Foundation; either version 2 of
9
--      the License, or (at your option) any later version. This program
10
--      is distributed in the hope that it will be useful, but WITHOUT
11
--      ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12
--      or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13
--      License for more details. You should have received a copy of the
14
--      GNU General Public License along with this program; if not, write
15
--      to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
16
--      Boston, MA 02110-1301 USA.
17
-- 
18
-- Autor:       Emmanuel Luján
19
-- Email:       info@emmanuellujan.com.ar
20
-- Versión:    1.0
21
--
22
 
23
library std;
24
use std.textio.all;
25
 
26
library ieee;
27
use ieee.std_logic_1164.all;
28
use ieee.numeric_std.all;
29
 
30
library work;
31
use work.segm_mips_const_pkg.all;
32
 
33
entity INSTRUCTION_MEMORY is
34
        port(
35
                        RESET           : in    STD_LOGIC;                                      -- Reset asincrónico   
36
                        READ_ADDR       : in    STD_LOGIC_VECTOR (INST_SIZE-1 downto 0); -- Dirección de la instrucción a leer
37
                        INST            : out   STD_LOGIC_VECTOR (INST_SIZE-1 downto 0)          -- Instrucción leída
38
        );
39
end INSTRUCTION_MEMORY;
40
 
41
 
42
architecture INSTRUCTION_MEMORY_ARC of INSTRUCTION_MEMORY is
43
 
44
begin
45
 
46
        --Entrego la instrucción almacenada en la dir. dada de forma asincrónica
47
        process (READ_ADDR)
48
        begin
49
 
50
                case READ_ADDR is
51
                        when "00000000000000000000000000000000" =>
52
                                INST <= "00000001010000000010000000100000";
53
                        when "00000000000000000000000000000100" =>
54
                                INST <= "00000000000000000000000000100010";
55
                        when "00000000000000000000000000001000" =>
56
                                INST <= "00000000000000000000000000100010";
57
                        when "00000000000000000000000000001100" =>
58
                                INST <= "00000000000000000000000000100010";
59
                        when "00000000000000000000000000010000" =>
60
                                INST <= "00000000000000000000000000100010";
61
                        when "00000000000000000000000000010100" =>
62
                                INST <= "00000000100000000001100000100000";
63
                        when "00000000000000000000000000011000" =>
64
                                INST <= "00000000000000000000000000100010";
65
                        when "00000000000000000000000000011100" =>
66
                                INST <= "00000000000000000000000000100010";
67
                        when "00000000000000000000000000100000" =>
68
                                INST <= "00000000000000000000000000100010";
69
                        when "00000000000000000000000000100100" =>
70
                                INST <= "00000000000000000000000000100010";
71
                        when "00000000000000000000000000101000" =>
72
                                INST <= "00000000011000110010000000100000";
73
                        when "00000000000000000000000000101100" =>
74
                                INST <= "00000000000000000000000000100010";
75
                        when "00000000000000000000000000110000" =>
76
                                INST <= "00000000000000000000000000100010";
77
                        when "00000000000000000000000000110100" =>
78
                                INST <= "00000000000000000000000000100010";
79
                        when "00000000000000000000000000111000" =>
80
                                INST <= "00000000000000000000000000100010";
81
                        when "00000000000000000000000000111100" =>
82
                                INST <= "00000000100010110010000000100010";
83
                        when "00000000000000000000000001000000" =>
84
                                INST <= "00000000000000000000000000100010";
85
                        when "00000000000000000000000001000100" =>
86
                                INST <= "00000000000000000000000000100010";
87
                        when "00000000000000000000000001001000" =>
88
                                INST <= "00000000000000000000000000100010";
89
                        when "00000000000000000000000001001100" =>
90
                                INST <= "00000000000000000000000000100010";
91
                        when "00000000000000000000000001010000" =>
92
                                INST <= "00000000100000000100000000101010";
93
                        when "00000000000000000000000001010100" =>
94
                                INST <= "00000000000000000000000000100010";
95
                        when "00000000000000000000000001011000" =>
96
                                INST <= "00000000000000000000000000100010";
97
                        when "00000000000000000000000001011100" =>
98
                                INST <= "00000000000000000000000000100010";
99
                        when "00000000000000000000000001100000" =>
100
                                INST <= "00000000000000000000000000100010";
101
                        when "00000000000000000000000001100100" =>
102
                                INST <= "00010001000000010000000000001000";
103
                        when "00000000000000000000000001101000" =>
104
                                INST <= "00000000000000000000000000100010";
105
                        when "00000000000000000000000001101100" =>
106
                                INST <= "00000000000000000000000000100010";
107
                        when "00000000000000000000000001110000" =>
108
                                INST <= "00000000000000000000000000100010";
109
                        when "00000000000000000000000001110100" =>
110
                                INST <= "00000001100001010110000000100101";
111
                        when "00000000000000000000000001111000" =>
112
                                INST <= "00010000000000000000000000000100";
113
                        when "00000000000000000000000001111100" =>
114
                                INST <= "00000000000000000000000000100010";
115
                        when "00000000000000000000000010000000" =>
116
                                INST <= "00000000000000000000000000100010";
117
                        when "00000000000000000000000010000100" =>
118
                                INST <= "00000000000000000000000000100010";
119
                        when "00000000000000000000000010001000" =>
120
                                INST <= "00000000011000110010000000100000";
121
                        when "00000000000000000000000010001100" =>
122
                                INST <= "00000000110000010011000000100000";
123
                        when "00000000000000000000000010010000" =>
124
                                INST <= "00000000101001010010100000100000";
125
                        when "00000000000000000000000010010100" =>
126
                                INST <= "00000000000000000000000000100010";
127
                        when "00000000000000000000000010011000" =>
128
                                INST <= "00000000000000000000000000100010";
129
                        when "00000000000000000000000010011100" =>
130
                                INST <= "00000000000000000000000000100010";
131
                        when "00000000000000000000000010100000" =>
132
                                INST <= "00000000110001110100000000101010";
133
                        when "00000000000000000000000010100100" =>
134
                                INST <= "00000000000000000000000000100010";
135
                        when "00000000000000000000000010101000" =>
136
                                INST <= "00000000000000000000000000100010";
137
                        when "00000000000000000000000010101100" =>
138
                                INST <= "00000000000000000000000000100010";
139
                        when "00000000000000000000000010110000" =>
140
                                INST <= "00000000000000000000000000100010";
141
                        when "00000000000000000000000010110100" =>
142
                                INST <= "00010001000000011111111111010111";
143
                        when others =>
144
                                INST <= "11111111111111111111111111111111";
145
                end case;
146
 
147
        end process;
148
 
149
 
150
end INSTRUCTION_MEMORY_ARC;

powered by: WebSVN 2.1.0

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