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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1200/] [rtl/] [verilog/] [or1200_dc_ram.v] - Blame information for rev 234

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

Line No. Rev Author Line
1 10 unneback
 
2
//////////////////////////////////////////////////////////////////////
3
////                                                              ////
4
////  OR1200's DC RAMs                                            ////
5
////                                                              ////
6
////  This file is part of the OpenRISC 1200 project              ////
7
////  http://www.opencores.org/cores/or1k/                        ////
8
////                                                              ////
9
////  Description                                                 ////
10
////  Instatiation of DC RAM blocks.                              ////
11
////                                                              ////
12
////  To Do:                                                      ////
13
////   - make it smaller and faster                               ////
14
////                                                              ////
15
////  Author(s):                                                  ////
16
////      - Damjan Lampret, lampret@opencores.org                 ////
17
////                                                              ////
18
//////////////////////////////////////////////////////////////////////
19
////                                                              ////
20
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
21
////                                                              ////
22
//// This source file may be used and distributed without         ////
23
//// restriction provided that this copyright statement is not    ////
24
//// removed from the file and that any derivative work contains  ////
25
//// the original copyright notice and the associated disclaimer. ////
26
////                                                              ////
27
//// This source file is free software; you can redistribute it   ////
28
//// and/or modify it under the terms of the GNU Lesser General   ////
29
//// Public License as published by the Free Software Foundation; ////
30
//// either version 2.1 of the License, or (at your option) any   ////
31
//// later version.                                               ////
32
////                                                              ////
33
//// This source is distributed in the hope that it will be       ////
34
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
35
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
36
//// PURPOSE.  See the GNU Lesser General Public License for more ////
37
//// details.                                                     ////
38
////                                                              ////
39
//// You should have received a copy of the GNU Lesser General    ////
40
//// Public License along with this source; if not, download it   ////
41
//// from http://www.opencores.org/lgpl.shtml                     ////
42
////                                                              ////
43
//////////////////////////////////////////////////////////////////////
44
//
45
// CVS Revision History
46
//
47 141 marcus.erl
// $Log: or1200_dc_ram.v,v $
48
// Revision 2.0  2010/06/30 11:00:00  ORSoC
49
// Minor update: 
50
// Coding style changed.
51
//
52
// Revision 1.6  2004/06/08 18:17:36  lampret
53
// Non-functional changes. Coding style fixes.
54
//
55 10 unneback
// Revision 1.5  2004/04/05 08:29:57  lampret
56
// Merged branch_qmem into main tree.
57
//
58
// Revision 1.2.4.2  2003/12/10 15:28:28  simons
59
// Support for ram with byte selects added.
60
//
61
// Revision 1.2.4.1  2003/12/09 11:46:48  simons
62
// Mbist nameing changed, Artisan ram instance signal names fixed, some synthesis waning fixed.
63
//
64
// Revision 1.2  2002/10/17 20:04:40  lampret
65
// Added BIST scan. Special VS RAMs need to be used to implement BIST.
66
//
67
// Revision 1.1  2002/01/03 08:16:15  lampret
68
// New prefixes for RTL files, prefixed module names. Updated cache controllers and MMUs.
69
//
70
// Revision 1.8  2001/10/21 17:57:16  lampret
71
// Removed params from generic_XX.v. Added translate_off/on in sprs.v and id.v. Removed spr_addr from dc.v and ic.v. Fixed CR+LF.
72
//
73
// Revision 1.7  2001/10/14 13:12:09  lampret
74
// MP3 version.
75
//
76
// Revision 1.1.1.1  2001/10/06 10:18:36  igorm
77
// no message
78
//
79
// Revision 1.2  2001/08/09 13:39:33  lampret
80
// Major clean-up.
81
//
82
// Revision 1.1  2001/07/20 00:46:03  lampret
83
// Development version of RTL. Libraries are missing.
84
//
85
//
86
 
87
// synopsys translate_off
88
`include "timescale.v"
89
// synopsys translate_on
90
`include "or1200_defines.v"
91
 
92
module or1200_dc_ram(
93
        // Reset and clock
94
        clk, rst,
95
 
96
`ifdef OR1200_BIST
97
        // RAM BIST
98
        mbist_si_i, mbist_so_o, mbist_ctrl_i,
99
`endif
100
 
101
        // Internal i/f
102
        addr, en, we, datain, dataout
103
);
104
 
105
parameter dw = `OR1200_OPERAND_WIDTH;
106
parameter aw = `OR1200_DCINDX;
107
 
108
//
109
// I/O
110
//
111
input                           clk;
112
input                           rst;
113
input   [aw-1:0]         addr;
114
input                           en;
115
input   [3:0]                    we;
116
input   [dw-1:0]         datain;
117
output  [dw-1:0]         dataout;
118
 
119
`ifdef OR1200_BIST
120
//
121
// RAM BIST
122
//
123
input                           mbist_si_i;
124
input [`OR1200_MBIST_CTRL_WIDTH - 1:0] mbist_ctrl_i;       // bist chain shift control
125
output                          mbist_so_o;
126
`endif
127
 
128
`ifdef OR1200_NO_DC
129
 
130
//
131
// Data cache not implemented
132
//
133
assign dataout = {dw{1'b0}};
134
`ifdef OR1200_BIST
135
assign mbist_so_o = mbist_si_i;
136
`endif
137
 
138
`else
139
 
140
//
141
// Instantiation of RAM block
142
//
143
`ifdef OR1200_DC_1W_4KB
144 141 marcus.erl
   or1200_spram_32_bw #
145
     (
146
      .aw(10),
147
      .dw(32)
148
      )
149 10 unneback
`endif
150
`ifdef OR1200_DC_1W_8KB
151 141 marcus.erl
   or1200_spram_32_bw #
152
     (
153
      .aw(11),
154
      .dw(32)
155
      )
156 10 unneback
`endif
157 141 marcus.erl
   dc_ram
158
     (
159 10 unneback
`ifdef OR1200_BIST
160 141 marcus.erl
      // RAM BIST
161
      .mbist_si_i(mbist_si_i),
162
      .mbist_so_o(mbist_so_o),
163
      .mbist_ctrl_i(mbist_ctrl_i),
164 10 unneback
`endif
165 141 marcus.erl
      .clk(clk),
166
      .ce(en),
167
      .we(we),
168
      .addr(addr),
169
      .di(datain),
170
      .doq(dataout)
171
      );
172 10 unneback
`endif
173 141 marcus.erl
 
174
endmodule // or1200_dc_ram

powered by: WebSVN 2.1.0

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