1 |
224 |
arniml |
-------------------------------------------------------------------------------
|
2 |
|
|
--
|
3 |
|
|
-- T8x49 ROM
|
4 |
|
|
-- Wrapper for ROM model from the LPM library.
|
5 |
|
|
--
|
6 |
|
|
-- $Id: t49_rom-lpm-a.vhd,v 1.1 2006-06-21 00:58:27 arniml Exp $
|
7 |
|
|
--
|
8 |
|
|
-- Copyright (c) 2006 Arnim Laeuger (arniml@opencores.org)
|
9 |
|
|
--
|
10 |
|
|
-- All rights reserved
|
11 |
|
|
--
|
12 |
|
|
-- Redistribution and use in source and synthezised forms, with or without
|
13 |
|
|
-- modification, are permitted provided that the following conditions are met:
|
14 |
|
|
--
|
15 |
|
|
-- Redistributions of source code must retain the above copyright notice,
|
16 |
|
|
-- this list of conditions and the following disclaimer.
|
17 |
|
|
--
|
18 |
|
|
-- Redistributions in synthesized form must reproduce the above copyright
|
19 |
|
|
-- notice, this list of conditions and the following disclaimer in the
|
20 |
|
|
-- documentation and/or other materials provided with the distribution.
|
21 |
|
|
--
|
22 |
|
|
-- Neither the name of the author nor the names of other contributors may
|
23 |
|
|
-- be used to endorse or promote products derived from this software without
|
24 |
|
|
-- specific prior written permission.
|
25 |
|
|
--
|
26 |
|
|
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
27 |
|
|
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
28 |
|
|
-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
29 |
|
|
-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
|
30 |
|
|
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
31 |
|
|
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
32 |
|
|
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
33 |
|
|
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
34 |
|
|
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
35 |
|
|
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
36 |
|
|
-- POSSIBILITY OF SUCH DAMAGE.
|
37 |
|
|
--
|
38 |
|
|
-- Please report bugs to the author, but before you do so, please
|
39 |
|
|
-- make sure that this is not a derivative work and that
|
40 |
|
|
-- you have the latest version of this file.
|
41 |
|
|
--
|
42 |
|
|
-- The latest version of this file can be found at:
|
43 |
|
|
-- http://www.opencores.org/cvsweb.shtml/t48/
|
44 |
|
|
--
|
45 |
|
|
-------------------------------------------------------------------------------
|
46 |
|
|
|
47 |
|
|
architecture lpm of t49_rom is
|
48 |
|
|
|
49 |
|
|
component lpm_rom
|
50 |
|
|
generic (
|
51 |
|
|
LPM_WIDTH : positive;
|
52 |
|
|
LPM_TYPE : string := "LPM_ROM";
|
53 |
|
|
LPM_WIDTHAD : positive;
|
54 |
|
|
LPM_NUMWORDS : natural := 0;
|
55 |
|
|
LPM_FILE : string;
|
56 |
|
|
LPM_ADDRESS_CONTROL : string := "REGISTERED";
|
57 |
|
|
LPM_OUTDATA : string := "REGISTERED";
|
58 |
|
|
LPM_HINT : string := "UNUSED"
|
59 |
|
|
);
|
60 |
|
|
port (
|
61 |
|
|
address : in std_logic_vector(LPM_WIDTHAD-1 downto 0);
|
62 |
|
|
inclock : in std_logic;
|
63 |
|
|
outclock : in std_logic;
|
64 |
|
|
memenab : in std_logic;
|
65 |
|
|
q : out std_logic_vector(LPM_WIDTH-1 downto 0)
|
66 |
|
|
);
|
67 |
|
|
end component;
|
68 |
|
|
|
69 |
|
|
signal vdd_s : std_logic;
|
70 |
|
|
|
71 |
|
|
begin
|
72 |
|
|
|
73 |
|
|
vdd_s <= '1';
|
74 |
|
|
|
75 |
|
|
rom_b : lpm_rom
|
76 |
|
|
generic map (
|
77 |
|
|
LPM_WIDTH => 8,
|
78 |
|
|
LPM_TYPE => "LPM_ROM",
|
79 |
|
|
LPM_WIDTHAD => 11,
|
80 |
|
|
LPM_NUMWORDS => 2 ** 11,
|
81 |
|
|
LPM_FILE => "rom_t49.hex",
|
82 |
|
|
LPM_ADDRESS_CONTROL => "REGISTERED",
|
83 |
|
|
LPM_OUTDATA => "UNREGISTERED",
|
84 |
|
|
LPM_HINT => "UNUSED"
|
85 |
|
|
)
|
86 |
|
|
port map (
|
87 |
|
|
address => rom_addr_i,
|
88 |
|
|
inclock => clk_i,
|
89 |
|
|
outclock => clk_i,
|
90 |
|
|
memenab => vdd_s,
|
91 |
|
|
q => rom_data_o
|
92 |
|
|
);
|
93 |
|
|
|
94 |
|
|
end lpm;
|
95 |
|
|
|
96 |
|
|
|
97 |
|
|
-------------------------------------------------------------------------------
|
98 |
|
|
-- File History:
|
99 |
|
|
--
|
100 |
|
|
-- $Log: not supported by cvs2svn $
|
101 |
|
|
-------------------------------------------------------------------------------
|