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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [designs/] [leon3mp/] [ahbrom.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
 
2
----------------------------------------------------------------------------
3
--  This file is a part of the GRLIB VHDL IP LIBRARY
4
--  Copyright (C) 2004 GAISLER RESEARCH
5
--
6
--  This program is free software; you can redistribute it and/or modify
7
--  it under the terms of the GNU General Public License as published by
8
--  the Free Software Foundation; either version 2 of the License, or
9
--  (at your option) any later version.
10
--
11
--  See the file COPYING for the full details of the license.
12
--
13
-----------------------------------------------------------------------------
14
-- Entity:      ahbrom
15
-- File:        ahbrom.vhd
16
-- Author:      Jiri Gaisler - Gaisler Research
17
-- Description: AHB rom. 0/1-waitstate read
18
------------------------------------------------------------------------------
19
library ieee;
20
use ieee.std_logic_1164.all;
21
library grlib;
22
use grlib.amba.all;
23
use grlib.stdlib.all;
24
use grlib.devices.all;
25
 
26
entity ahbrom is
27
  generic (
28
    hindex  : integer := 0;
29
    haddr   : integer := 0;
30
    hmask   : integer := 16#fff#;
31
    pipe    : integer := 0;
32
    tech    : integer := 0;
33
    kbytes  : integer := 1);
34
  port (
35
    rst     : in  std_ulogic;
36
    clk     : in  std_ulogic;
37
    ahbsi   : in  ahb_slv_in_type;
38
    ahbso   : out ahb_slv_out_type
39
  );
40
end;
41
 
42
architecture rtl of ahbrom is
43
constant abits : integer := 10;
44
constant bytes : integer := 560;
45
 
46
constant hconfig : ahb_config_type := (
47
 
48
  4 => ahb_membar(haddr, '1', '1', hmask), others => zero32);
49
 
50
signal romdata : std_logic_vector(31 downto 0);
51
signal addr : std_logic_vector(abits-1 downto 2);
52
signal hsel, hready : std_ulogic;
53
 
54
begin
55
 
56
  ahbso.hresp   <= "00";
57
  ahbso.hsplit  <= (others => '0');
58
  ahbso.hirq    <= (others => '0');
59
  ahbso.hcache  <= '1';
60
  ahbso.hconfig <= hconfig;
61
  ahbso.hindex  <= hindex;
62
 
63
  reg : process (clk)
64
  begin
65
    if rising_edge(clk) then
66
      addr <= ahbsi.haddr(abits-1 downto 2);
67
    end if;
68
  end process;
69
 
70
  p0 : if pipe = 0 generate
71
    ahbso.hrdata  <= romdata;
72
    ahbso.hready  <= '1';
73
  end generate;
74
 
75
  p1 : if pipe = 1 generate
76
    reg2 : process (clk)
77
    begin
78
      if rising_edge(clk) then
79
        hsel <= ahbsi.hsel(hindex) and ahbsi.htrans(1);
80
        hready <= ahbsi.hready;
81
        ahbso.hready <=  (not rst) or (hsel and hready) or
82
          (ahbsi.hsel(hindex) and not ahbsi.htrans(1) and ahbsi.hready);
83
        ahbso.hrdata  <= romdata;
84
      end if;
85
    end process;
86
  end generate;
87
 
88
  comb : process (addr)
89
  begin
90
    case conv_integer(addr) is
91
    when 16#00000# => romdata <= X"81D82000";
92
    when 16#00001# => romdata <= X"03000004";
93
    when 16#00002# => romdata <= X"821060E0";
94
    when 16#00003# => romdata <= X"81884000";
95
    when 16#00004# => romdata <= X"81900000";
96
    when 16#00005# => romdata <= X"81980000";
97
    when 16#00006# => romdata <= X"81800000";
98
    when 16#00007# => romdata <= X"A1800000";
99
    when 16#00008# => romdata <= X"01000000";
100
    when 16#00009# => romdata <= X"03002040";
101
    when 16#0000A# => romdata <= X"8210600F";
102
    when 16#0000B# => romdata <= X"C2A00040";
103
    when 16#0000C# => romdata <= X"84100000";
104
    when 16#0000D# => romdata <= X"01000000";
105
    when 16#0000E# => romdata <= X"01000000";
106
    when 16#0000F# => romdata <= X"01000000";
107
    when 16#00010# => romdata <= X"01000000";
108
    when 16#00011# => romdata <= X"01000000";
109
    when 16#00012# => romdata <= X"80108002";
110
    when 16#00013# => romdata <= X"01000000";
111
    when 16#00014# => romdata <= X"01000000";
112
    when 16#00015# => romdata <= X"01000000";
113
    when 16#00016# => romdata <= X"01000000";
114
    when 16#00017# => romdata <= X"01000000";
115
    when 16#00018# => romdata <= X"87444000";
116
    when 16#00019# => romdata <= X"8608E01F";
117
    when 16#0001A# => romdata <= X"88100000";
118
    when 16#0001B# => romdata <= X"8A100000";
119
    when 16#0001C# => romdata <= X"8C100000";
120
    when 16#0001D# => romdata <= X"8E100000";
121
    when 16#0001E# => romdata <= X"A0100000";
122
    when 16#0001F# => romdata <= X"A2100000";
123
    when 16#00020# => romdata <= X"A4100000";
124
    when 16#00021# => romdata <= X"A6100000";
125
    when 16#00022# => romdata <= X"A8100000";
126
    when 16#00023# => romdata <= X"AA100000";
127
    when 16#00024# => romdata <= X"AC100000";
128
    when 16#00025# => romdata <= X"AE100000";
129
    when 16#00026# => romdata <= X"90100000";
130
    when 16#00027# => romdata <= X"92100000";
131
    when 16#00028# => romdata <= X"94100000";
132
    when 16#00029# => romdata <= X"96100000";
133
    when 16#0002A# => romdata <= X"98100000";
134
    when 16#0002B# => romdata <= X"9A100000";
135
    when 16#0002C# => romdata <= X"9C100000";
136
    when 16#0002D# => romdata <= X"9E100000";
137
    when 16#0002E# => romdata <= X"86A0E001";
138
    when 16#0002F# => romdata <= X"16BFFFEF";
139
    when 16#00030# => romdata <= X"81E00000";
140
    when 16#00031# => romdata <= X"82102002";
141
    when 16#00032# => romdata <= X"81904000";
142
    when 16#00033# => romdata <= X"03000004";
143
    when 16#00034# => romdata <= X"821060E0";
144
    when 16#00035# => romdata <= X"81884000";
145
    when 16#00036# => romdata <= X"01000000";
146
    when 16#00037# => romdata <= X"01000000";
147
    when 16#00038# => romdata <= X"01000000";
148
    when 16#00039# => romdata <= X"83480000";
149
    when 16#0003A# => romdata <= X"8330600C";
150
    when 16#0003B# => romdata <= X"80886001";
151
    when 16#0003C# => romdata <= X"02800024";
152
    when 16#0003D# => romdata <= X"01000000";
153
    when 16#0003E# => romdata <= X"07000000";
154
    when 16#0003F# => romdata <= X"8610E178";
155
    when 16#00040# => romdata <= X"C108C000";
156
    when 16#00041# => romdata <= X"C118C000";
157
    when 16#00042# => romdata <= X"C518C000";
158
    when 16#00043# => romdata <= X"C918C000";
159
    when 16#00044# => romdata <= X"CD18C000";
160
    when 16#00045# => romdata <= X"D118C000";
161
    when 16#00046# => romdata <= X"D518C000";
162
    when 16#00047# => romdata <= X"D918C000";
163
    when 16#00048# => romdata <= X"DD18C000";
164
    when 16#00049# => romdata <= X"E118C000";
165
    when 16#0004A# => romdata <= X"E518C000";
166
    when 16#0004B# => romdata <= X"E918C000";
167
    when 16#0004C# => romdata <= X"ED18C000";
168
    when 16#0004D# => romdata <= X"F118C000";
169
    when 16#0004E# => romdata <= X"F518C000";
170
    when 16#0004F# => romdata <= X"F918C000";
171
    when 16#00050# => romdata <= X"FD18C000";
172
    when 16#00051# => romdata <= X"01000000";
173
    when 16#00052# => romdata <= X"01000000";
174
    when 16#00053# => romdata <= X"01000000";
175
    when 16#00054# => romdata <= X"01000000";
176
    when 16#00055# => romdata <= X"01000000";
177
    when 16#00056# => romdata <= X"89A00842";
178
    when 16#00057# => romdata <= X"01000000";
179
    when 16#00058# => romdata <= X"01000000";
180
    when 16#00059# => romdata <= X"01000000";
181
    when 16#0005A# => romdata <= X"01000000";
182
    when 16#0005B# => romdata <= X"10800005";
183
    when 16#0005C# => romdata <= X"01000000";
184
    when 16#0005D# => romdata <= X"01000000";
185
    when 16#0005E# => romdata <= X"00000000";
186
    when 16#0005F# => romdata <= X"00000000";
187
    when 16#00060# => romdata <= X"87444000";
188
    when 16#00061# => romdata <= X"8730E01C";
189
    when 16#00062# => romdata <= X"8688E00F";
190
    when 16#00063# => romdata <= X"12800016";
191
    when 16#00064# => romdata <= X"03200000";
192
    when 16#00065# => romdata <= X"05040E00";
193
    when 16#00066# => romdata <= X"8410A233";
194
    when 16#00067# => romdata <= X"C4204000";
195
    when 16#00068# => romdata <= X"0539A89B";
196
    when 16#00069# => romdata <= X"8410A260";
197
    when 16#0006A# => romdata <= X"C4206004";
198
    when 16#0006B# => romdata <= X"050003FC";
199
    when 16#0006C# => romdata <= X"C4206008";
200
    when 16#0006D# => romdata <= X"82103860";
201
    when 16#0006E# => romdata <= X"C4004000";
202
    when 16#0006F# => romdata <= X"8530A00C";
203
    when 16#00070# => romdata <= X"03000004";
204
    when 16#00071# => romdata <= X"82106009";
205
    when 16#00072# => romdata <= X"80A04002";
206
    when 16#00073# => romdata <= X"12800006";
207
    when 16#00074# => romdata <= X"033FFC00";
208
    when 16#00075# => romdata <= X"82106100";
209
    when 16#00076# => romdata <= X"0539A81B";
210
    when 16#00077# => romdata <= X"8410A260";
211
    when 16#00078# => romdata <= X"C4204000";
212
    when 16#00079# => romdata <= X"05000080";
213
    when 16#0007A# => romdata <= X"82100000";
214
    when 16#0007B# => romdata <= X"80A0E000";
215
    when 16#0007C# => romdata <= X"02800005";
216
    when 16#0007D# => romdata <= X"01000000";
217
    when 16#0007E# => romdata <= X"82004002";
218
    when 16#0007F# => romdata <= X"10BFFFFC";
219
    when 16#00080# => romdata <= X"8620E001";
220
    when 16#00081# => romdata <= X"3D1003FF";
221
    when 16#00082# => romdata <= X"BC17A3E0";
222
    when 16#00083# => romdata <= X"BC278001";
223
    when 16#00084# => romdata <= X"9C27A060";
224
    when 16#00085# => romdata <= X"03100000";
225
    when 16#00086# => romdata <= X"81C04000";
226
    when 16#00087# => romdata <= X"01000000";
227
    when 16#00088# => romdata <= X"00000000";
228
    when 16#00089# => romdata <= X"00000000";
229
    when 16#0008A# => romdata <= X"00000000";
230
    when 16#0008B# => romdata <= X"00000000";
231
    when 16#0008C# => romdata <= X"00000000";
232
    when others => romdata <= (others => '-');
233
    end case;
234
  end process;
235
  -- pragma translate_off
236
  bootmsg : report_version
237
  generic map ("ahbrom" & tost(hindex) &
238
  ": 32-bit AHB ROM Module,  " & tost(bytes/4) & " words, " & tost(abits-2) & " address bits" );
239
  -- pragma translate_on
240
  end;

powered by: WebSVN 2.1.0

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