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

Subversion Repositories rtftextcontroller

[/] [rtftextcontroller/] [trunk/] [rtl/] [verilog/] [rfTextScreenRam.sv] - Blame information for rev 31

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

Line No. Rev Author Line
1 31 robfinch
// ============================================================================
2
//        __
3
//   \\__/ o\    (C) 2018-2022  Robert Finch, Waterloo
4
//    \  __ /    All rights reserved.
5
//     \/_//     robfinch@finitron.ca
6
//       ||
7
//
8
//
9
// BSD 3-Clause License
10
// Redistribution and use in source and binary forms, with or without
11
// modification, are permitted provided that the following conditions are met:
12
//
13
// 1. Redistributions of source code must retain the above copyright notice, this
14
//    list of conditions and the following disclaimer.
15
//
16
// 2. Redistributions in binary form must reproduce the above copyright notice,
17
//    this list of conditions and the following disclaimer in the documentation
18
//    and/or other materials provided with the distribution.
19
//
20
// 3. Neither the name of the copyright holder nor the names of its
21
//    contributors may be used to endorse or promote products derived from
22
//    this software without specific prior written permission.
23
//
24
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
//
35
// ============================================================================
36
//
37
module rfTextScreenRam(clka_i, csa_i, wea_i, sela_i, adra_i, data_i, data_o,
38
        clkb_i, csb_i, web_i, selb_i, adrb_i, datb_i, datb_o);
39
input clka_i;
40
input csa_i;
41
input wea_i;
42
input [7:0] sela_i;
43
input [15:3] adra_i;
44
input [63:0] data_i;
45
output [63:0] data_o;
46
input clkb_i;
47
input csb_i;
48
input web_i;
49
input [7:0] selb_i;
50
input [15:3] adrb_i;
51
input [63:0] datb_i;
52
output [63:0] datb_o;
53
 
