Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / libs / n2sram / cams / n2_com_cm_8x40_cust_l / n2_com_cm_8x40_cust / rtl / n2_com_cm_8x40_cust.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: n2_com_cm_8x40_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 ============================================
35module n2_com_cm_8x40_cust (
36 adr_w,
37 din,
38 write_en,
39 tcu_array_wr_inhibit,
40 adr_r,
41 read_en,
42 lookup_en,
43 key,
44 l2clk,
45 tcu_se_scancollar_in,
46 tcu_se_scancollar_out,
47 scan_in,
48 tcu_pce_ov,
49 pce,
50 tcu_aclk,
51 tcu_bclk,
52 tcu_scan_en,
53 tcu_clk_stop,
54 tcu_array_bypass,
55 dout,
56 match,
57 match_idx,
58 scan_out);
59wire siclk;
60wire soclk;
61wire se;
62wire stop;
63wire pce_ov;
64wire l1clk_mat;
65wire [73:0] xx0_unused;
66wire [73:0] xx_unused;
67wire [39:0] din_d1;
68wire mb_ren_d1;
69wire mb_wen_d1;
70wire [7:0] adr_r_d1;
71wire [7:0] adr_w_d1;
72
73
74input [7:0] adr_w ; // set up to +ve edge
75input [39:0] din; // set up to +ve edge
76input write_en; // +ve edge clk; write enable
77input tcu_array_wr_inhibit;
78input [7:0] adr_r; // set up to +ve edge
79input read_en;
80input lookup_en; // set up to -ve edge
81input [39:7] key; // set up to -ve edge
82input l2clk;
83input tcu_se_scancollar_in;
84input tcu_se_scancollar_out;
85input scan_in;
86input tcu_pce_ov;
87input pce;
88input tcu_aclk;
89input tcu_bclk;
90input tcu_scan_en;
91input tcu_clk_stop;
92input tcu_array_bypass; // array bypass for DFT
93
94
95output [39:0] dout;
96output [7:0] match;
97output [7:0] match_idx;
98output scan_out ;
99
100// JDL 05/17/07
101// synopsys translate_off
102
103wire [7:0] match_p_array;
104wire [7:0] match_idx_p_array;
105wire [39:0] dout_array;
106
107// scan chain connections ////
108assign siclk = tcu_aclk;
109assign soclk = tcu_bclk;
110assign se = tcu_scan_en;
111assign stop = tcu_clk_stop;
112assign pce_ov = tcu_pce_ov;
113
114//0in kndr -var adr_w[7:0] -active write_en
115//0in kndr -var adr_r[7:0] -active read_en
116//0in one_hot -var adr_r[7:0] -active (|adr_r & read_en) -group mbist_mode
117//0in one_hot -var adr_w[7:0] -active (|adr_w & write_en) -group mbist_mode
118
119//// Input Flops /////
120//
121//
122//inv_macro tcu_array_bypass_inv (width = 1)
123// (
124// .dout(tcu_array_bypass_n),
125// .din(tcu_array_bypass)
126// );
127//
128//
129////msff_ctl_macro ff_tcu_array_wr_inhibit (width = 1)
130// ( // not a real flop. ONly used as a trigger
131// .scan_in(ff_tcu_array_wr_inhibit_scanin),
132// .scan_out(ff_tcu_array_wr_inhibit_scanout),
133// .l1clk(l1clk),
134// .din(tcu_array_wr_inhibit),
135// .dout(tcu_array_wr_inhibit_d1)
136// );
137
138wire l1clk_in;
139wire l1clk_out;
140wire l1clk_en;
141wire [73:0] so;
142
143n2_com_cm_8x40_cust_l1clkhdr_ctl_macro collar_in
144 (
145 .l2clk (l2clk ),
146 .l1en (pce ),
147 .pce_ov (pce_ov ),
148 .stop (stop ),
149 .se (tcu_se_scancollar_in),
150 .l1clk (l1clk_in )
151 );
152n2_com_cm_8x40_cust_l1clkhdr_ctl_macro collar_out
153 (
154 .l2clk (l2clk ),
155 .l1en (pce ),
156 .pce_ov (pce_ov ),
157 .stop (stop ),
158 .se (tcu_se_scancollar_out),
159 .l1clk (l1clk_out )
160 );
161n2_com_cm_8x40_cust_l1clkhdr_ctl_macro scan_en
162 (
163 .l2clk (l2clk ),
164 .l1en (pce ),
165 .pce_ov (pce_ov ),
166 .stop (stop ),
167 .se (se),
168 .l1clk (l1clk_en )
169 );
170n2_com_cm_8x40_cust_l1clkhdr_ctl_macro mat
171 (
172 .l2clk (l2clk ),
173 .l1en (pce ),
174 .pce_ov (pce_ov ),
175 .stop (stop ),
176 .se (1'b0),
177 .l1clk (l1clk_mat )
178 );
179
180n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx0 (.scan_in(scan_in), .scan_out(so[0]), .l1clk(l1clk_in), .d(din[0]), .latout(xx0_unused[0]), .q_l(xx_unused[0]), .q(din_d1[0]),
181 .siclk(siclk),
182 .soclk(soclk));
183n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx1 (.scan_in(so[0]), .scan_out(so[1]), .l1clk(l1clk_in), .d(din[1]), .latout(xx0_unused[1]), .q_l(xx_unused[1]), .q(din_d1[1]),
184 .siclk(siclk),
185 .soclk(soclk));
186n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx2 (.scan_in(so[1]), .scan_out(so[2]), .l1clk(l1clk_in), .d(din[2]), .latout(xx0_unused[2]), .q_l(xx_unused[2]), .q(din_d1[2]),
187 .siclk(siclk),
188 .soclk(soclk));
189n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx3 (.scan_in(so[2]), .scan_out(so[3]), .l1clk(l1clk_in), .d(din[3]), .latout(xx0_unused[3]), .q_l(xx_unused[3]), .q(din_d1[3]),
190 .siclk(siclk),
191 .soclk(soclk));
192n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx4 (.scan_in(so[3]), .scan_out(so[4]), .l1clk(l1clk_in), .d(din[4]), .latout(xx0_unused[4]), .q_l(xx_unused[4]), .q(din_d1[4]),
193 .siclk(siclk),
194 .soclk(soclk));
195n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx5 (.scan_in(so[4]), .scan_out(so[5]), .l1clk(l1clk_in), .d(din[5]), .latout(xx0_unused[5]), .q_l(xx_unused[5]), .q(din_d1[5]),
196 .siclk(siclk),
197 .soclk(soclk));
198n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx6 (.scan_in(so[5]), .scan_out(so[6]), .l1clk(l1clk_in), .d(din[6]), .latout(xx0_unused[6]), .q_l(xx_unused[6]), .q(din_d1[6]),
199 .siclk(siclk),
200 .soclk(soclk));
201n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx7 (.scan_in(so[6]), .scan_out(so[7]), .l1clk(l1clk_in), .d(din[9]), .latout(xx0_unused[7]), .q_l(xx_unused[7]), .q(din_d1[9]),
202 .siclk(siclk),
203 .soclk(soclk));
204n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx8 (.scan_in(so[7]), .scan_out(so[8]), .l1clk(l1clk_in), .d(din[10]), .latout(xx0_unused[8]), .q_l(xx_unused[8]), .q(din_d1[10]),
205 .siclk(siclk),
206 .soclk(soclk));
207n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx9 (.scan_in(so[8]), .scan_out(so[9]), .l1clk(l1clk_in), .d(din[11]), .latout(xx0_unused[9]), .q_l(xx_unused[9]), .q(din_d1[11]),
208 .siclk(siclk),
209 .soclk(soclk));
210n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx10 (.scan_in(so[9]), .scan_out(so[10]), .l1clk(l1clk_in), .d(din[12]), .latout(xx0_unused[10]), .q_l(xx_unused[10]), .q(din_d1[12]),
211 .siclk(siclk),
212 .soclk(soclk));
213
214n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx11 (.scan_in(so[10]), .scan_out(so[11]), .l1clk(l1clk_out), .d(match_idx_p_array[4]), .q(match_idx[4]), .q_l(xx_unused[11]), .latout(xx0_unused[11]),
215 .siclk(siclk),
216 .soclk(soclk));
217n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx12 (.scan_in(so[11]), .scan_out(so[12]), .l1clk(l1clk_out), .d(match_idx_p_array[5]), .q(match_idx[5]), .q_l(xx_unused[12]), .latout(xx0_unused[12]),
218 .siclk(siclk),
219 .soclk(soclk));
220n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx13 (.scan_in(so[12]), .scan_out(so[13]), .l1clk(l1clk_out), .d(match_idx_p_array[6]), .q(match_idx[6]), .q_l(xx_unused[13]), .latout(xx0_unused[13]),
221 .siclk(siclk),
222 .soclk(soclk));
223n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx14 (.scan_in(so[13]), .scan_out(so[14]), .l1clk(l1clk_out), .d(match_idx_p_array[7]), .q(match_idx[7]), .q_l(xx_unused[14]), .latout(xx0_unused[14]),
224 .siclk(siclk),
225 .soclk(soclk));
226n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx15 (.scan_in(so[14]), .scan_out(so[15]), .l1clk(l1clk_in), .d(din[13]), .latout(xx0_unused[15]), .q_l(xx_unused[15]), .q(din_d1[13]),
227 .siclk(siclk),
228 .soclk(soclk));
229n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx16 (.scan_in(so[15]), .scan_out(so[16]), .l1clk(l1clk_in), .d(din[14]), .latout(xx0_unused[16]), .q_l(xx_unused[16]), .q(din_d1[14]),
230 .siclk(siclk),
231 .soclk(soclk));
232n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx17 (.scan_in(so[16]), .scan_out(so[17]), .l1clk(l1clk_in), .d(din[15]), .latout(xx0_unused[17]), .q_l(xx_unused[17]), .q(din_d1[15]),
233 .siclk(siclk),
234 .soclk(soclk));
235n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx18 (.scan_in(so[17]), .scan_out(so[18]), .l1clk(l1clk_in), .d(din[16]), .latout(xx0_unused[18]), .q_l(xx_unused[18]), .q(din_d1[16]),
236 .siclk(siclk),
237 .soclk(soclk));
238n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx19 (.scan_in(so[18]), .scan_out(so[19]), .l1clk(l1clk_in), .d(din[17]), .latout(xx0_unused[19]), .q_l(xx_unused[19]), .q(din_d1[17]),
239 .siclk(siclk),
240 .soclk(soclk));
241n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx20 (.scan_in(so[19]), .scan_out(so[20]), .l1clk(l1clk_in), .d(din[7]), .latout(xx0_unused[20]), .q_l(xx_unused[20]), .q(din_d1[7]),
242 .siclk(siclk),
243 .soclk(soclk));
244
245n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx21 (.scan_in(so[20]), .scan_out(so[21]), .l1clk(l1clk_in), .d(din[8]), .latout(xx0_unused[21]), .q_l(xx_unused[21]), .q(din_d1[8]),
246 .siclk(siclk),
247 .soclk(soclk));
248n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx22 (.scan_in(so[21]), .scan_out(so[22]), .l1clk(l1clk_in), .d(din[18]), .latout(xx0_unused[22]), .q_l(xx_unused[22]), .q(din_d1[18]),
249 .siclk(siclk),
250 .soclk(soclk));
251n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx23 (.scan_in(so[22]), .scan_out(so[23]), .l1clk(l1clk_in), .d(din[19]), .latout(xx0_unused[23]), .q_l(xx_unused[23]), .q(din_d1[19]),
252 .siclk(siclk),
253 .soclk(soclk));
254n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx24 (.scan_in(so[23]), .scan_out(so[24]), .l1clk(l1clk_out), .d(match_idx_p_array[0]), .q(match_idx[0]), .q_l(xx_unused[24]), .latout(xx0_unused[24]),
255 .siclk(siclk),
256 .soclk(soclk));
257n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx25 (.scan_in(so[24]), .scan_out(so[25]), .l1clk(l1clk_out), .d(match_idx_p_array[1]), .q(match_idx[1]), .q_l(xx_unused[25]), .latout(xx0_unused[25]),
258 .siclk(siclk),
259 .soclk(soclk));
260n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx26 (.scan_in(so[25]), .scan_out(so[26]), .l1clk(l1clk_out), .d(match_idx_p_array[2]), .q(match_idx[2]), .q_l(xx_unused[26]), .latout(xx0_unused[26]),
261 .siclk(siclk),
262 .soclk(soclk));
263n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx27 (.scan_in(so[26]), .scan_out(so[27]), .l1clk(l1clk_out), .d(match_idx_p_array[3]), .q(match_idx[3]), .q_l(xx_unused[27]), .latout(xx0_unused[27]),
264 .siclk(siclk),
265 .soclk(soclk));
266n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx28 (.scan_in(so[27]), .scan_out(so[28]), .l1clk(l1clk_in), .d(din[20]), .latout(xx0_unused[28]), .q_l(xx_unused[28]), .q(din_d1[20]),
267 .siclk(siclk),
268 .soclk(soclk));
269n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx29 (.scan_in(so[28]), .scan_out(so[29]), .l1clk(l1clk_in), .d(din[21]), .latout(xx0_unused[29]), .q_l(xx_unused[29]), .q(din_d1[21]),
270 .siclk(siclk),
271 .soclk(soclk));
272n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx30 (.scan_in(so[29]), .scan_out(so[30]), .l1clk(l1clk_in), .d(din[22]), .latout(xx0_unused[30]), .q_l(xx_unused[30]), .q(din_d1[22]),
273 .siclk(siclk),
274 .soclk(soclk));
275
276n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx31 (.scan_in(so[30]), .scan_out(so[31]), .l1clk(l1clk_in), .d(din[23]), .latout(xx0_unused[31]), .q_l(xx_unused[31]), .q(din_d1[23]),
277 .siclk(siclk),
278 .soclk(soclk));
279n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx32 (.scan_in(so[31]), .scan_out(so[32]), .l1clk(l1clk_out), .d(match_p_array[4]), .q(match[4]), .q_l(xx_unused[32]), .latout(xx0_unused[32]),
280 .siclk(siclk),
281 .soclk(soclk));
282n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx33 (.scan_in(so[32]), .scan_out(so[33]), .l1clk(l1clk_out), .d(match_p_array[5]), .q(match[5]), .q_l(xx_unused[33]), .latout(xx0_unused[33]),
283 .siclk(siclk),
284 .soclk(soclk));
285n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx34 (.scan_in(so[33]), .scan_out(so[34]), .l1clk(l1clk_out), .d(match_p_array[6]), .q(match[6]), .q_l(xx_unused[34]), .latout(xx0_unused[34]),
286 .siclk(siclk),
287 .soclk(soclk));
288n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx35 (.scan_in(so[34]), .scan_out(so[35]), .l1clk(l1clk_out), .d(match_p_array[7]), .q(match[7]), .q_l(xx_unused[35]), .latout(xx0_unused[35]),
289 .siclk(siclk),
290 .soclk(soclk));
291n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx36 (.scan_in(so[35]), .scan_out(so[36]), .l1clk(l1clk_in), .d(din[24]), .latout(xx0_unused[36]), .q_l(xx_unused[36]), .q(din_d1[24]),
292 .siclk(siclk),
293 .soclk(soclk));
294n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx37 (.scan_in(so[36]), .scan_out(so[37]), .l1clk(l1clk_in), .d(din[25]), .latout(xx0_unused[37]), .q_l(xx_unused[37]), .q(din_d1[25]),
295 .siclk(siclk),
296 .soclk(soclk));
297n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx38 (.scan_in(so[37]), .scan_out(so[38]), .l1clk(l1clk_in), .d(din[26]), .latout(xx0_unused[38]), .q_l(xx_unused[38]), .q(din_d1[26]),
298 .siclk(siclk),
299 .soclk(soclk));
300n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx39 (.scan_in(so[38]), .scan_out(so[39]), .l1clk(l1clk_in), .d(din[27]), .latout(xx0_unused[39]), .q_l(xx_unused[39]), .q(din_d1[27]),
301 .siclk(siclk),
302 .soclk(soclk));
303n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx40 (.scan_in(so[39]), .scan_out(so[40]), .l1clk(l1clk_out), .d(match_p_array[0]), .q(match[0]), .q_l(xx_unused[40]), .latout(xx0_unused[40]),
304 .siclk(siclk),
305 .soclk(soclk));
306
307n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx41 (.scan_in(so[40]), .scan_out(so[41]), .l1clk(l1clk_out), .d(match_p_array[1]), .q(match[1]), .q_l(xx_unused[41]), .latout(xx0_unused[41]),
308 .siclk(siclk),
309 .soclk(soclk));
310n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx42 (.scan_in(so[41]), .scan_out(so[42]), .l1clk(l1clk_out), .d(match_p_array[2]), .q(match[2]), .q_l(xx_unused[42]), .latout(xx0_unused[42]),
311 .siclk(siclk),
312 .soclk(soclk));
313n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx43 (.scan_in(so[42]), .scan_out(so[43]), .l1clk(l1clk_out), .d(match_p_array[3]), .q(match[3]), .q_l(xx_unused[43]), .latout(xx0_unused[43]),
314 .siclk(siclk),
315 .soclk(soclk));
316n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx44 (.scan_in(so[43]), .scan_out(so[44]), .l1clk(l1clk_in), .d(din[28]), .latout(xx0_unused[44]), .q_l(xx_unused[44]), .q(din_d1[28]),
317 .siclk(siclk),
318 .soclk(soclk));
319n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx45 (.scan_in(so[44]), .scan_out(so[45]), .l1clk(l1clk_in), .d(din[29]), .latout(xx0_unused[45]), .q_l(xx_unused[45]), .q(din_d1[29]),
320 .siclk(siclk),
321 .soclk(soclk));
322n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx46 (.scan_in(so[45]), .scan_out(so[46]), .l1clk(l1clk_in), .d(din[30]), .latout(xx0_unused[46]), .q_l(xx_unused[46]), .q(din_d1[30]),
323 .siclk(siclk),
324 .soclk(soclk));
325n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx47 (.scan_in(so[46]), .scan_out(so[47]), .l1clk(l1clk_in), .d(din[31]), .latout(xx0_unused[47]), .q_l(xx_unused[47]), .q(din_d1[31]),
326 .siclk(siclk),
327 .soclk(soclk));
328n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx48 (.scan_in(so[47]), .scan_out(so[48]), .l1clk(l1clk_in), .d(din[32]), .latout(xx0_unused[48]), .q_l(xx_unused[48]), .q(din_d1[32]),
329 .siclk(siclk),
330 .soclk(soclk));
331n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx49 (.scan_in(so[48]), .scan_out(so[49]), .l1clk(l1clk_in), .d(din[33]), .latout(xx0_unused[49]), .q_l(xx_unused[49]), .q(din_d1[33]),
332 .siclk(siclk),
333 .soclk(soclk));
334n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx50 (.scan_in(so[49]), .scan_out(so[50]), .l1clk(l1clk_in), .d(din[34]), .latout(xx0_unused[50]), .q_l(xx_unused[50]), .q(din_d1[34]),
335 .siclk(siclk),
336 .soclk(soclk));
337
338n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx51 (.scan_in(so[50]), .scan_out(so[51]), .l1clk(l1clk_in), .d(din[35]), .latout(xx0_unused[51]), .q_l(xx_unused[51]), .q(din_d1[35]),
339 .siclk(siclk),
340 .soclk(soclk));
341n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx52 (.scan_in(so[51]), .scan_out(so[52]), .l1clk(l1clk_in), .d(din[36]), .latout(xx0_unused[52]), .q_l(xx_unused[52]), .q(din_d1[36]),
342 .siclk(siclk),
343 .soclk(soclk));
344n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx53 (.scan_in(so[52]), .scan_out(so[53]), .l1clk(l1clk_in), .d(din[37]), .latout(xx0_unused[53]), .q_l(xx_unused[53]), .q(din_d1[37]),
345 .siclk(siclk),
346 .soclk(soclk));
347n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx54 (.scan_in(so[53]), .scan_out(so[54]), .l1clk(l1clk_in), .d(din[38]), .latout(xx0_unused[54]), .q_l(xx_unused[54]), .q(din_d1[38]),
348 .siclk(siclk),
349 .soclk(soclk));
350n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx55 (.scan_in(so[54]), .scan_out(so[55]), .l1clk(l1clk_in), .d(din[39]), .latout(xx0_unused[55]), .q_l(xx_unused[55]), .q(din_d1[39]),
351 .siclk(siclk),
352 .soclk(soclk));
353n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx56 (.scan_in(so[55]), .scan_out(so[56]), .l1clk(l1clk_in), .d(read_en), .latout(mb_ren_d1), .q_l(xx_unused[56]), .q(xx0_unused[56]),
354 .siclk(siclk),
355 .soclk(soclk));
356n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx57 (.scan_in(so[56]), .scan_out(so[57]), .l1clk(l1clk_in), .d(write_en), .latout(mb_wen_d1), .q_l(xx_unused[57]), .q(xx0_unused[57]),
357 .siclk(siclk),
358 .soclk(soclk));
359n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx58 (.scan_in(so[57]), .scan_out(so[58]), .l1clk(l1clk_in), .d(adr_r[0]), .latout(adr_r_d1[0]), .q_l(xx_unused[58]), .q(xx0_unused[58]),
360 .siclk(siclk),
361 .soclk(soclk));
362n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx59 (.scan_in(so[58]), .scan_out(so[59]), .l1clk(l1clk_in), .d(adr_r[1]), .latout(adr_r_d1[1]), .q_l(xx_unused[59]), .q(xx0_unused[59]),
363 .siclk(siclk),
364 .soclk(soclk));
365n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx60 (.scan_in(so[59]), .scan_out(so[60]), .l1clk(l1clk_in), .d(adr_r[2]), .latout(adr_r_d1[2]), .q_l(xx_unused[60]), .q(xx0_unused[60]),
366 .siclk(siclk),
367 .soclk(soclk));
368
369n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx61 (.scan_in(so[60]), .scan_out(so[61]), .l1clk(l1clk_in), .d(adr_r[3]), .latout(adr_r_d1[3]), .q_l(xx_unused[61]), .q(xx0_unused[61]),
370 .siclk(siclk),
371 .soclk(soclk));
372n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx62 (.scan_in(so[61]), .scan_out(so[62]), .l1clk(l1clk_in), .d(adr_w[0]), .latout(adr_w_d1[0]), .q_l(xx_unused[62]), .q(xx0_unused[62]),
373 .siclk(siclk),
374 .soclk(soclk));
375n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx63 (.scan_in(so[62]), .scan_out(so[63]), .l1clk(l1clk_in), .d(adr_w[1]), .latout(adr_w_d1[1]), .q_l(xx_unused[63]), .q(xx0_unused[63]),
376 .siclk(siclk),
377 .soclk(soclk));
378n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx64 (.scan_in(so[63]), .scan_out(so[64]), .l1clk(l1clk_in), .d(adr_w[2]), .latout(adr_w_d1[2]), .q_l(xx_unused[64]), .q(xx0_unused[64]),
379 .siclk(siclk),
380 .soclk(soclk));
381n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx65 (.scan_in(so[64]), .scan_out(so[65]), .l1clk(l1clk_in), .d(adr_w[3]), .latout(adr_w_d1[3]), .q_l(xx_unused[65]), .q(xx0_unused[65]),
382 .siclk(siclk),
383 .soclk(soclk));
384n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx66 (.scan_in(so[65]), .scan_out(so[66]), .l1clk(l1clk_in), .d(adr_r[4]), .latout(adr_r_d1[4]), .q_l(xx_unused[66]), .q(xx0_unused[66]),
385 .siclk(siclk),
386 .soclk(soclk));
387n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx67 (.scan_in(so[66]), .scan_out(so[67]), .l1clk(l1clk_in), .d(adr_r[5]), .latout(adr_r_d1[5]), .q_l(xx_unused[67]), .q(xx0_unused[67]),
388 .siclk(siclk),
389 .soclk(soclk));
390n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx68 (.scan_in(so[67]), .scan_out(so[68]), .l1clk(l1clk_in), .d(adr_r[6]), .latout(adr_r_d1[6]), .q_l(xx_unused[68]), .q(xx0_unused[68]),
391 .siclk(siclk),
392 .soclk(soclk));
393n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx69 (.scan_in(so[68]), .scan_out(so[69]), .l1clk(l1clk_in), .d(adr_r[7]), .latout(adr_r_d1[7]), .q_l(xx_unused[69]), .q(xx0_unused[69]),
394 .siclk(siclk),
395 .soclk(soclk));
396n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx70 (.scan_in(so[69]), .scan_out(so[70]), .l1clk(l1clk_in), .d(adr_w[4]), .latout(adr_w_d1[4]), .q_l(xx_unused[70]), .q(xx0_unused[70]),
397 .siclk(siclk),
398 .soclk(soclk));
399n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx71 (.scan_in(so[70]), .scan_out(so[71]), .l1clk(l1clk_in), .d(adr_w[5]), .latout(adr_w_d1[5]), .q_l(xx_unused[71]), .q(xx0_unused[71]),
400 .siclk(siclk),
401 .soclk(soclk));
402n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx72 (.scan_in(so[71]), .scan_out(so[72]), .l1clk(l1clk_in), .d(adr_w[6]), .latout(adr_w_d1[6]), .q_l(xx_unused[72]), .q(xx0_unused[72]),
403 .siclk(siclk),
404 .soclk(soclk));
405n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 xx73 (.scan_in(so[72]), .scan_out(so[73]), .l1clk(l1clk_in), .d(adr_w[7]), .latout(adr_w_d1[7]), .q_l(xx_unused[73]), .q(xx0_unused[73]),
406 .siclk(siclk),
407 .soclk(soclk));
408
409
410//mux_macro mux_dout (width=40,ports=2,mux=aonpe)
411// (
412// .dout (dout[39:0]),
413// .din0 (din_d1[39:0]),
414// .din1 (dout_array[39:0]),
415// .sel0 (tcu_array_bypass),
416// .sel1 (tcu_array_bypass_n)
417// ) ;
418assign dout = dout_array;
419 /// Memory array ////
420
421n2_com_cm_8x40_cust_array array (
422 .l1clk(l1clk_en),
423 .l1clk_mat(l1clk_mat),
424 .wr_en (mb_wen_d1),
425 .rd_en (mb_ren_d1),
426 .wr_addr(adr_w_d1[7:0]),
427 .rd_addr(adr_r_d1[7:0]),
428 .din(din_d1[39:0]),
429 .dout(dout_array[39:0]),
430 .bypass(tcu_array_bypass),
431 .write_disable(tcu_array_wr_inhibit),
432 .lookup_en(lookup_en),
433 .key(key[39:7]),
434 .match_p(match_p_array[7:0]),
435 .match_idx_p(match_idx_p_array[7:0]),
436 .l2clk(l2clk)
437 );
438
439// fixscan start:
440//assign ff_din_scanin = scan_in ;
441//assign ff_wr_en_scanin = ff_din_scanout ;
442//assign ff_wr_adr_scanin = ff_wr_en_scanout ;
443//assign ff_rd_adr_scanin = ff_wr_adr_scanout ;
444//assign ff_ren_scanin = ff_rd_adr_scanout ;
445//assign ff_tcu_array_wr_inhibit_scanin = ff_ren_scanout ;
446//assign ff_match_scanin = ff_tcu_array_wr_inhibit_scanout ;
447//assign ff_match_idx_scanin = ff_match_scanout ;
448//assign scan_out = ff_match_idx_scanout ;
449assign scan_out = so[73] ;
450// fixscan end:
451
452// synopsys translate_on
453
454endmodule
455
456
457module n2_com_cm_8x40_cust_array (
458 l1clk,
459 l2clk,
460 l1clk_mat,
461 wr_en,
462 rd_en,
463 write_disable,
464 key,
465 wr_addr,
466 rd_addr,
467 din,
468 lookup_en,
469 bypass,
470 dout,
471 match_p,
472 match_idx_p);
473
474input l1clk;
475input l2clk;
476input l1clk_mat;
477input wr_en;
478input rd_en;
479input write_disable;
480input [39:7] key;
481input [7:0] wr_addr;
482input [7:0] rd_addr;
483input [39:0] din;
484input lookup_en;
485input bypass;
486output [39:0] dout;
487output [7:0] match_p;
488output [7:0] match_idx_p;
489
490
491reg [39:0] mb_cam_data[7:0] ; // BS and SR 8 deep change 3/3/04
492reg [39:0] dout;
493reg [39:7] key_d1;
494reg lookup_en_d1 ;
495reg [39:0] tmp_addr ;
496reg [39:0] tmp_addr0 ;
497reg [39:0] tmp_addr1 ;
498reg [39:0] tmp_addr2 ;
499reg [39:0] tmp_addr3 ;
500reg [39:0] tmp_addr4 ;
501reg [39:0] tmp_addr5 ;
502reg [39:0] tmp_addr6 ;
503reg [39:0] tmp_addr7 ;
504reg [39:0] tmp_addr8 ;
505reg [39:0] tmp_addr9 ;
506reg [39:0] tmp_addr10 ;
507reg [39:0] tmp_addr11 ;
508reg [39:0] tmp_addr12 ;
509reg [39:0] tmp_addr13 ;
510reg [39:0] tmp_addr14 ;
511reg [39:0] tmp_addr15 ;
512reg [7:0] match_p;
513reg [7:0] match_idx_p;
514
515wire [39:0] mb_cam_data_0;
516wire [39:0] mb_cam_data_1;
517wire [39:0] mb_cam_data_2;
518wire [39:0] mb_cam_data_3;
519wire [39:0] mb_cam_data_4;
520wire [39:0] mb_cam_data_5;
521wire [39:0] mb_cam_data_6;
522wire [39:0] mb_cam_data_7;
523
524assign mb_cam_data_0 = mb_cam_data[0];
525assign mb_cam_data_1 = mb_cam_data[1];
526assign mb_cam_data_2 = mb_cam_data[2];
527assign mb_cam_data_3 = mb_cam_data[3];
528assign mb_cam_data_4 = mb_cam_data[4];
529assign mb_cam_data_5 = mb_cam_data[5];
530assign mb_cam_data_6 = mb_cam_data[6];
531assign mb_cam_data_7 = mb_cam_data[7];
532
533
534
535`ifndef NOINITMEM
536///////////////////////////////////////
537// Initialize the cam/arrays. //
538///////////////////////////////////////
539integer n;
540initial begin
541 for (n = 0; n < 8; n = n + 1) begin
542 mb_cam_data[n] = {40 {1'b0}};
543 end
544end
545`endif
546
547
548// CAM OPERATION
549
550
551
552always @(l1clk_mat or l2clk or write_disable or bypass or lookup_en or key) begin
553
554 if (l1clk_mat) begin
555 lookup_en_d1 <= lookup_en ;
556 key_d1 <= key;
557 end
558
559 if (~l1clk_mat & ~l2clk & lookup_en_d1 & ~(write_disable|bypass) ) begin
560
561 tmp_addr0 = mb_cam_data[0];
562 match_p[0] = ( tmp_addr0[39:7] == key_d1[39:7] ) ;
563 match_idx_p[0] = ( tmp_addr0[17:9] == key_d1[17:9] ) ;
564
565 tmp_addr1 = mb_cam_data[1];
566 match_p[1] = ( tmp_addr1[39:7] == key_d1[39:7] ) ;
567 match_idx_p[1] = ( tmp_addr1[17:9] == key_d1[17:9] ) ;
568
569 tmp_addr2 = mb_cam_data[2];
570 match_p[2] = ( tmp_addr2[39:7] == key_d1[39:7] ) ;
571 match_idx_p[2] = ( tmp_addr2[17:9] == key_d1[17:9] ) ;
572
573 tmp_addr3 = mb_cam_data[3];
574 match_p[3] = ( tmp_addr3[39:7] == key_d1[39:7] ) ;
575 match_idx_p[3] = ( tmp_addr3[17:9] == key_d1[17:9] ) ;
576
577 tmp_addr4 = mb_cam_data[4];
578 match_p[4] = ( tmp_addr4[39:7] == key_d1[39:7] ) ;
579 match_idx_p[4] = ( tmp_addr4[17:9] == key_d1[17:9] ) ;
580
581 tmp_addr5 = mb_cam_data[5];
582 match_p[5] = ( tmp_addr5[39:7] == key_d1[39:7] ) ;
583 match_idx_p[5] = ( tmp_addr5[17:9] == key_d1[17:9] ) ;
584
585 tmp_addr6 = mb_cam_data[6];
586 match_p[6] = ( tmp_addr6[39:7] == key_d1[39:7] ) ;
587 match_idx_p[6] = ( tmp_addr6[17:9] == key_d1[17:9] ) ;
588
589 tmp_addr7 = mb_cam_data[7];
590 match_p[7] = ( tmp_addr7[39:7] == key_d1[39:7] ) ;
591 match_idx_p[7] = ( tmp_addr7[17:9] == key_d1[17:9] ) ;
592 end
593 else if (~l1clk_mat & ~l2clk & (~lookup_en_d1 |write_disable|bypass) ) begin
594 match_p = 8'b0;
595 match_idx_p = 8'b0;
596 end
597 if (l1clk_mat & l2clk) begin
598 match_p = 8'b0;
599 match_idx_p = 8'b0;
600 end
601
602end
603
604// READ AND WRITE HAPPEN in Phase 1.
605
606// write_disable_d1 & reset_l_d1 are part of the
607// list because we want to enter the following
608// always block under the following condition:
609// - wr_addr , din , wr_en remain the same across the
610// rising edge of the clock
611// - write_disable or reset_l change across the rising edge of the
612// clock from high to low.
613
614always @(l1clk or rd_en or rd_addr or l2clk or wr_addr or din or wr_en or write_disable or bypass ) begin
615 begin
616 if (l1clk & l2clk & wr_en & ~(write_disable|bypass))
617 begin
618 case(wr_addr )
619 8'b0000_0000: ; // do nothing
620 8'b0000_0001: mb_cam_data[0] = din ;
621 8'b0000_0010: mb_cam_data[1] = din ;
622 8'b0000_0100: mb_cam_data[2] = din ;
623 8'b0000_1000: mb_cam_data[3] = din ;
624 8'b0001_0000: mb_cam_data[4] = din;
625 8'b0010_0000: mb_cam_data[5] = din ;
626 8'b0100_0000: mb_cam_data[6] = din ;
627 8'b1000_0000: mb_cam_data[7] = din ;
628 //8'b1111_1111:
629 // begin
630 // mb_cam_data[7] = din ;
631 // mb_cam_data[6] = din ;
632 // mb_cam_data[5] = din ;
633 // mb_cam_data[4] = din ;
634 // mb_cam_data[3] = din ;
635 // mb_cam_data[2] = din ;
636 // mb_cam_data[1] = din ;
637 // mb_cam_data[0] = din ;
638 // end
639 default: begin
640 // 0in <fire -message "FATAL ERROR: incorrect write wordline" -group mbist_mode
641 end
642 endcase
643 if(rd_en & (rd_addr == wr_addr))
644 begin
645 // 0in < known_driven -var rd_addr -message "read pointer write pointer conflict" -group mbist_mode
646 end
647 end
648 end
649
650end
651
652
653
654// reset_l_d1 has purely been added so that we enter the always
655// block when the wordline/wr_en does not change across clk cycles
656// but the reset_l does.
657// Notice reset_l_d1 is not used in any of the "if" statements.
658// Notice that the renable is qualified with l1clk to take
659// care that we do not read from the array if reset_l goes high
660// during the negative phase of l1clk.
661//
662
663always @( /*memory or*/ rd_addr or wr_addr or l1clk or l2clk
664 or rd_en or wr_en or write_disable or
665 mb_cam_data_0 or mb_cam_data_1 or mb_cam_data_2 or mb_cam_data_3
666 or mb_cam_data_4 or mb_cam_data_5 or mb_cam_data_6 or mb_cam_data_7
667 or din or bypass) begin
668 if (bypass) begin
669 dout <= din;
670 end
671 else if (rd_en & l1clk & write_disable ) begin
672// dout <= 40'hff_ffff_ffff ;
673 end
674 else if (rd_en & l1clk & ~write_disable) begin
675 if ((wr_en) && (rd_addr == wr_addr) )
676 begin
677 dout <= 40'bx ;
678// 0in < known_driven -var rd_addr -message "read pointer write pointer conflict" -group mbist_mode
679 end
680 else
681 begin
682 case(rd_addr)
683 // match sense amp ckt behavior when no read wl is selected
684 8'b0000_0000: dout <= 40'hff_ffff_ffff ;
685 8'b0000_0001: dout <= mb_cam_data_0 ;
686 8'b0000_0010: dout <= mb_cam_data_1 ;
687 8'b0000_0100: dout <= mb_cam_data_2 ;
688 8'b0000_1000: dout <= mb_cam_data_3 ;
689 8'b0001_0000: dout <= mb_cam_data_4 ;
690 8'b0010_0000: dout <= mb_cam_data_5 ;
691 8'b0100_0000: dout <= mb_cam_data_6 ;
692 8'b1000_0000: dout <= mb_cam_data_7 ;
693 default: begin
694 // 0in <fire -message "FATAL ERROR: incorrect read wordline" -group mbist_mode
695 end
696 endcase
697 end
698
699 end // of else if
700end
701endmodule
702
703
704
705
706
707
708// any PARAMS parms go into naming of macro
709
710module n2_com_cm_8x40_cust_l1clkhdr_ctl_macro (
711 l2clk,
712 l1en,
713 pce_ov,
714 stop,
715 se,
716 l1clk);
717
718
719 input l2clk;
720 input l1en;
721 input pce_ov;
722 input stop;
723 input se;
724 output l1clk;
725
726
727
728
729
730cl_sc1_l1hdr_8x c_0 (
731
732
733 .l2clk(l2clk),
734 .pce(l1en),
735 .l1clk(l1clk),
736 .se(se),
737 .pce_ov(pce_ov),
738 .stop(stop)
739);
740
741
742
743endmodule
744
745
746
747
748
749
750
751
752
753//
754// macro for cl_mc1_scm_msff_lat_{4}x flops
755//
756//
757
758
759
760
761
762module n2_com_cm_8x40_cust_scm_msff_lat_macro__width_1 (
763 d,
764 scan_in,
765 l1clk,
766 siclk,
767 soclk,
768 latout,
769 scan_out,
770 q,
771 q_l);
772input [0:0] d;
773 input scan_in;
774input l1clk;
775input siclk;
776input soclk;
777output [0:0] latout;
778 output scan_out;
779output [0:0] q;
780output [0:0] q_l;
781
782
783
784
785
786
787scm_msff_lat #(1) d0_0 (
788.d(d[0:0]),
789.si(scan_in),
790.so(scan_out),
791.l1clk(l1clk),
792.siclk(siclk),
793.soclk(soclk),
794.q(q[0:0]),
795.q_l(q_l[0:0]),
796.latout(latout[0:0])
797);
798
799
800
801
802
803
804
805
806
807
808//place::generic_place($width,$stack,$left);
809
810endmodule
811
812
813
814