1 |
2 |
sandroamt |
--------------------------------------------------------------------------------
|
2 |
|
|
---- ----
|
3 |
|
|
---- This file is part of the yaVGA project ----
|
4 |
|
|
---- http://www.opencores.org/?do=project&who=yavga ----
|
5 |
|
|
---- ----
|
6 |
|
|
---- Description ----
|
7 |
|
|
---- Implementation of yaVGA IP core ----
|
8 |
|
|
---- ----
|
9 |
|
|
---- To Do: ----
|
10 |
|
|
---- ----
|
11 |
|
|
---- ----
|
12 |
|
|
---- Author(s): ----
|
13 |
|
|
---- Sandro Amato, sdroamt@netscape.net ----
|
14 |
|
|
---- ----
|
15 |
|
|
--------------------------------------------------------------------------------
|
16 |
|
|
---- ----
|
17 |
|
|
---- Copyright (c) 2009, Sandro Amato ----
|
18 |
|
|
---- All rights reserved. ----
|
19 |
|
|
---- ----
|
20 |
|
|
---- Redistribution and use in source and binary forms, with or without ----
|
21 |
|
|
---- modification, are permitted provided that the following conditions ----
|
22 |
|
|
---- are met: ----
|
23 |
|
|
---- ----
|
24 |
|
|
---- * Redistributions of source code must retain the above ----
|
25 |
|
|
---- copyright notice, this list of conditions and the ----
|
26 |
|
|
---- following disclaimer. ----
|
27 |
|
|
---- * Redistributions in binary form must reproduce the above ----
|
28 |
|
|
---- copyright notice, this list of conditions and the ----
|
29 |
|
|
---- following disclaimer in the documentation and/or other ----
|
30 |
|
|
---- materials provided with the distribution. ----
|
31 |
|
|
---- * Neither the name of SANDRO AMATO nor the names of its ----
|
32 |
|
|
---- contributors may be used to endorse or promote products ----
|
33 |
|
|
---- derived from this software without specific prior written ----
|
34 |
|
|
---- permission. ----
|
35 |
|
|
---- ----
|
36 |
|
|
---- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ----
|
37 |
|
|
---- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ----
|
38 |
|
|
---- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ----
|
39 |
|
|
---- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ----
|
40 |
|
|
---- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ----
|
41 |
|
|
---- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ----
|
42 |
|
|
---- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ----
|
43 |
|
|
---- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ----
|
44 |
|
|
---- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ----
|
45 |
|
|
---- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ----
|
46 |
|
|
---- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ----
|
47 |
|
|
---- POSSIBILITY OF SUCH DAMAGE. ----
|
48 |
|
|
--------------------------------------------------------------------------------
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
library IEEE;
|
52 |
|
|
use IEEE.STD_LOGIC_1164.all;
|
53 |
|
|
use IEEE.STD_LOGIC_ARITH.all;
|
54 |
|
|
use IEEE.STD_LOGIC_UNSIGNED.all;
|
55 |
|
|
|
56 |
|
|
-- Uncomment the following lines to use the declarations that are
|
57 |
|
|
-- provided for instantiating Xilinx primitive components.
|
58 |
|
|
library UNISIM;
|
59 |
|
|
use UNISIM.VComponents.all;
|
60 |
|
|
|
61 |
|
|
entity charmaps_ROM is
|
62 |
|
|
port (
|
63 |
|
|
-- i_DI : in std_logic_vector(7 downto 0); -- 8-bit Data Input
|
64 |
|
|
-- i_DIP : in std_logic; -- 1-bit parity Input
|
65 |
|
|
-- i_EN : in std_logic; -- RAM Enable Input
|
66 |
|
|
-- i_WE : in std_logic; -- Write Enable Input
|
67 |
|
|
-- i_SSR : in std_logic; -- Synchronous Set/Reset Input
|
68 |
|
|
i_clock : in std_logic; -- Clock
|
69 |
|
|
i_ADDR : in std_logic_vector(10 downto 0); -- 11-bit Address Input
|
70 |
|
|
o_DO : out std_logic_vector(7 downto 0) -- 8-bit Data Output
|
71 |
|
|
-- o_DOP : out std_logic -- 1-bit parity Output
|
72 |
|
|
);
|
73 |
|
|
end charmaps_ROM;
|
74 |
|
|
|
75 |
|
|
architecture rtl of charmaps_ROM is
|
76 |
|
|
|
77 |
|
|
begin
|
78 |
|
|
-- charmaps
|
79 |
|
|
-- |------| |-----------------|
|
80 |
|
|
-- | P | | D D D D D D D D |
|
81 |
|
|
-- |======| |=================|
|
82 |
|
|
-- | 8 | | 7 6 5 4 3 2 1 0 |
|
83 |
|
|
-- |======| |=================|
|
84 |
|
|
-- | Free | | Row char pixels |
|
85 |
|
|
-- |------| |-----------------|
|
86 |
|
|
|
87 |
|
|
Inst_charmaps_rom : RAMB16_S9
|
88 |
|
|
generic map (
|
89 |
|
|
write_mode => "NO_CHANGE", -- WRITE_FIRST, READ_FIRST or NO_CHANGE
|
90 |
|
|
INIT => B"000000000", -- Value of output RAM registers at startup
|
91 |
|
|
SRVAL => B"000000000", -- Ouput value upon SSR assertion
|
92 |
|
|
--
|
93 |
|
|
-- START REPLACE HERE THE OUTPUT FROM convert.sh
|
94 |
|
|
-- INIT_00 => ...
|
95 |
|
|
-- ...
|
96 |
|
|
-- ...
|
97 |
|
|
-- ...
|
98 |
|
|
-- INIT_3F => ...
|
99 |
|
|
-- STOP REPLACE
|
100 |
|
|
--
|
101 |
|
|
--
|
102 |
|
|
INITP_00 => X"0000000000000000000000000000000000000000000000000000000000000000", -- free
|
103 |
|
|
INITP_01 => X"0000000000000000000000000000000000000000000000000000000000000000",
|
104 |
|
|
INITP_02 => X"0000000000000000000000000000000000000000000000000000000000000000",
|
105 |
|
|
INITP_03 => X"0000000000000000000000000000000000000000000000000000000000000000",
|
106 |
|
|
INITP_04 => X"0000000000000000000000000000000000000000000000000000000000000000",
|
107 |
|
|
INITP_05 => X"0000000000000000000000000000000000000000000000000000000000000000",
|
108 |
|
|
INITP_06 => X"0000000000000000000000000000000000000000000000000000000000000000",
|
109 |
|
|
INITP_07 => X"0000000000000000000000000000000000000000000000000000000000000000"
|
110 |
|
|
)
|
111 |
|
|
port map(
|
112 |
|
|
DI => (others => '1'), -- 8-bit Data Input
|
113 |
|
|
DIP => (others => '1'), -- 1-bit parity Input
|
114 |
|
|
EN => '1', -- RAM Enable Input
|
115 |
|
|
WE => '0', -- Write Enable Input
|
116 |
|
|
SSR => '0', -- Synchronous Set/Reset Input
|
117 |
|
|
CLK => i_clock, -- Clock
|
118 |
|
|
ADDR => i_ADDR, -- 11-bit Address Input
|
119 |
|
|
DO => o_DO, -- 8-bit Data Output
|
120 |
|
|
DOP => open -- 1-bit parity Output
|
121 |
|
|
);
|
122 |
|
|
|
123 |
|
|
|
124 |
|
|
end rtl;
|