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

Subversion Repositories rtftextcontroller

[/] [rtftextcontroller/] [trunk/] [rtl/] [verilog/] [regReadbackMem.v] - Blame information for rev 31

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 31 robfinch
// ============================================================================
2
//        __
3
//   \\__/ o\    (C) 2016-2018  Robert Finch, Waterloo
4
//    \  __ /    All rights reserved.
5
//     \/_//     robfinch<remove>@finitron.ca
6
//       ||
7
//
8
//      regReadbackMem.v
9
//              
10
//
11
// This source file is free software: you can redistribute it and/or modify 
12
// it under the terms of the GNU Lesser General Public License as published 
13
// by the Free Software Foundation, either version 3 of the License, or     
14
// (at your option) any later version.                                      
15
//                                                                          
16
// This source file is distributed in the hope that it will be useful,      
17
// but WITHOUT ANY WARRANTY; without even the implied warranty of           
18
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            
19
// GNU General Public License for more details.                             
20
//                                                                          
21
// You should have received a copy of the GNU General Public License        
22
// along with this program.  If not, see <http://www.gnu.org/licenses/>.    
23
//                                                                          
24
//
25
// ============================================================================
26
//
27
module regReadbackMem(wclk,wce,we,adr,i,o);
28
parameter WID=16;
29
input wclk;
30
input wce;
31
input we;
32
input [3:0] adr;
33
input [WID-1:0] i;
34
output [WID-1:0] o;
35
 
36
genvar g;
37
 
38
generate
39
begin
40
for (g = 0; g < WID; g = g + 1)
41
begin
42
RAM16X1S u1
43
(
44
    .WCLK(wclk),
45
    .WE(wce & we),
46
    .A0(adr[0]),
47
    .A1(adr[1]),
48
    .A2(adr[2]),
49
    .A3(adr[3]),
50
    .D(i[g]),
51
    .O(o[g])
52
);
53
end
54
end
55
endgenerate
56
 
57
endmodule

powered by: WebSVN 2.1.0

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