Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: n2_mam_mp_160x66_cust.v | |
4 | // Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved | |
5 | // 4150 Network Circle, Santa Clara, California 95054, U.S.A. | |
6 | // | |
7 | // * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
8 | // | |
9 | // This program is free software; you can redistribute it and/or modify | |
10 | // it under the terms of the GNU General Public License as published by | |
11 | // the Free Software Foundation; version 2 of the License. | |
12 | // | |
13 | // This program is distributed in the hope that it will be useful, | |
14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | // GNU General Public License for more details. | |
17 | // | |
18 | // You should have received a copy of the GNU General Public License | |
19 | // along with this program; if not, write to the Free Software | |
20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 | // | |
22 | // For the avoidance of doubt, and except that if any non-GPL license | |
23 | // choice is available it will apply instead, Sun elects to use only | |
24 | // the General Public License version 2 (GPLv2) at this time for any | |
25 | // software where a choice of GPL license versions is made | |
26 | // available with the language indicating that GPLv2 or any later version | |
27 | // may be used, or where a choice of which version of the GPL is applied is | |
28 | // otherwise unspecified. | |
29 | // | |
30 | // Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
31 | // CA 95054 USA or visit www.sun.com if you need additional information or | |
32 | // have any questions. | |
33 | // | |
34 | // ========== Copyright Header End ============================================ | |
35 | ||
36 | //////////////////////////////////////////////////////////////////////////////// | |
37 | // $Id: n2_mam_mp_160x66_cust.v,v 1.1.1.1 2007/02/13 22:19:31 drp Exp $ | |
38 | // | |
39 | // Copyright (C) 2003 by Sun Microsystems, Inc. | |
40 | // | |
41 | // All rights reserved. No part of this design may be reproduced, | |
42 | // stored in a retrieval system, or transmitted, in any form or by | |
43 | // any means, electronic, mechanical, photocopying, recording, or | |
44 | // otherwise, without prior written permission of Sun Microsystems, | |
45 | // Inc. | |
46 | // | |
47 | // Sun Proprietary/Confidential | |
48 | // | |
49 | // Description: SPU MA MEM | |
50 | // - 160 entry | |
51 | // - 64-bit data + 2-bit parity = 66-bit total | |
52 | // - 2 Read + 1 Write ports | |
53 | // | |
54 | // Primary Contact: christopher.olson@sun.com | |
55 | //////////////////////////////////////////////////////////////////////////////// | |
56 | ||
57 | ||
58 | module n2_mam_mp_160x66_cust ( | |
59 | l2clk, | |
60 | scan_in, | |
61 | pce, | |
62 | tcu_pce_ov, | |
63 | tcu_aclk, | |
64 | tcu_bclk, | |
65 | tcu_array_wr_inhibit, | |
66 | tcu_se_scancollar_in, | |
67 | tcu_scan_en, | |
68 | rd0_enable, | |
69 | rd0_enable_ff_clken, | |
70 | r0_addr, | |
71 | r0_byp, | |
72 | rd1_enable, | |
73 | rd1_enable_ff_clken, | |
74 | r1_addr, | |
75 | r1_byp, | |
76 | w_addr, | |
77 | wr_enable, | |
78 | wr_data, | |
79 | scan_out, | |
80 | rd0_data, | |
81 | rd1_data); | |
82 | wire siclk; | |
83 | wire soclk; | |
84 | wire l1clk_wr_data_e; | |
85 | wire [65:0] i_wr_data_ff_scanin; | |
86 | wire [65:0] i_wr_data_ff_scanout; | |
87 | wire [65:0] wr_data_ff; | |
88 | wire l1clk_rd_data_e; | |
89 | wire [7:0] r0_addr_ff; | |
90 | wire [7:0] r0_mux; | |
91 | wire [7:0] i_r0_addr_ff_scanin; | |
92 | wire [7:0] i_r0_addr_ff_scanout; | |
93 | wire l1clk_out; | |
94 | wire [7:0] r0_addr_lat; | |
95 | wire [7:0] r0_lat_l_unused; | |
96 | wire [7:0] r0_dout_l_unused; | |
97 | wire [7:0] r1_addr_ff; | |
98 | wire [7:0] r1_mux; | |
99 | wire [7:0] i_r1_addr_ff_scanin; | |
100 | wire [7:0] i_r1_addr_ff_scanout; | |
101 | wire [7:0] r1_addr_lat; | |
102 | wire [7:0] r1_lat_l_unused; | |
103 | wire [7:0] r1_dout_l_unused; | |
104 | wire [7:0] i_w_addr_ff_scanin; | |
105 | wire [7:0] i_w_addr_ff_scanout; | |
106 | wire [7:0] w_addr_ff; | |
107 | wire rd0_enable_ff; | |
108 | wire rd0_enable_ff_mux; | |
109 | wire [0:0] i_rd0_enable_ff_scanin; | |
110 | wire [0:0] i_rd0_enable_ff_scanout; | |
111 | wire rd0_enable_lat; | |
112 | wire rd0_enable_ff_unused; | |
113 | wire rd0_enable_dout_l_unused; | |
114 | wire rd1_enable_ff; | |
115 | wire rd1_enable_ff_mux; | |
116 | wire [0:0] i_rd1_enable_ff_scanin; | |
117 | wire [0:0] i_rd1_enable_ff_scanout; | |
118 | wire rd1_enable_lat; | |
119 | wire rd1_enable_ff_unused; | |
120 | wire rd1_enable_dout_l_unused; | |
121 | wire [0:0] i_wr_enable_ff_scanin; | |
122 | wire [0:0] i_wr_enable_ff_scanout; | |
123 | wire wr_enable_ff; | |
124 | ||
125 | ||
126 | input l2clk; | |
127 | input scan_in; | |
128 | input pce; | |
129 | input tcu_pce_ov; | |
130 | input tcu_aclk; | |
131 | input tcu_bclk; | |
132 | input tcu_array_wr_inhibit; | |
133 | input tcu_se_scancollar_in; | |
134 | input tcu_scan_en; | |
135 | ||
136 | input rd0_enable; | |
137 | input rd0_enable_ff_clken; | |
138 | input [7:0] r0_addr; | |
139 | input r0_byp; | |
140 | input rd1_enable; | |
141 | input rd1_enable_ff_clken; | |
142 | input [7:0] r1_addr; | |
143 | input r1_byp; | |
144 | input [7:0] w_addr; | |
145 | input wr_enable; | |
146 | input [65:0] wr_data; | |
147 | ||
148 | output scan_out; | |
149 | output [65:0] rd0_data; | |
150 | output [65:0] rd1_data; | |
151 | ||
152 | ||
153 | // scan renames | |
154 | assign siclk = tcu_aclk; | |
155 | assign soclk = tcu_bclk; | |
156 | // end scan | |
157 | ||
158 | n2_mam_mp_160x66_cust_l1clkhdr_ctl_macro wr_en_clkgen ( | |
159 | .l2clk (l2clk ), | |
160 | .l1en (wr_enable ), | |
161 | .pce_ov (tcu_pce_ov ), | |
162 | .stop (1'b0 ), | |
163 | .se (tcu_se_scancollar_in ), | |
164 | .l1clk (l1clk_wr_data_e ) | |
165 | ); | |
166 | ||
167 | n2_mam_mp_160x66_cust_msff_ctl_macro__fs_1__scanreverse_1__width_66 i_wr_data_ff ( | |
168 | .scan_in(i_wr_data_ff_scanin[65:0]), | |
169 | .scan_out(i_wr_data_ff_scanout[65:0]), | |
170 | .l1clk ( l1clk_wr_data_e ), | |
171 | .din ( wr_data[65:0] ), | |
172 | .dout ( wr_data_ff[65:0] ), | |
173 | .siclk(siclk), | |
174 | .soclk(soclk)); | |
175 | ||
176 | // Change clk enables for read port addr/enables to be mux holds per Tai's request | |
177 | n2_mam_mp_160x66_cust_l1clkhdr_ctl_macro rd_en_clkgen ( | |
178 | .l2clk (l2clk ), | |
179 | .l1en (pce ), | |
180 | .pce_ov (tcu_pce_ov ), | |
181 | .stop (1'b0 ), | |
182 | .se (tcu_se_scancollar_in ), | |
183 | .l1clk (l1clk_rd_data_e ) | |
184 | ); | |
185 | ||
186 | n2_mam_mp_160x66_cust_mux_macro__mux_aope__ports_2__width_8 i_r0_mux ( | |
187 | .din0 (r0_addr[7:0] ), | |
188 | .din1 (r0_addr_ff[7:0] ), | |
189 | .sel0 (rd0_enable_ff_clken ), | |
190 | .dout (r0_mux[7:0] )); | |
191 | ||
192 | n2_mam_mp_160x66_cust_sram_msff_mo_macro__fs_1__width_8 i_r0_addr_ff ( | |
193 | .scan_in(i_r0_addr_ff_scanin[7:0]), | |
194 | .scan_out(i_r0_addr_ff_scanout[7:0]), | |
195 | .l1clk (l1clk_rd_data_e ), | |
196 | .and_clk (l1clk_out ), | |
197 | .siclk(siclk ), | |
198 | .soclk(soclk ), | |
199 | .d ( r0_mux[7:0] ), | |
200 | .mq (r0_addr_lat[7:0] ), | |
201 | .mq_l(r0_lat_l_unused[7:0] ), | |
202 | .q_l(r0_dout_l_unused[7:0] ), | |
203 | .q ( r0_addr_ff[7:0] )); | |
204 | ||
205 | //msff_ctl_macro i_r0_addr_ff (fs=1,width=8) ( | |
206 | // .scan_in(i_r0_addr_ff_scanin[7:0]), | |
207 | // .scan_out(i_r0_addr_ff_scanout[7:0]), | |
208 | // .l1clk (l1clk_rd_data_e ), | |
209 | // .din ( r0_mux[7:0] ), | |
210 | // .dout ( r0_addr_ff[7:0] )); | |
211 | ||
212 | n2_mam_mp_160x66_cust_mux_macro__mux_aope__ports_2__width_8 i_r1_mux ( | |
213 | .din0 (r1_addr[7:0] ), | |
214 | .din1 (r1_addr_ff[7:0] ), | |
215 | .sel0 (rd1_enable_ff_clken ), | |
216 | .dout (r1_mux[7:0] )); | |
217 | ||
218 | //msff_ctl_macro i_r1_addr_ff (fs=1,width=8) ( | |
219 | // .scan_in(i_r1_addr_ff_scanin[7:0]), | |
220 | // .scan_out(i_r1_addr_ff_scanout[7:0]), | |
221 | // .l1clk ( l1clk_rd_data_e ), | |
222 | // .din ( r1_mux[7:0] ), | |
223 | // .dout ( r1_addr_ff[7:0] )); | |
224 | ||
225 | n2_mam_mp_160x66_cust_sram_msff_mo_macro__fs_1__width_8 i_r1_addr_ff ( | |
226 | .scan_in(i_r1_addr_ff_scanin[7:0]), | |
227 | .scan_out(i_r1_addr_ff_scanout[7:0]), | |
228 | .l1clk (l1clk_rd_data_e ), | |
229 | .and_clk (l1clk_out ), | |
230 | .siclk(siclk ), | |
231 | .soclk(soclk ), | |
232 | .d ( r1_mux[7:0] ), | |
233 | .mq (r1_addr_lat[7:0] ), | |
234 | .mq_l(r1_lat_l_unused[7:0] ), | |
235 | .q_l(r1_dout_l_unused[7:0] ), | |
236 | .q ( r1_addr_ff[7:0] )); | |
237 | ||
238 | n2_mam_mp_160x66_cust_msff_ctl_macro__fs_1__width_8 i_w_addr_ff ( | |
239 | .scan_in(i_w_addr_ff_scanin[7:0]), | |
240 | .scan_out(i_w_addr_ff_scanout[7:0]), | |
241 | .l1clk (l1clk_wr_data_e ), | |
242 | .din ( w_addr[7:0] ), | |
243 | .dout ( w_addr_ff[7:0] ), | |
244 | .siclk(siclk), | |
245 | .soclk(soclk)); | |
246 | ||
247 | n2_mam_mp_160x66_cust_mux_macro__mux_aope__ports_2__width_1 i_r0_enable_mux ( | |
248 | .din0 (rd0_enable ), | |
249 | .din1 (rd0_enable_ff ), | |
250 | .sel0 (rd0_enable_ff_clken ), | |
251 | .dout (rd0_enable_ff_mux )); | |
252 | ||
253 | //msff_ctl_macro i_rd0_enable_ff (fs=1,width=1) ( | |
254 | // .scan_in(i_rd0_enable_ff_scanin[0:0]), | |
255 | // .scan_out(i_rd0_enable_ff_scanout[0:0]), | |
256 | // .l1clk (l1clk_rd_data_e ), | |
257 | // .din ( rd0_enable_ff_mux ), | |
258 | // .dout ( rd0_enable_ff )); | |
259 | ||
260 | n2_mam_mp_160x66_cust_sram_msff_mo_macro__fs_1__width_1 i_rd0_enable_ff ( | |
261 | .scan_in(i_rd0_enable_ff_scanin[0:0]), | |
262 | .scan_out(i_rd0_enable_ff_scanout[0:0]), | |
263 | .l1clk (l1clk_rd_data_e ), | |
264 | .and_clk (l1clk_out ), | |
265 | .siclk(siclk), | |
266 | .soclk(soclk), | |
267 | .d ( rd0_enable_ff_mux ), | |
268 | .mq( rd0_enable_lat ), | |
269 | .mq_l(rd0_enable_ff_unused ), | |
270 | .q_l(rd0_enable_dout_l_unused ), | |
271 | .q ( rd0_enable_ff )); | |
272 | ||
273 | n2_mam_mp_160x66_cust_mux_macro__mux_aope__ports_2__width_1 i_r1_enable_mux ( | |
274 | .din0 (rd1_enable ), | |
275 | .din1 (rd1_enable_ff ), | |
276 | .sel0 (rd1_enable_ff_clken ), | |
277 | .dout (rd1_enable_ff_mux )); | |
278 | ||
279 | //msff_ctl_macro i_rd1_enable_ff (fs=1,width=1) ( | |
280 | // .scan_in(i_rd1_enable_ff_scanin[0:0]), | |
281 | // .scan_out(i_rd1_enable_ff_scanout[0:0]), | |
282 | // .l1clk (l1clk_rd_data_e ), | |
283 | // .din ( rd1_enable_ff_mux ), | |
284 | // .dout ( rd1_enable_ff )); | |
285 | ||
286 | n2_mam_mp_160x66_cust_sram_msff_mo_macro__fs_1__width_1 i_rd1_enable_ff ( | |
287 | .scan_in(i_rd1_enable_ff_scanin[0:0] ), | |
288 | .scan_out(i_rd1_enable_ff_scanout[0:0] ), | |
289 | .l1clk (l1clk_rd_data_e ), | |
290 | .and_clk (l1clk_out ), | |
291 | .siclk(siclk ), | |
292 | .soclk(soclk ), | |
293 | .d ( rd1_enable_ff_mux ), | |
294 | .mq( rd1_enable_lat ), | |
295 | .mq_l(rd1_enable_ff_unused ), | |
296 | .q_l(rd1_enable_dout_l_unused ), | |
297 | .q ( rd1_enable_ff )); | |
298 | ||
299 | n2_mam_mp_160x66_cust_msff_ctl_macro__fs_1__width_1 i_wr_enable_ff ( | |
300 | .scan_in(i_wr_enable_ff_scanin[0:0]), | |
301 | .scan_out(i_wr_enable_ff_scanout[0:0]), | |
302 | .l1clk (l1clk_rd_data_e ), | |
303 | .din ( wr_enable ), | |
304 | .dout ( wr_enable_ff ), | |
305 | .siclk(siclk), | |
306 | .soclk(soclk)); | |
307 | ||
308 | // L2 clock "free-running" clock | |
309 | n2_mam_mp_160x66_cust_l1clkhdr_ctl_macro l2_clkgen ( | |
310 | .l2clk (l2clk ), | |
311 | .l1en (pce ), | |
312 | .pce_ov (tcu_pce_ov ), | |
313 | .stop (1'b0 ), | |
314 | .se (tcu_scan_en ), | |
315 | .l1clk (l1clk_out ) | |
316 | ); | |
317 | ||
318 | // 0in custom -fire (rd0_enable_ff & ~tcu_array_wr_inhibit & wr_enable_ff & (w_addr_ff == r0_addr_ff) & ~r0_byp) -message "Attempt to read and write port0 of MAMEM w/o bypass" -group core_array | |
319 | // 0in custom -fire (rd1_enable_ff & ~tcu_array_wr_inhibit & wr_enable_ff & (w_addr_ff == r1_addr_ff) & ~r1_byp) -message "Attempt to read and write port1 of MAMEM w/o bypass" -group core_array | |
320 | ||
321 | lib_160x66b_2r_1w_array mamem_array ( | |
322 | .clk ( l1clk_out ), | |
323 | .rd0_en ( rd0_enable_lat ), | |
324 | .r0_addr ( r0_addr_lat[7:0] ), | |
325 | .rd1_en ( rd1_enable_lat ), | |
326 | .r1_addr ( r1_addr_lat[7:0] ), | |
327 | .w_addr ( w_addr_ff[7:0] ), | |
328 | .wr_en ( wr_enable_ff ), | |
329 | .tcu_array_wr_inhibit (tcu_array_wr_inhibit ), | |
330 | .din ( wr_data_ff[65:0] ), | |
331 | .r0_byp ( r0_byp ), | |
332 | .r1_byp ( r1_byp ), | |
333 | .dout0 ( rd0_data[65:0] ), | |
334 | .dout1 ( rd1_data[65:0] )); | |
335 | ||
336 | supply0 vss; | |
337 | supply1 vdd; | |
338 | ||
339 | ||
340 | // scanorder start | |
341 | // i_wr_data_ff_scanin[0:65] | |
342 | // i_r0_addr_ff_scanin[7:0] | |
343 | // i_rd0_enable_ff_scanin[0] | |
344 | // i_r1_addr_ff_scanin[7:0] | |
345 | // i_rd1_enable_ff_scanin[0] | |
346 | // i_w_addr_ff_scanin[7:0] | |
347 | // i_wr_enable_ff_scanin[0] | |
348 | // scanorder end | |
349 | // fixscan start | |
350 | assign i_wr_data_ff_scanin[0]=scan_in; | |
351 | assign i_wr_data_ff_scanin[1]=i_wr_data_ff_scanout[0]; | |
352 | assign i_wr_data_ff_scanin[2]=i_wr_data_ff_scanout[1]; | |
353 | assign i_wr_data_ff_scanin[3]=i_wr_data_ff_scanout[2]; | |
354 | assign i_wr_data_ff_scanin[4]=i_wr_data_ff_scanout[3]; | |
355 | assign i_wr_data_ff_scanin[5]=i_wr_data_ff_scanout[4]; | |
356 | assign i_wr_data_ff_scanin[6]=i_wr_data_ff_scanout[5]; | |
357 | assign i_wr_data_ff_scanin[7]=i_wr_data_ff_scanout[6]; | |
358 | assign i_wr_data_ff_scanin[8]=i_wr_data_ff_scanout[7]; | |
359 | assign i_wr_data_ff_scanin[9]=i_wr_data_ff_scanout[8]; | |
360 | assign i_wr_data_ff_scanin[10]=i_wr_data_ff_scanout[9]; | |
361 | assign i_wr_data_ff_scanin[11]=i_wr_data_ff_scanout[10]; | |
362 | assign i_wr_data_ff_scanin[12]=i_wr_data_ff_scanout[11]; | |
363 | assign i_wr_data_ff_scanin[13]=i_wr_data_ff_scanout[12]; | |
364 | assign i_wr_data_ff_scanin[14]=i_wr_data_ff_scanout[13]; | |
365 | assign i_wr_data_ff_scanin[15]=i_wr_data_ff_scanout[14]; | |
366 | assign i_wr_data_ff_scanin[16]=i_wr_data_ff_scanout[15]; | |
367 | assign i_wr_data_ff_scanin[17]=i_wr_data_ff_scanout[16]; | |
368 | assign i_wr_data_ff_scanin[18]=i_wr_data_ff_scanout[17]; | |
369 | assign i_wr_data_ff_scanin[19]=i_wr_data_ff_scanout[18]; | |
370 | assign i_wr_data_ff_scanin[20]=i_wr_data_ff_scanout[19]; | |
371 | assign i_wr_data_ff_scanin[21]=i_wr_data_ff_scanout[20]; | |
372 | assign i_wr_data_ff_scanin[22]=i_wr_data_ff_scanout[21]; | |
373 | assign i_wr_data_ff_scanin[23]=i_wr_data_ff_scanout[22]; | |
374 | assign i_wr_data_ff_scanin[24]=i_wr_data_ff_scanout[23]; | |
375 | assign i_wr_data_ff_scanin[25]=i_wr_data_ff_scanout[24]; | |
376 | assign i_wr_data_ff_scanin[26]=i_wr_data_ff_scanout[25]; | |
377 | assign i_wr_data_ff_scanin[27]=i_wr_data_ff_scanout[26]; | |
378 | assign i_wr_data_ff_scanin[28]=i_wr_data_ff_scanout[27]; | |
379 | assign i_wr_data_ff_scanin[29]=i_wr_data_ff_scanout[28]; | |
380 | assign i_wr_data_ff_scanin[30]=i_wr_data_ff_scanout[29]; | |
381 | assign i_wr_data_ff_scanin[31]=i_wr_data_ff_scanout[30]; | |
382 | assign i_wr_data_ff_scanin[32]=i_wr_data_ff_scanout[31]; | |
383 | assign i_wr_data_ff_scanin[33]=i_wr_data_ff_scanout[32]; | |
384 | assign i_wr_data_ff_scanin[34]=i_wr_data_ff_scanout[33]; | |
385 | assign i_wr_data_ff_scanin[35]=i_wr_data_ff_scanout[34]; | |
386 | assign i_wr_data_ff_scanin[36]=i_wr_data_ff_scanout[35]; | |
387 | assign i_wr_data_ff_scanin[37]=i_wr_data_ff_scanout[36]; | |
388 | assign i_wr_data_ff_scanin[38]=i_wr_data_ff_scanout[37]; | |
389 | assign i_wr_data_ff_scanin[39]=i_wr_data_ff_scanout[38]; | |
390 | assign i_wr_data_ff_scanin[40]=i_wr_data_ff_scanout[39]; | |
391 | assign i_wr_data_ff_scanin[41]=i_wr_data_ff_scanout[40]; | |
392 | assign i_wr_data_ff_scanin[42]=i_wr_data_ff_scanout[41]; | |
393 | assign i_wr_data_ff_scanin[43]=i_wr_data_ff_scanout[42]; | |
394 | assign i_wr_data_ff_scanin[44]=i_wr_data_ff_scanout[43]; | |
395 | assign i_wr_data_ff_scanin[45]=i_wr_data_ff_scanout[44]; | |
396 | assign i_wr_data_ff_scanin[46]=i_wr_data_ff_scanout[45]; | |
397 | assign i_wr_data_ff_scanin[47]=i_wr_data_ff_scanout[46]; | |
398 | assign i_wr_data_ff_scanin[48]=i_wr_data_ff_scanout[47]; | |
399 | assign i_wr_data_ff_scanin[49]=i_wr_data_ff_scanout[48]; | |
400 | assign i_wr_data_ff_scanin[50]=i_wr_data_ff_scanout[49]; | |
401 | assign i_wr_data_ff_scanin[51]=i_wr_data_ff_scanout[50]; | |
402 | assign i_wr_data_ff_scanin[52]=i_wr_data_ff_scanout[51]; | |
403 | assign i_wr_data_ff_scanin[53]=i_wr_data_ff_scanout[52]; | |
404 | assign i_wr_data_ff_scanin[54]=i_wr_data_ff_scanout[53]; | |
405 | assign i_wr_data_ff_scanin[55]=i_wr_data_ff_scanout[54]; | |
406 | assign i_wr_data_ff_scanin[56]=i_wr_data_ff_scanout[55]; | |
407 | assign i_wr_data_ff_scanin[57]=i_wr_data_ff_scanout[56]; | |
408 | assign i_wr_data_ff_scanin[58]=i_wr_data_ff_scanout[57]; | |
409 | assign i_wr_data_ff_scanin[59]=i_wr_data_ff_scanout[58]; | |
410 | assign i_wr_data_ff_scanin[60]=i_wr_data_ff_scanout[59]; | |
411 | assign i_wr_data_ff_scanin[61]=i_wr_data_ff_scanout[60]; | |
412 | assign i_wr_data_ff_scanin[62]=i_wr_data_ff_scanout[61]; | |
413 | assign i_wr_data_ff_scanin[63]=i_wr_data_ff_scanout[62]; | |
414 | assign i_wr_data_ff_scanin[64]=i_wr_data_ff_scanout[63]; | |
415 | assign i_wr_data_ff_scanin[65]=i_wr_data_ff_scanout[64]; | |
416 | assign i_r0_addr_ff_scanin[7]=i_wr_data_ff_scanout[65]; | |
417 | assign i_r0_addr_ff_scanin[6]=i_r0_addr_ff_scanout[7]; | |
418 | assign i_r0_addr_ff_scanin[5]=i_r0_addr_ff_scanout[6]; | |
419 | assign i_r0_addr_ff_scanin[4]=i_r0_addr_ff_scanout[5]; | |
420 | assign i_r0_addr_ff_scanin[3]=i_r0_addr_ff_scanout[4]; | |
421 | assign i_r0_addr_ff_scanin[2]=i_r0_addr_ff_scanout[3]; | |
422 | assign i_r0_addr_ff_scanin[1]=i_r0_addr_ff_scanout[2]; | |
423 | assign i_r0_addr_ff_scanin[0]=i_r0_addr_ff_scanout[1]; | |
424 | assign i_rd0_enable_ff_scanin[0]=i_r0_addr_ff_scanout[0]; | |
425 | assign i_r1_addr_ff_scanin[7]=i_rd0_enable_ff_scanout[0]; | |
426 | assign i_r1_addr_ff_scanin[6]=i_r1_addr_ff_scanout[7]; | |
427 | assign i_r1_addr_ff_scanin[5]=i_r1_addr_ff_scanout[6]; | |
428 | assign i_r1_addr_ff_scanin[4]=i_r1_addr_ff_scanout[5]; | |
429 | assign i_r1_addr_ff_scanin[3]=i_r1_addr_ff_scanout[4]; | |
430 | assign i_r1_addr_ff_scanin[2]=i_r1_addr_ff_scanout[3]; | |
431 | assign i_r1_addr_ff_scanin[1]=i_r1_addr_ff_scanout[2]; | |
432 | assign i_r1_addr_ff_scanin[0]=i_r1_addr_ff_scanout[1]; | |
433 | assign i_rd1_enable_ff_scanin[0]=i_r1_addr_ff_scanout[0]; | |
434 | assign i_w_addr_ff_scanin[7]=i_rd1_enable_ff_scanout[0]; | |
435 | assign i_w_addr_ff_scanin[6]=i_w_addr_ff_scanout[7]; | |
436 | assign i_w_addr_ff_scanin[5]=i_w_addr_ff_scanout[6]; | |
437 | assign i_w_addr_ff_scanin[4]=i_w_addr_ff_scanout[5]; | |
438 | assign i_w_addr_ff_scanin[3]=i_w_addr_ff_scanout[4]; | |
439 | assign i_w_addr_ff_scanin[2]=i_w_addr_ff_scanout[3]; | |
440 | assign i_w_addr_ff_scanin[1]=i_w_addr_ff_scanout[2]; | |
441 | assign i_w_addr_ff_scanin[0]=i_w_addr_ff_scanout[1]; | |
442 | assign i_wr_enable_ff_scanin[0]=i_w_addr_ff_scanout[0]; | |
443 | assign scan_out=i_wr_enable_ff_scanout[0]; | |
444 | // fixscan end | |
445 | endmodule | |
446 | ||
447 | ||
448 | ||
449 | ||
450 | ||
451 | ||
452 | ||
453 | // any PARAMS parms go into naming of macro | |
454 | ||
455 | module n2_mam_mp_160x66_cust_l1clkhdr_ctl_macro ( | |
456 | l2clk, | |
457 | l1en, | |
458 | pce_ov, | |
459 | stop, | |
460 | se, | |
461 | l1clk); | |
462 | ||
463 | ||
464 | input l2clk; | |
465 | input l1en; | |
466 | input pce_ov; | |
467 | input stop; | |
468 | input se; | |
469 | output l1clk; | |
470 | ||
471 | ||
472 | ||
473 | ||
474 | ||
475 | cl_sc1_l1hdr_8x c_0 ( | |
476 | ||
477 | ||
478 | .l2clk(l2clk), | |
479 | .pce(l1en), | |
480 | .l1clk(l1clk), | |
481 | .se(se), | |
482 | .pce_ov(pce_ov), | |
483 | .stop(stop) | |
484 | ); | |
485 | ||
486 | ||
487 | ||
488 | endmodule | |
489 | ||
490 | ||
491 | ||
492 | ||
493 | ||
494 | ||
495 | ||
496 | ||
497 | ||
498 | ||
499 | ||
500 | ||
501 | ||
502 | // any PARAMS parms go into naming of macro | |
503 | ||
504 | module n2_mam_mp_160x66_cust_msff_ctl_macro__fs_1__scanreverse_1__width_66 ( | |
505 | din, | |
506 | l1clk, | |
507 | scan_in, | |
508 | siclk, | |
509 | soclk, | |
510 | dout, | |
511 | scan_out); | |
512 | wire [65:0] fdin; | |
513 | ||
514 | input [65:0] din; | |
515 | input l1clk; | |
516 | input [65:0] scan_in; | |
517 | ||
518 | ||
519 | input siclk; | |
520 | input soclk; | |
521 | ||
522 | output [65:0] dout; | |
523 | output [65:0] scan_out; | |
524 | assign fdin[65:0] = din[65:0]; | |
525 | ||
526 | ||
527 | ||
528 | ||
529 | ||
530 | ||
531 | dff #(66) d0_0 ( | |
532 | .l1clk(l1clk), | |
533 | .siclk(siclk), | |
534 | .soclk(soclk), | |
535 | .d(fdin[65:0]), | |
536 | .si(scan_in[65:0]), | |
537 | .so(scan_out[65:0]), | |
538 | .q(dout[65:0]) | |
539 | ); | |
540 | ||
541 | ||
542 | ||
543 | ||
544 | ||
545 | ||
546 | ||
547 | ||
548 | ||
549 | ||
550 | ||
551 | ||
552 | endmodule | |
553 | ||
554 | ||
555 | ||
556 | ||
557 | ||
558 | ||
559 | ||
560 | ||
561 | ||
562 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
563 | // also for pass-gate with decoder | |
564 | ||
565 | ||
566 | ||
567 | ||
568 | ||
569 | // any PARAMS parms go into naming of macro | |
570 | ||
571 | module n2_mam_mp_160x66_cust_mux_macro__mux_aope__ports_2__width_8 ( | |
572 | din0, | |
573 | din1, | |
574 | sel0, | |
575 | dout); | |
576 | wire psel0; | |
577 | wire psel1; | |
578 | ||
579 | input [7:0] din0; | |
580 | input [7:0] din1; | |
581 | input sel0; | |
582 | output [7:0] dout; | |
583 | ||
584 | ||
585 | ||
586 | ||
587 | ||
588 | cl_dp1_penc2_8x c0_0 ( | |
589 | .sel0(sel0), | |
590 | .psel0(psel0), | |
591 | .psel1(psel1) | |
592 | ); | |
593 | ||
594 | mux2s #(8) d0_0 ( | |
595 | .sel0(psel0), | |
596 | .sel1(psel1), | |
597 | .in0(din0[7:0]), | |
598 | .in1(din1[7:0]), | |
599 | .dout(dout[7:0]) | |
600 | ); | |
601 | ||
602 | ||
603 | ||
604 | ||
605 | ||
606 | ||
607 | ||
608 | ||
609 | ||
610 | ||
611 | ||
612 | ||
613 | ||
614 | endmodule | |
615 | ||
616 | ||
617 | // | |
618 | // macro for cl_mc1_sram_msff_mo_{16,8,4}x flops | |
619 | // | |
620 | // | |
621 | ||
622 | ||
623 | ||
624 | ||
625 | ||
626 | module n2_mam_mp_160x66_cust_sram_msff_mo_macro__fs_1__width_8 ( | |
627 | d, | |
628 | scan_in, | |
629 | l1clk, | |
630 | and_clk, | |
631 | siclk, | |
632 | soclk, | |
633 | mq, | |
634 | mq_l, | |
635 | scan_out, | |
636 | q, | |
637 | q_l); | |
638 | input [7:0] d; | |
639 | input [7:0] scan_in; | |
640 | input l1clk; | |
641 | input and_clk; | |
642 | input siclk; | |
643 | input soclk; | |
644 | output [7:0] mq; | |
645 | output [7:0] mq_l; | |
646 | output [7:0] scan_out; | |
647 | output [7:0] q; | |
648 | output [7:0] q_l; | |
649 | ||
650 | ||
651 | ||
652 | ||
653 | ||
654 | ||
655 | new_dlata #(8) d0_0 ( | |
656 | .d(d[7:0]), | |
657 | .si(scan_in[7:0]), | |
658 | .so(scan_out[7:0]), | |
659 | .l1clk(l1clk), | |
660 | .and_clk(and_clk), | |
661 | .siclk(siclk), | |
662 | .soclk(soclk), | |
663 | .q(q[7:0]), | |
664 | .q_l(q_l[7:0]), | |
665 | .mq(mq[7:0]), | |
666 | .mq_l(mq_l[7:0]) | |
667 | ); | |
668 | ||
669 | ||
670 | ||
671 | ||
672 | ||
673 | ||
674 | ||
675 | ||
676 | ||
677 | ||
678 | //place::generic_place($width,$stack,$left); | |
679 | ||
680 | endmodule | |
681 | ||
682 | ||
683 | ||
684 | ||
685 | ||
686 | ||
687 | ||
688 | ||
689 | ||
690 | // any PARAMS parms go into naming of macro | |
691 | ||
692 | module n2_mam_mp_160x66_cust_msff_ctl_macro__fs_1__width_8 ( | |
693 | din, | |
694 | l1clk, | |
695 | scan_in, | |
696 | siclk, | |
697 | soclk, | |
698 | dout, | |
699 | scan_out); | |
700 | wire [7:0] fdin; | |
701 | ||
702 | input [7:0] din; | |
703 | input l1clk; | |
704 | input [7:0] scan_in; | |
705 | ||
706 | ||
707 | input siclk; | |
708 | input soclk; | |
709 | ||
710 | output [7:0] dout; | |
711 | output [7:0] scan_out; | |
712 | assign fdin[7:0] = din[7:0]; | |
713 | ||
714 | ||
715 | ||
716 | ||
717 | ||
718 | ||
719 | dff #(8) d0_0 ( | |
720 | .l1clk(l1clk), | |
721 | .siclk(siclk), | |
722 | .soclk(soclk), | |
723 | .d(fdin[7:0]), | |
724 | .si(scan_in[7:0]), | |
725 | .so(scan_out[7:0]), | |
726 | .q(dout[7:0]) | |
727 | ); | |
728 | ||
729 | ||
730 | ||
731 | ||
732 | ||
733 | ||
734 | ||
735 | ||
736 | ||
737 | ||
738 | ||
739 | ||
740 | endmodule | |
741 | ||
742 | ||
743 | ||
744 | ||
745 | ||
746 | ||
747 | ||
748 | ||
749 | ||
750 | // general mux macro for pass-gate and and-or muxes with/wout priority encoders | |
751 | // also for pass-gate with decoder | |
752 | ||
753 | ||
754 | ||
755 | ||
756 | ||
757 | // any PARAMS parms go into naming of macro | |
758 | ||
759 | module n2_mam_mp_160x66_cust_mux_macro__mux_aope__ports_2__width_1 ( | |
760 | din0, | |
761 | din1, | |
762 | sel0, | |
763 | dout); | |
764 | wire psel0; | |
765 | wire psel1; | |
766 | ||
767 | input [0:0] din0; | |
768 | input [0:0] din1; | |
769 | input sel0; | |
770 | output [0:0] dout; | |
771 | ||
772 | ||
773 | ||
774 | ||
775 | ||
776 | cl_dp1_penc2_8x c0_0 ( | |
777 | .sel0(sel0), | |
778 | .psel0(psel0), | |
779 | .psel1(psel1) | |
780 | ); | |
781 | ||
782 | mux2s #(1) d0_0 ( | |
783 | .sel0(psel0), | |
784 | .sel1(psel1), | |
785 | .in0(din0[0:0]), | |
786 | .in1(din1[0:0]), | |
787 | .dout(dout[0:0]) | |
788 | ); | |
789 | ||
790 | ||
791 | ||
792 | ||
793 | ||
794 | ||
795 | ||
796 | ||
797 | ||
798 | ||
799 | ||
800 | ||
801 | ||
802 | endmodule | |
803 | ||
804 | ||
805 | // | |
806 | // macro for cl_mc1_sram_msff_mo_{16,8,4}x flops | |
807 | // | |
808 | // | |
809 | ||
810 | ||
811 | ||
812 | ||
813 | ||
814 | module n2_mam_mp_160x66_cust_sram_msff_mo_macro__fs_1__width_1 ( | |
815 | d, | |
816 | scan_in, | |
817 | l1clk, | |
818 | and_clk, | |
819 | siclk, | |
820 | soclk, | |
821 | mq, | |
822 | mq_l, | |
823 | scan_out, | |
824 | q, | |
825 | q_l); | |
826 | input [0:0] d; | |
827 | input [0:0] scan_in; | |
828 | input l1clk; | |
829 | input and_clk; | |
830 | input siclk; | |
831 | input soclk; | |
832 | output [0:0] mq; | |
833 | output [0:0] mq_l; | |
834 | output [0:0] scan_out; | |
835 | output [0:0] q; | |
836 | output [0:0] q_l; | |
837 | ||
838 | ||
839 | ||
840 | ||
841 | ||
842 | ||
843 | new_dlata #(1) d0_0 ( | |
844 | .d(d[0:0]), | |
845 | .si(scan_in[0:0]), | |
846 | .so(scan_out[0:0]), | |
847 | .l1clk(l1clk), | |
848 | .and_clk(and_clk), | |
849 | .siclk(siclk), | |
850 | .soclk(soclk), | |
851 | .q(q[0:0]), | |
852 | .q_l(q_l[0:0]), | |
853 | .mq(mq[0:0]), | |
854 | .mq_l(mq_l[0:0]) | |
855 | ); | |
856 | ||
857 | ||
858 | ||
859 | ||
860 | ||
861 | ||
862 | ||
863 | ||
864 | ||
865 | ||
866 | //place::generic_place($width,$stack,$left); | |
867 | ||
868 | endmodule | |
869 | ||
870 | ||
871 | ||
872 | ||
873 | ||
874 | ||
875 | ||
876 | ||
877 | ||
878 | // any PARAMS parms go into naming of macro | |
879 | ||
880 | module n2_mam_mp_160x66_cust_msff_ctl_macro__fs_1__width_1 ( | |
881 | din, | |
882 | l1clk, | |
883 | scan_in, | |
884 | siclk, | |
885 | soclk, | |
886 | dout, | |
887 | scan_out); | |
888 | wire [0:0] fdin; | |
889 | ||
890 | input [0:0] din; | |
891 | input l1clk; | |
892 | input [0:0] scan_in; | |
893 | ||
894 | ||
895 | input siclk; | |
896 | input soclk; | |
897 | ||
898 | output [0:0] dout; | |
899 | output [0:0] scan_out; | |
900 | assign fdin[0:0] = din[0:0]; | |
901 | ||
902 | ||
903 | ||
904 | ||
905 | ||
906 | ||
907 | dff #(1) d0_0 ( | |
908 | .l1clk(l1clk), | |
909 | .siclk(siclk), | |
910 | .soclk(soclk), | |
911 | .d(fdin[0:0]), | |
912 | .si(scan_in[0:0]), | |
913 | .so(scan_out[0:0]), | |
914 | .q(dout[0:0]) | |
915 | ); | |
916 | ||
917 | ||
918 | ||
919 | ||
920 | ||
921 | ||
922 | ||
923 | ||
924 | ||
925 | ||
926 | ||
927 | ||
928 | endmodule | |
929 | ||
930 | ||
931 | ||
932 | ||
933 | ||
934 | ||
935 | ||
936 | ||
937 | ||
938 | //////////////////////////////////////////////////////////////////////////////// | |
939 | // $Id: n2_mam_mp_160x66_cust.v,v 1.1.1.1 2007/02/13 22:19:31 drp Exp $ | |
940 | // | |
941 | // Copyright (C) 2003 by Sun Microsystems, Inc. | |
942 | // | |
943 | // All rights reserved. No part of this design may be reproduced, | |
944 | // stored in a retrieval system, or transmitted, in any form or by | |
945 | // any means, electronic, mechanical, photocopying, recording, or | |
946 | // otherwise, without prior written permission of Sun Microsystems, | |
947 | // Inc. | |
948 | // | |
949 | // Sun Proprietary/Confidential | |
950 | // | |
951 | // Description: 160 x 66 dual-port array | |
952 | // Bypass write data to read port on read/write collision | |
953 | // | |
954 | // To produce a debussy dump of memory contents, | |
955 | // add -vcs_run_args=+DUMPMEM_160x66 to sims command line | |
956 | // | |
957 | // Primary Contact: Mark Luttrell | |
958 | //////////////////////////////////////////////////////////////////////////////// | |
959 | ||
960 | module lib_160x66b_2r_1w_array ( | |
961 | clk, | |
962 | rd0_en, | |
963 | rd1_en, | |
964 | wr_en, | |
965 | tcu_array_wr_inhibit, | |
966 | r0_addr, | |
967 | r1_addr, | |
968 | w_addr, | |
969 | din, | |
970 | r0_byp, | |
971 | r1_byp, | |
972 | dout0, | |
973 | dout1); | |
974 | ||
975 | `define WIDTH 66 | |
976 | `define ENTRIES 160 | |
977 | `define ADDRBITS 8 | |
978 | ||
979 | input clk; | |
980 | input rd0_en; | |
981 | input rd1_en; | |
982 | input wr_en; | |
983 | input tcu_array_wr_inhibit; | |
984 | input [`ADDRBITS-1:0] r0_addr; | |
985 | input [`ADDRBITS-1:0] r1_addr; | |
986 | input [`ADDRBITS-1:0] w_addr; | |
987 | ||
988 | input [`WIDTH-1:0] din; | |
989 | input r0_byp; | |
990 | input r1_byp; | |
991 | output [`WIDTH-1:0] dout0; | |
992 | output [`WIDTH-1:0] dout1; | |
993 | ||
994 | ||
995 | ||
996 | ||
997 | ||
998 | ||
999 | ||
1000 | ||
1001 | reg [`WIDTH-1:0] mem[`ENTRIES-1:0]; | |
1002 | reg [`WIDTH-1:0] local_dout0; | |
1003 | reg [`WIDTH-1:0] local_dout1; | |
1004 | reg [`WIDTH-1:0] dout0; | |
1005 | reg [`WIDTH-1:0] dout1; | |
1006 | ||
1007 | // Emulate reset | |
1008 | `ifndef NOINITMEM | |
1009 | integer i; | |
1010 | initial begin | |
1011 | for (i=0; i<`ENTRIES; i=i+1) begin | |
1012 | mem[i] = {`WIDTH{1'b0}}; | |
1013 | end | |
1014 | local_dout0 = {`WIDTH{1'b0}}; | |
1015 | local_dout1 = {`WIDTH{1'b0}}; | |
1016 | end | |
1017 | `endif | |
1018 | ||
1019 | ////////////////////// | |
1020 | // Read/write array | |
1021 | ////////////////////// | |
1022 | always @ (clk or rd0_en or wr_en or tcu_array_wr_inhibit or w_addr or r0_addr) begin | |
1023 | if (clk) begin | |
1024 | if (rd0_en & ~tcu_array_wr_inhibit) begin | |
1025 | if (r0_addr <= 8'b10011111) begin // 159 | |
1026 | if (wr_en & (w_addr == r0_addr)) | |
1027 | local_dout0[`WIDTH-1:0] = {`WIDTH {1'bx}}; | |
1028 | else | |
1029 | local_dout0[`WIDTH-1:0] = mem[r0_addr]; | |
1030 | end | |
1031 | else | |
1032 | local_dout0[`WIDTH-1:0] = {`WIDTH {1'b0}}; // return 0's for out-of-bounds read address | |
1033 | end | |
1034 | else local_dout0[`WIDTH-1:0] = {`WIDTH {1'b0}}; // precharge | |
1035 | end // clk | |
1036 | end | |
1037 | ||
1038 | always @ (clk or rd1_en or wr_en or tcu_array_wr_inhibit or w_addr or r1_addr) begin | |
1039 | if (clk) begin | |
1040 | if (rd1_en & ~tcu_array_wr_inhibit) begin | |
1041 | if (r1_addr <= 8'b10011111) begin // 159 | |
1042 | if (wr_en & (w_addr == r1_addr)) | |
1043 | local_dout1[`WIDTH-1:0] = {`WIDTH {1'bx}}; | |
1044 | else | |
1045 | local_dout1[`WIDTH-1:0] = mem[r1_addr]; | |
1046 | end | |
1047 | else | |
1048 | local_dout1[`WIDTH-1:0] = {`WIDTH {1'b0}}; // return 0's for out-of-bounds read address | |
1049 | end | |
1050 | else local_dout1[`WIDTH-1:0] = {`WIDTH {1'b0}}; // precharge | |
1051 | end // clk | |
1052 | end | |
1053 | ||
1054 | always @ (negedge clk) begin | |
1055 | if (wr_en & ~tcu_array_wr_inhibit) begin | |
1056 | if (w_addr <= 8'b10011111) // make sure write address is valid | |
1057 | mem[w_addr] <= din; | |
1058 | ||
1059 | ||
1060 | ||
1061 | ||
1062 | end | |
1063 | ||
1064 | end | |
1065 | ||
1066 | ||
1067 | always @(r0_byp or local_dout0 or din) begin | |
1068 | if (r0_byp) dout0[`WIDTH-1:0] <= din[`WIDTH-1:0]; | |
1069 | else dout0[`WIDTH-1:0] <= local_dout0[`WIDTH-1:0]; | |
1070 | end | |
1071 | ||
1072 | always @(r1_byp or local_dout1 or din) begin | |
1073 | if (r1_byp) dout1[`WIDTH-1:0] <= din[`WIDTH-1:0]; | |
1074 | else dout1[`WIDTH-1:0] <= local_dout1[`WIDTH-1:0]; | |
1075 | end | |
1076 | ||
1077 | supply0 vss; | |
1078 | supply1 vdd; | |
1079 | ||
1080 | ||
1081 | ||
1082 | endmodule | |
1083 |