54
// xpm_memory_tdpram: True Dual Port RAM
55
// Xilinx Parameterized Macro, version 2020.2
56
`ifdef VENDOR_XILINX
57
 
58
        xpm_memory_tdpram #(
59
          .ADDR_WIDTH_A(13),
60
          .ADDR_WIDTH_B(13),
61
          .AUTO_SLEEP_TIME(0),
62
          .BYTE_WRITE_WIDTH_A(8),
63
          .BYTE_WRITE_WIDTH_B(8),
64
          .CASCADE_HEIGHT(0),
65
          .CLOCKING_MODE("independent_clock"), // String
66
          .ECC_MODE("no_ecc"),            // String
67
          .MEMORY_INIT_FILE("none"),                    // String
68
          .MEMORY_INIT_PARAM("0"),        // String
69
          .MEMORY_OPTIMIZATION("true"),   // String
70
          .MEMORY_PRIMITIVE("block"),      // String
71
          .MEMORY_SIZE(524288),
72
          .MESSAGE_CONTROL(0),
73
          .READ_DATA_WIDTH_A(64),
74
          .READ_DATA_WIDTH_B(64),
75
          .READ_LATENCY_A(2),
76
          .READ_LATENCY_B(1),
77
          .READ_RESET_VALUE_A("0"),       // String
78
          .READ_RESET_VALUE_B("0"),       // String
79
          .RST_MODE_A("SYNC"),            // String
80
          .RST_MODE_B("SYNC"),            // String
81
          .SIM_ASSERT_CHK(0),             // DECIMAL; 0=disable simulation messages, 1=enable simulation messages
82
          .USE_EMBEDDED_CONSTRAINT(0),    // DECIMAL
83
          .USE_MEM_INIT(1),
84
          .WAKEUP_TIME("disable_sleep"),  // String
85
          .WRITE_DATA_WIDTH_A(64),
86
          .WRITE_DATA_WIDTH_B(64),
87
          .WRITE_MODE_A("no_change"),     // String
88
          .WRITE_MODE_B("no_change")      // String
89
        )
90
        xpm_memory_tdpram_inst (
91
          .dbiterra(),             // 1-bit output: Status signal to indicate double bit error occurrence
92
                                           // on the data output of port A.
93
 
94
          .dbiterrb(),             // 1-bit output: Status signal to indicate double bit error occurrence
95
                                           // on the data output of port A.
96
 
97
          .douta(data_o),          // READ_DATA_WIDTH_A-bit output: Data output for port A read operations.
98
          .doutb(datb_o),          // READ_DATA_WIDTH_B-bit output: Data output for port B read operations.
99
          .sbiterra(),             // 1-bit output: Status signal to indicate single bit error occurrence
100
                                           // on the data output of port A.
101
 
102
          .sbiterrb(),             // 1-bit output: Status signal to indicate single bit error occurrence
103
                                           // on the data output of port B.
104
 
105
          .addra(adra_i),                   // ADDR_WIDTH_A-bit input: Address for port A write and read operations.
106
          .addrb(adrb_i),               // ADDR_WIDTH_B-bit input: Address for port B write and read operations.
107
          .clka(clka_i),                   // 1-bit input: Clock signal for port A. Also clocks port B when
108
                                           // parameter CLOCKING_MODE is "common_clock".
109
 
110
          .clkb(clkb_i),               // 1-bit input: Clock signal for port B when parameter CLOCKING_MODE is
111
                                           // "independent_clock". Unused when parameter CLOCKING_MODE is
112
                                           // "common_clock".
113
 
114
          .dina(data_i),                     // WRITE_DATA_WIDTH_A-bit input: Data input for port A write operations.
115
          .dinb(datb_i),                  // WRITE_DATA_WIDTH_B-bit input: Data input for port B write operations.
116
          .ena(csa_i),                       // 1-bit input: Memory enable signal for port A. Must be high on clock
117
                                           // cycles when read or write operations are initiated. Pipelined
118
                                           // internally.
119
 
120
          .enb(csb_i),                       // 1-bit input: Memory enable signal for port B. Must be high on clock
121
                                           // cycles when read or write operations are initiated. Pipelined
122
                                           // internally.
123
 
124
          .injectdbiterra(1'b0), // 1-bit input: Controls double bit error injection on input data when
125
                                           // ECC enabled (Error injection capability is not available in
126
                                           // "decode_only" mode).
127
 
128
          .injectdbiterrb(1'b0), // 1-bit input: Controls double bit error injection on input data when
129
                                           // ECC enabled (Error injection capability is not available in
130
                                           // "decode_only" mode).
131
 
132
          .injectsbiterra(1'b0), // 1-bit input: Controls single bit error injection on input data when
133
                                           // ECC enabled (Error injection capability is not available in
134
                                           // "decode_only" mode).
135
 
136
          .injectsbiterrb(1'b0), // 1-bit input: Controls single bit error injection on input data when
137
                                           // ECC enabled (Error injection capability is not available in
138
                                           // "decode_only" mode).
139
 
140
          .regcea(csa_i),                 // 1-bit input: Clock Enable for the last register stage on the output
141
                                           // data path.
142
 
143
          .regceb(csb_i),                 // 1-bit input: Clock Enable for the last register stage on the output
144
                                           // data path.
145
 
146
          .rsta(1'b0),                     // 1-bit input: Reset signal for the final port A output register stage.
147
                                           // Synchronously resets output port douta to the value specified by
148
                                           // parameter READ_RESET_VALUE_A.
149
 
150
          .rstb(1'b0),                     // 1-bit input: Reset signal for the final port B output register stage.
151
                                           // Synchronously resets output port doutb to the value specified by
152
                                           // parameter READ_RESET_VALUE_B.
153
 
154
          .sleep(1'b0),                   // 1-bit input: sleep signal to enable the dynamic power saving feature.
155
          .wea({8{wea_i}} & sela_i),                                                            // WRITE_DATA_WIDTH_A/BYTE_WRITE_WIDTH_A-bit input: Write enable vector
156
                                           // for port A input data port dina. 1 bit wide when word-wide writes are
157
                                           // used. In byte-wide write configurations, each bit controls the
158
                                           // writing one byte of dina to address addra. For example, to
159
                                           // synchronously write only bits [15-8] of dina when WRITE_DATA_WIDTH_A
160
                                           // is 32, wea would be 4'b0010.
161
 
162
          .web({8{web_i}} & selb_i)        // WRITE_DATA_WIDTH_B/BYTE_WRITE_WIDTH_B-bit input: Write enable vector
163
                                           // for port B input data port dinb. 1 bit wide when word-wide writes are
164
                                           // used. In byte-wide write configurations, each bit controls the
165
                                           // writing one byte of dinb to address addrb. For example, to
166
                                           // synchronously write only bits [15-8] of dinb when WRITE_DATA_WIDTH_B
167
                                           // is 32, web would be 4'b0010.
168
 
169
        );
170
 
171
`elsif VENDOR_ALTERA
172
        always_comb
173
        begin
174
                $display("ToDo: Add ALTERA RAM support.");
175
                $finish();
176
        end
177
`else
178
        always_comb
179
        begin
180
                $display("No RAM vendor selected.");
181
                $finish();
182
        end
183
`endif
184
 
185
endmodule

powered by: WebSVN 2.1.0

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