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

Subversion Repositories ion

[/] [ion/] [trunk/] [src/] [code_rom_template.vhdl] - Blame information for rev 238

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 192 ja_rd
--------------------------------------------------------------------------------
2
-- @fileinfo@
3
--------------------------------------------------------------------------------
4
-- Synthesizable ROM implemented on regular FPGA BLock RAM MPU.
5
--
6
-- Meant to be used as bootstrap code ROM in project ION, hence the fixed
7
-- entity name.
8
--
9
-- This package provides constants and types that will be used wherever the code
10
-- BRAM is implemented, presumably in the mips_mpu module (see that module for
11
-- an usage example).
12
--
13
-- Note that no vendor-specific stuff needs to be used at all to infer the
14
-- read-only, single port BRAM we're interested in.
15
--------------------------------------------------------------------------------
16
-- Copyright (C) 2011 Jose A. Ruiz
17
--                                                              
18
-- This source file may be used and distributed without         
19
-- restriction provided that this copyright statement is not    
20
-- removed from the file and that any derivative work contains  
21
-- the original copyright notice and the associated disclaimer. 
22
--                                                              
23
-- This source file is free software; you can redistribute it   
24
-- and/or modify it under the terms of the GNU Lesser General   
25
-- Public License as published by the Free Software Foundation; 
26
-- either version 2.1 of the License, or (at your option) any   
27
-- later version.                                               
28
--                                                              
29
-- This source is distributed in the hope that it will be       
30
-- useful, but WITHOUT ANY WARRANTY; without even the implied   
31
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      
32
-- PURPOSE.  See the GNU Lesser General Public License for more 
33
-- details.                                                     
34
--                                                              
35
-- You should have received a copy of the GNU Lesser General    
36
-- Public License along with this source; if not, download it   
37
-- from http://www.opencores.org/lgpl.shtml
38
--------------------------------------------------------------------------------
39
 
40
library ieee;
41
use ieee.std_logic_1164.all;
42
use ieee.std_logic_arith.all;
43
use ieee.std_logic_unsigned.all;
44
use work.mips_pkg.all;
45
 
46
package code_rom_pkg is
47
 
48
-- BRAM table and address word sizes...
49
constant CODE_BRAM_SIZE : integer := @code_table_size@;
50
constant CODE_BRAM_ADDR_SIZE : integer := log2(CODE_BRAM_SIZE);
51
subtype t_bram_address is std_logic_vector(CODE_BRAM_ADDR_SIZE-1 downto 0);
52
-- ...and the type of the actual table that will hold the data.
53
type t_bram is array(0 to (CODE_BRAM_SIZE)-1) of t_word;
54
 
55
-- This constant defines the contents of the BRAM.
56
constant code_bram :                  t_bram := (@code-32bit@);
57
 
58
end package;

powered by: WebSVN 2.1.0

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