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

Subversion Repositories yavga

[/] [yavga/] [trunk/] [vhdl/] [waveform_RAM.vhd] - Blame information for rev 3

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

Line No. Rev Author Line
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
library IEEE;
51
use IEEE.STD_LOGIC_1164.all;
52
use IEEE.STD_LOGIC_ARITH.all;
53
use IEEE.STD_LOGIC_UNSIGNED.all;
54
 
55
--  Uncomment the following lines to use the declarations that are
56
--  provided for instantiating Xilinx primitive components.
57
library UNISIM;
58
use UNISIM.VComponents.all;
59
 
60
entity waveform_RAM is
61
  port (
62
    i_DIA    : in  std_logic_vector(15 downto 0);  -- 16-bit Data Input
63
    -- i_DIPA   : in std_logic;                       -- 2-bit parity Input
64
    -- i_ENA    : in std_logic;                       -- RAM Enable Input
65
    i_WEA    : in  std_logic;                      -- Write Enable Input
66
    -- i_SSRA   : in std_logic;                       -- Synchronous Set/Reset Input
67
    i_clockA : in  std_logic;                      -- Clock
68
    i_ADDRA  : in  std_logic_vector(9 downto 0);   -- 10-bit Address Input
69
    --o_DOA     : out std_logic_vector(15 downto 0);  -- 16-bit Data Output
70
    -- o_DOPA   : out std_logic                       -- 2-bit parity Output
71
    --
72
    i_DIB    : in  std_logic_vector(15 downto 0);  -- 16-bit Data Input
73
    -- i_DIPB   : in std_logic;                       -- 2-bit parity Input
74
    -- i_ENB    : in std_logic;                       -- RAM Enable Input
75
    i_WEB    : in  std_logic;                      -- Write Enable Input
76
    -- i_SSRB   : in std_logic;                       -- Synchronous Set/Reset Input
77
    i_clockB : in  std_logic;                      -- Clock
78
    i_ADDRB  : in  std_logic_vector(9 downto 0);   -- 10-bit Address Input
79
    o_DOB    : out std_logic_vector(15 downto 0)   -- 16-bit Data Output
80
    -- o_DOPB   : out std_logic                       -- 2-bit parity Output
81
    );
82
end waveform_RAM;
83
 
84
architecture rtl of waveform_RAM is
85
 
86
begin
87
  -- wave form or video-line memory
88
  -- |------| |-------------------------------------------|
89
  -- | P  P | |  D  D  D |  D  D  D | D D D D D D D D D D |
90
  -- |======| |===========================================|
91
  -- |17 16 | | 15 14 13 | 12 11 10 | 9 8 7 6 5 4 3 2 1 0 |
92
  -- |======| |===========================================|
93
  -- | Free | |  Reserv. |  R  G  B |      vert. pos.     |
94
  -- |------| |-------------------------------------------|
95
  --
96
 
97
  Inst_waveform_RAM : RAMB16_S18_S18
98
    generic map (
99
      WRITE_MODE_A => "READ_FIRST",     -- "WRITE_FIRST";
100
      INIT_A       => B"000000000000000000",
101
      SRVAL_A      => B"000000000000000000",
102
      --                
103
      WRITE_MODE_B => "READ_FIRST",     -- "WRITE_FIRST";
104
      INIT_B       => B"000000000000000000",
105
      SRVAL_B      => B"000000000000000000",
106
      --
107
      --INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000",
108
      INIT_00      => X"112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C",
109
      INIT_01      => X"112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D",
110
      INIT_02      => X"112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E",
111
      INIT_03      => X"112F112F112F112F112F112F112F112F112F112F112F112F112F112F112F112F",
112
      INIT_04      => X"112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E",
113
      INIT_05      => X"112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D",
114
      INIT_06      => X"112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C",
115
      INIT_07      => X"112B112B112B112B112B112B112B112B112B112B112B112B112B112B112B112B",
116
 
117
      --INIT_08 => X"112A112A112A112A112A112A112A112A112A112A112A112A112A112A112A112A",
118
      INIT_08 => X"112A114011C211F4117C10FA110E112A112A112A112A112A112A112A112A192A",
119
 
120
      --INIT_09 => X"1129112911291129112911291129112911291129112911291129112911291129",
121
      INIT_09 => X"1129112911291129112911291129112911291129112911291129112911291529",
122
 
123
      INIT_0A  => X"1128112811281128112811281128112811281128112811281128112811281128",
124
      INIT_0B  => X"1127112711271127112711271127112711271127112711271127112711271127",
125
      INIT_0C  => X"1126112611261126112611261126112611261126112611261126112611261126",
126
      INIT_0D  => X"1125112511251125112511251125112511251125112511251125112511251125",
127
      INIT_0E  => X"1124112411241124112411241124112411241124112411241124112411241124",
128
      INIT_0F  => X"1123112311231123112311231123112311231123112311231123112311231123",
129
      --
130
      INIT_10  => X"1123112311231123112311231123112311231123112311231123112311231123",
131
      INIT_11  => X"1124112411241124112411241124112411241124112411241124112411241124",
132
      INIT_12  => X"1125112511251125112511251125112511251125112511251125112511251125",
133
      INIT_13  => X"1126112611261126112611261126112611261126112611261126112611261126",
134
      INIT_14  => X"1127112711271127112711271127112711271127112711271127112711271127",
135
      INIT_15  => X"1128112811281128112811281128112811281128112811281128112811281128",
136
      INIT_16  => X"1129112911291129112911291129112911291129112911291129112911291129",
137
      INIT_17  => X"112A112A112A112A112A112A112A112A112A112A112A112A112A112A112A112A",
138
      INIT_18  => X"112B112B112B112B112B112B112B112B112B112B112B112B112B112B112B112B",
139
      INIT_19  => X"112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C",
140
      INIT_1A  => X"112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D",
141
      INIT_1B  => X"112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E",
142
      INIT_1C  => X"112F112F112F112F112F112F112F112F112F112F112F112F112F112F112F112F",
143
      INIT_1D  => X"112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E",
144
      INIT_1E  => X"112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D",
145
      INIT_1F  => X"112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C",
146
      --
147
      INIT_20  => X"112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C",
148
      INIT_21  => X"112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D",
149
      INIT_22  => X"112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E",
150
      INIT_23  => X"112F112F112F112F112F112F112F112F112F112F112F112F112F112F112F112F",
151
      INIT_24  => X"112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E",
152
      INIT_25  => X"112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D",
153
      INIT_26  => X"112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C",
154
      INIT_27  => X"112B112B112B112B112B112B112B112B112B112B112B112B112B112B112B112B",
155
      INIT_28  => X"112A112A112A112A112A112A112A112A112A112A112A112A112A112A112A112A",
156
      INIT_29  => X"1129112911291129112911291129112911291129112911291129112911291129",
157
      INIT_2A  => X"1128112811281128112811281128112811281128112811281128112811281128",
158
      INIT_2B  => X"1127112711271127112711271127112711271127112711271127112711271127",
159
      INIT_2C  => X"1126112611261126112611261126112611261126112611261126112611261126",
160
      INIT_2D  => X"1125112511251125112511251125112511251125112511251125112511251125",
161
      INIT_2E  => X"1124112411241124112411241124112411241124112411241124112411241124",
162
      INIT_2F  => X"1123112311231123112311231123112311231123112311231123112311231123",
163
      --
164
      INIT_30  => X"1123112311231123112311231123112311231123112311231123112311231123",
165
      INIT_31  => X"1124112411241124112411241124112411241124112411241124112411241124",
166
      INIT_32  => X"1125112511251125112511251125112511251125112511251125112511251125",
167
      INIT_33  => X"1126112611261126112611261126112611261126112611261126112611261126",
168
      INIT_34  => X"1127112711271127112711271127112711271127112711271127112711271127",
169
      INIT_35  => X"1128112811281128112811281128112811281128112811281128112811281128",
170
      INIT_36  => X"1129112911291129112911291129112911291129112911291129112911291129",
171
      INIT_37  => X"112A112A112A112A112A112A112A112A112A112A112A112A112A112A112A112A",
172
      INIT_38  => X"112B112B112B112B112B112B112B112B112B112B112B112B112B112B112B112B",
173
      INIT_39  => X"112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C",
174
      INIT_3A  => X"112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D",
175
      INIT_3B  => X"112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E",
176
      INIT_3C  => X"112F112F112F112F112F112F112F112F112F112F112F112F112F112F112F112F",
177
      INIT_3D  => X"112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E112E",
178
      INIT_3E  => X"112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D112D",
179
      INIT_3F  => X"112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C112C",
180
      --
181
      INITP_00 => X"0000000000000000000000000000000000000000000000000000000000000000",
182
      INITP_01 => X"0000000000000000000000000000000000000000000000000000000000000000",
183
      INITP_02 => X"0000000000000000000000000000000000000000000000000000000000000000",
184
      INITP_03 => X"0000000000000000000000000000000000000000000000000000000000000000",
185
      INITP_04 => X"0000000000000000000000000000000000000000000000000000000000000000",
186
      INITP_05 => X"0000000000000000000000000000000000000000000000000000000000000000",
187
      INITP_06 => X"0000000000000000000000000000000000000000000000000000000000000000",
188
      INITP_07 => X"0000000000000000000000000000000000000000000000000000000000000000"
189
      )
190
    port map(
191
      DIA   => i_DIA,                   -- 16 bit data Input
192
      DIPA  => (others => '1'),         -- 2 bit data parity Input
193
      ENA   => '1',                     -- 1-bit RAM enable Input
194
      WEA   => i_WEA,                   -- 1-bit Write Enable Input
195
      SSRA  => '0',                     -- 1-bit Synchronous Set/Reset Input
196
      CLKA  => i_clockA,                -- 1-bit Clock Input
197
      ADDRA => i_ADDRA,                 -- 10-bit Address Input
198
      DOA   => open,  -- o_DOA,      -- 16-bit Data Output
199
      DOPA  => open,                    -- 2-bit Data Parity Output
200
      --
201
      DIB   => i_DIB,                   -- 16 bit data Input
202
      DIPB  => (others => '1'),         -- 2 bit data parity Input
203
      ENB   => '1',                     -- 1-bit RAM enable Input
204
      WEB   => i_WEB,                   -- 1-bit Write Enable Input
205
      SSRB  => '0',                     -- 1-bit Synchronous Set/Reset Input
206
      CLKB  => i_clockB,                -- 1-bit Clock Input
207
      ADDRB => i_ADDRB,                 -- 10-bit Address Input
208
      DOB   => o_DOB,                   -- 16-bit Data Output
209
      DOPB  => open                     -- 2-bit Data Parity Output
210
      );
211
 
212
end rtl;

powered by: WebSVN 2.1.0

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