Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: ncu_i2cfc_ctl.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 | `define RF_RDEN_OFFSTATE 1'b1 | |
36 | ||
37 | //==================================== | |
38 | `define NCU_INTMANRF_DEPTH 128 | |
39 | `define NCU_INTMANRF_DATAWIDTH 16 | |
40 | `define NCU_INTMANRF_ADDRWIDTH 7 | |
41 | //==================================== | |
42 | ||
43 | //==================================== | |
44 | `define NCU_MONDORF_DEPTH 64 | |
45 | `define NCU_MONDORF_DATAWIDTH 72 | |
46 | `define NCU_MONDORF_ADDRWIDTH 6 | |
47 | //==================================== | |
48 | ||
49 | //==================================== | |
50 | `define NCU_CPUBUFRF_DEPTH 32 | |
51 | `define NCU_CPUBUFRF_DATAWIDTH 144 | |
52 | `define NCU_CPUBUFRF_ADDRWIDTH 5 | |
53 | //==================================== | |
54 | ||
55 | //==================================== | |
56 | `define NCU_IOBUFRF_DEPTH 32 | |
57 | `define NCU_IOBUFRF_DATAWIDTH 144 | |
58 | `define NCU_IOBUFRF_ADDRWIDTH 5 | |
59 | //==================================== | |
60 | ||
61 | //==================================== | |
62 | `define NCU_IOBUF1RF_DEPTH 32 | |
63 | `define NCU_IOBUF1RF_DATAWIDTH 32 | |
64 | `define NCU_IOBUF1RF_ADDRWIDTH 5 | |
65 | //==================================== | |
66 | ||
67 | //==================================== | |
68 | `define NCU_INTBUFRF_DEPTH 32 | |
69 | `define NCU_INTBUFRF_DATAWIDTH 144 | |
70 | `define NCU_INTBUFRF_ADDRWIDTH 5 | |
71 | //==================================== | |
72 | ||
73 | //== fix me : need to remove when warm // | |
74 | //== becomes available // | |
75 | `define WMR_LENGTH 10'd999 | |
76 | `define WMR_LENGTH_P1 10'd1000 | |
77 | ||
78 | //// NCU CSR_MAN address 80_0000_xxxx //// | |
79 | `define NCU_CSR_MAN 16'h0000 | |
80 | `define NCU_CREG_INTMAN 16'h0000 | |
81 | //`define NCU_CREG_INTVECDISP 16'h0800 | |
82 | `define NCU_CREG_MONDOINVEC 16'h0a00 | |
83 | `define NCU_CREG_SERNUM 16'h1000 | |
84 | `define NCU_CREG_FUSESTAT 16'h1008 | |
85 | `define NCU_CREG_COREAVAIL 16'h1010 | |
86 | `define NCU_CREG_BANKAVAIL 16'h1018 | |
87 | `define NCU_CREG_BANK_ENABLE 16'h1020 | |
88 | `define NCU_CREG_BANK_ENABLE_STATUS 16'h1028 | |
89 | `define NCU_CREG_L2_HASH_ENABLE 16'h1030 | |
90 | `define NCU_CREG_L2_HASH_ENABLE_STATUS 16'h1038 | |
91 | ||
92 | ||
93 | `define NCU_CREG_MEM32_BASE 16'h2000 | |
94 | `define NCU_CREG_MEM32_MASK 16'h2008 | |
95 | `define NCU_CREG_MEM64_BASE 16'h2010 | |
96 | `define NCU_CREG_MEM64_MASK 16'h2018 | |
97 | `define NCU_CREG_IOCON_BASE 16'h2020 | |
98 | `define NCU_CREG_IOCON_MASK 16'h2028 | |
99 | `define NCU_CREG_MMUFSH 16'h2030 | |
100 | ||
101 | `define NCU_CREG_ESR 16'h3000 | |
102 | `define NCU_CREG_ELE 16'h3008 | |
103 | `define NCU_CREG_EIE 16'h3010 | |
104 | `define NCU_CREG_EJR 16'h3018 | |
105 | `define NCU_CREG_FEE 16'h3020 | |
106 | `define NCU_CREG_PER 16'h3028 | |
107 | `define NCU_CREG_SIISYN 16'h3030 | |
108 | `define NCU_CREG_NCUSYN 16'h3038 | |
109 | `define NCU_CREG_SCKSEL 16'h3040 | |
110 | `define NCU_CREG_DBGTRIG_EN 16'h4000 | |
111 | ||
112 | //// NUC CSR_MONDO address 80_0004_xxxx //// | |
113 | `define NCU_CSR_MONDO 16'h0004 | |
114 | `define NCU_CREG_MDATA0 16'h0000 | |
115 | `define NCU_CREG_MDATA1 16'h0200 | |
116 | `define NCU_CREG_MDATA0_ALIAS 16'h0400 | |
117 | `define NCU_CREG_MDATA1_ALIAS 16'h0600 | |
118 | `define NCU_CREG_MBUSY 16'h0800 | |
119 | `define NCU_CREG_MBUSY_ALIAS 16'h0a00 | |
120 | ||
121 | ||
122 | ||
123 | // ASI shared reg 90_xxxx_xxxx// | |
124 | `define NCU_ASI_A_HIT 10'h104 // 6-bits cpuid and thread id are "x" | |
125 | `define NCU_ASI_B_HIT 10'h1CC // 6-bits cpuid and thread id are "x" | |
126 | `define NCU_ASI_C_HIT 10'h114 // 6-bits cpuid and thread id are "x" | |
127 | `define NCU_ASI_COREAVAIL 16'h0000 | |
128 | `define NCU_ASI_CORE_ENABLE_STATUS 16'h0010 | |
129 | `define NCU_ASI_CORE_ENABLE 16'h0020 | |
130 | `define NCU_ASI_XIR_STEERING 16'h0030 | |
131 | `define NCU_ASI_CORE_RUNNINGRW 16'h0050 | |
132 | `define NCU_ASI_CORE_RUNNING_STATUS 16'h0058 | |
133 | `define NCU_ASI_CORE_RUNNING_W1S 16'h0060 | |
134 | `define NCU_ASI_CORE_RUNNING_W1C 16'h0068 | |
135 | `define NCU_ASI_INTVECDISP 16'h0000 | |
136 | `define NCU_ASI_ERR_STR 16'h1000 | |
137 | `define NCU_ASI_WMR_VEC_MASK 16'h0018 | |
138 | `define NCU_ASI_CMP_TICK_ENABLE 16'h0038 | |
139 | ||
140 | ||
141 | //// UCB packet type //// | |
142 | `define UCB_READ_NACK 4'b0000 // ack/nack types | |
143 | `define UCB_READ_ACK 4'b0001 | |
144 | `define UCB_WRITE_ACK 4'b0010 | |
145 | `define UCB_IFILL_ACK 4'b0011 | |
146 | `define UCB_IFILL_NACK 4'b0111 | |
147 | ||
148 | `define UCB_READ_REQ 4'b0100 // req types | |
149 | `define UCB_WRITE_REQ 4'b0101 | |
150 | `define UCB_IFILL_REQ 4'b0110 | |
151 | ||
152 | `define UCB_INT 4'b1000 // plain interrupt | |
153 | `define UCB_INT_VEC 4'b1100 // interrupt with vector | |
154 | `define UCB_INT_SOC_UE 4'b1001 // soc interrup ue | |
155 | `define UCB_INT_SOC_CE 4'b1010 // soc interrup ce | |
156 | `define UCB_RESET_VEC 4'b0101 // reset with vector | |
157 | `define UCB_IDLE_VEC 4'b1110 // idle with vector | |
158 | `define UCB_RESUME_VEC 4'b1111 // resume with vector | |
159 | ||
160 | `define UCB_INT_SOC 4'b1101 // soc interrup ce | |
161 | ||
162 | ||
163 | //// PCX packet type //// | |
164 | `define PCX_LOAD_RQ 5'b00000 | |
165 | `define PCX_IMISS_RQ 5'b10000 | |
166 | `define PCX_STORE_RQ 5'b00001 | |
167 | `define PCX_FWD_RQs 5'b01101 | |
168 | `define PCX_FWD_RPYs 5'b01110 | |
169 | ||
170 | //// CPX packet type //// | |
171 | //`define CPX_LOAD_RET 4'b0000 | |
172 | `define CPX_LOAD_RET 4'b1000 | |
173 | `define CPX_ST_ACK 4'b0100 | |
174 | //`define CPX_IFILL_RET 4'b0001 | |
175 | `define CPX_IFILL_RET 4'b1001 | |
176 | `define CPX_INT_RET 4'b0111 | |
177 | `define CPX_INT_SOC 4'b1101 | |
178 | //`define CPX_FWD_RQ_RET 4'b1010 | |
179 | //`define CPX_FWD_RPY_RET 4'b1011 | |
180 | ||
181 | ||
182 | ||
183 | ||
184 | //// Global CSR decode //// | |
185 | `define NCU_CSR 8'h80 | |
186 | `define NIU_CSR 8'h81 | |
187 | //`define RNG_CSR 8'h82 | |
188 | `define DBG1_CSR 8'h86 | |
189 | `define CCU_CSR 8'h83 | |
190 | `define MCU_CSR 8'h84 | |
191 | `define TCU_CSR 8'h85 | |
192 | `define DMU_CSR 8'h88 | |
193 | `define RCU_CSR 8'h89 | |
194 | `define NCU_ASI 8'h90 | |
195 | /////8'h91 ~ 9F reserved | |
196 | /////8'hA0 ~ BF L2 CSR//// | |
197 | `define DMU_PIO 4'hC // C0 ~ CF | |
198 | /////8'hB0 ~ FE reserved | |
199 | `define SSI_CSR 8'hFF | |
200 | ||
201 | ||
202 | //// NCU_SSI //// | |
203 | `define SSI_ADDR 12'hFF_F | |
204 | `define SSI_ADDR_TIMEOUT_REG 40'hFF_0001_0088 | |
205 | `define SSI_ADDR_LOG_REG 40'hFF_0000_0018 | |
206 | ||
207 | `define IF_IDLE 2'b00 | |
208 | `define IF_ACPT 2'b01 | |
209 | `define IF_DROP 2'b10 | |
210 | ||
211 | `define SSI_IDLE 3'b000 | |
212 | `define SSI_REQ 3'b001 | |
213 | `define SSI_WDATA 3'b011 | |
214 | `define SSI_REQ_PAR 3'b101 | |
215 | `define SSI_ACK 3'b111 | |
216 | `define SSI_RDATA 3'b110 | |
217 | `define SSI_ACK_PAR 3'b010 | |
218 | ||
219 | ||
220 | ||
221 | ||
222 | ||
223 | ||
224 | ||
225 | ||
226 | ||
227 | ||
228 | module ncu_i2cfc_ctl ( | |
229 | l2clk, | |
230 | cmp_io_sync_en, | |
231 | io_cmp_sync_en, | |
232 | scan_in, | |
233 | scan_out, | |
234 | tcu_pce_ov, | |
235 | tcu_clk_stop, | |
236 | tcu_scan_en, | |
237 | tcu_aclk, | |
238 | tcu_bclk, | |
239 | cpx_ncu_grant_cx, | |
240 | intbuf_cpx_req, | |
241 | iobuf_cpx_req, | |
242 | ncu_cpx_req_next, | |
243 | intbuf_sel_next, | |
244 | iobuf_sel_next, | |
245 | intbuf_rd, | |
246 | iobuf_rd, | |
247 | iobuf_vld, | |
248 | io_pa_ld, | |
249 | io_pas, | |
250 | intbuf_vld, | |
251 | int_pa_ld, | |
252 | int_pas, | |
253 | iobuf_dout_d1_ue, | |
254 | intbuf_dout_d1_ue, | |
255 | intbuf_hit_hwm, | |
256 | iobuf_tail_s, | |
257 | iobuf_head_f, | |
258 | intbuf_wr2i2c, | |
259 | intbuf_tail_ptr, | |
260 | intbuf_head_ptr, | |
261 | mb0_raddr, | |
262 | mb0_waddr, | |
263 | mb0_intbuf_rd_en, | |
264 | mb0_iobuf_rd_en, | |
265 | mb0_run, | |
266 | iobuf_head_ptr, | |
267 | iobuf_rden, | |
268 | intbuf_rden) ; | |
269 | wire [7:0] cpx_buf_full; | |
270 | wire [7:0] cpx_ncu_grant; | |
271 | wire cpx_ncu_grant_ff_scanin; | |
272 | wire cpx_ncu_grant_ff_scanout; | |
273 | wire l1clk; | |
274 | wire cpx_cnt0_plus1_sel; | |
275 | wire cpx_cnt0_minus1_sel; | |
276 | wire [1:0] cpx_cnt0_plus1; | |
277 | wire [1:0] cpx_cnt0; | |
278 | wire [1:0] cpx_cnt0_minus1; | |
279 | wire cpx_cnt0_ff_scanin; | |
280 | wire cpx_cnt0_ff_scanout; | |
281 | wire cpx_cnt1_plus1_sel; | |
282 | wire cpx_cnt1_minus1_sel; | |
283 | wire [1:0] cpx_cnt1_plus1; | |
284 | wire [1:0] cpx_cnt1; | |
285 | wire [1:0] cpx_cnt1_minus1; | |
286 | wire cpx_cnt1_ff_scanin; | |
287 | wire cpx_cnt1_ff_scanout; | |
288 | wire cpx_cnt2_plus1_sel; | |
289 | wire cpx_cnt2_minus1_sel; | |
290 | wire [1:0] cpx_cnt2_plus1; | |
291 | wire [1:0] cpx_cnt2; | |
292 | wire [1:0] cpx_cnt2_minus1; | |
293 | wire cpx_cnt2_ff_scanin; | |
294 | wire cpx_cnt2_ff_scanout; | |
295 | wire cpx_cnt3_plus1_sel; | |
296 | wire cpx_cnt3_minus1_sel; | |
297 | wire [1:0] cpx_cnt3_plus1; | |
298 | wire [1:0] cpx_cnt3; | |
299 | wire [1:0] cpx_cnt3_minus1; | |
300 | wire cpx_cnt3_ff_scanin; | |
301 | wire cpx_cnt3_ff_scanout; | |
302 | wire cpx_cnt4_plus1_sel; | |
303 | wire cpx_cnt4_minus1_sel; | |
304 | wire [1:0] cpx_cnt4_plus1; | |
305 | wire [1:0] cpx_cnt4; | |
306 | wire [1:0] cpx_cnt4_minus1; | |
307 | wire cpx_cnt4_ff_scanin; | |
308 | wire cpx_cnt4_ff_scanout; | |
309 | wire cpx_cnt5_plus1_sel; | |
310 | wire cpx_cnt5_minus1_sel; | |
311 | wire [1:0] cpx_cnt5_plus1; | |
312 | wire [1:0] cpx_cnt5; | |
313 | wire [1:0] cpx_cnt5_minus1; | |
314 | wire cpx_cnt5_ff_scanin; | |
315 | wire cpx_cnt5_ff_scanout; | |
316 | wire cpx_cnt6_plus1_sel; | |
317 | wire cpx_cnt6_minus1_sel; | |
318 | wire [1:0] cpx_cnt6_plus1; | |
319 | wire [1:0] cpx_cnt6; | |
320 | wire [1:0] cpx_cnt6_minus1; | |
321 | wire cpx_cnt6_ff_scanin; | |
322 | wire cpx_cnt6_ff_scanout; | |
323 | wire cpx_cnt7_plus1_sel; | |
324 | wire cpx_cnt7_minus1_sel; | |
325 | wire [1:0] cpx_cnt7_plus1; | |
326 | wire [1:0] cpx_cnt7; | |
327 | wire [1:0] cpx_cnt7_minus1; | |
328 | wire cpx_cnt7_ff_scanin; | |
329 | wire cpx_cnt7_ff_scanout; | |
330 | wire [5:0] intbuf_tail_plus; | |
331 | wire [5:0] intbuf_tail; | |
332 | wire intbuf_tail_ff_scanin; | |
333 | wire intbuf_tail_ff_scanout; | |
334 | wire [5:0] intbuf_tail_plus10; | |
335 | wire [5:0] intbuf_head; | |
336 | wire intbuf_head_d1_ff_scanin; | |
337 | wire intbuf_head_d1_ff_scanout; | |
338 | wire [5:0] intbuf_head_d1; | |
339 | wire int_pipe_full; | |
340 | wire int_aov; | |
341 | wire int_pav; | |
342 | wire int_pbv; | |
343 | wire intbuf_head_inc; | |
344 | wire int_aog; | |
345 | wire intrd; | |
346 | wire int_aog_ff_scanin; | |
347 | wire int_aog_ff_scanout; | |
348 | wire int_aov_next; | |
349 | wire int_aov_ff_scanin; | |
350 | wire int_aov_ff_scanout; | |
351 | wire int_pav_ff_scanin; | |
352 | wire int_pav_ff_scanout; | |
353 | wire int_pb_ld; | |
354 | wire int_pbv_ff_scanin; | |
355 | wire int_pbv_ff_scanout; | |
356 | wire int_pbs_next; | |
357 | wire int_pbs_ff_scanin; | |
358 | wire int_pbs_ff_scanout; | |
359 | wire int_pbs; | |
360 | wire int_mov; | |
361 | wire intbuf_vld_next; | |
362 | wire intbuf_vld_ff_scanin; | |
363 | wire intbuf_vld_ff_scanout; | |
364 | wire iobuf_tail_ff_scanin; | |
365 | wire iobuf_tail_ff_scanout; | |
366 | wire [5:0] iobuf_tail; | |
367 | wire iobuf_head_d1_ff_scanin; | |
368 | wire iobuf_head_d1_ff_scanout; | |
369 | wire [5:0] iobuf_head_d1; | |
370 | wire [5:0] iobuf_head; | |
371 | wire iobuf_head_f_ff_scanin; | |
372 | wire iobuf_head_f_ff_scanout; | |
373 | wire io_pipe_full; | |
374 | wire io_aov; | |
375 | wire io_pav; | |
376 | wire io_pbv; | |
377 | wire iobuf_head_inc; | |
378 | wire io_aog; | |
379 | wire iord; | |
380 | wire io_aog_ff_scanin; | |
381 | wire io_aog_ff_scanout; | |
382 | wire io_aov_next; | |
383 | wire io_aov_ff_scanin; | |
384 | wire io_aov_ff_scanout; | |
385 | wire io_pav_ff_scanin; | |
386 | wire io_pav_ff_scanout; | |
387 | wire io_pb_ld; | |
388 | wire io_pbv_ff_scanin; | |
389 | wire io_pbv_ff_scanout; | |
390 | wire io_pbs_next; | |
391 | wire io_pbs_ff_scanin; | |
392 | wire io_pbs_ff_scanout; | |
393 | wire io_pbs; | |
394 | wire io_mov; | |
395 | wire iobuf_vld_next; | |
396 | wire iobuf_vld_ff_scanin; | |
397 | wire iobuf_vld_ff_scanout; | |
398 | wire siclk; | |
399 | wire soclk; | |
400 | wire se; | |
401 | wire pce_ov; | |
402 | wire stop; | |
403 | ||
404 | ||
405 | //////////////////////////////////////////////////////////////////////// | |
406 | // Signal declarations | |
407 | //////////////////////////////////////////////////////////////////////// | |
408 | // Global interface | |
409 | input l2clk; | |
410 | input cmp_io_sync_en; | |
411 | input io_cmp_sync_en; | |
412 | input scan_in; | |
413 | output scan_out; | |
414 | input tcu_pce_ov; | |
415 | input tcu_clk_stop; | |
416 | input tcu_scan_en; | |
417 | input tcu_aclk; | |
418 | input tcu_bclk; | |
419 | ||
420 | // Crossbar interface | |
421 | input [7:0] cpx_ncu_grant_cx; | |
422 | ||
423 | ||
424 | // i2c fast datapath interface | |
425 | input [7:0] intbuf_cpx_req; | |
426 | input [7:0] iobuf_cpx_req; | |
427 | input [7:0] ncu_cpx_req_next; | |
428 | ||
429 | output intbuf_sel_next; | |
430 | output iobuf_sel_next; | |
431 | ||
432 | output intbuf_rd; | |
433 | output iobuf_rd; | |
434 | ||
435 | output iobuf_vld; | |
436 | output io_pa_ld; | |
437 | output io_pas; | |
438 | output intbuf_vld; | |
439 | output int_pa_ld; | |
440 | output int_pas; | |
441 | ||
442 | input iobuf_dout_d1_ue; | |
443 | input intbuf_dout_d1_ue; | |
444 | ||
445 | ||
446 | // c2i fast control interface | |
447 | //input cpu_mondo_rd_d2; | |
448 | //input cpu_mondo_wr_d2; | |
449 | ||
450 | output intbuf_hit_hwm; | |
451 | ||
452 | ||
453 | // i2c slow control interface | |
454 | input [5:0] iobuf_tail_s; | |
455 | output [5:0] iobuf_head_f; | |
456 | ||
457 | ||
458 | // interrupt table read result buffer interface | |
459 | input intbuf_wr2i2c; | |
460 | output [4:0] intbuf_tail_ptr; | |
461 | output [4:0] intbuf_head_ptr; | |
462 | ||
463 | // mb0 signals // | |
464 | input [4:0] mb0_raddr; | |
465 | input [4:0] mb0_waddr; | |
466 | //input mb0_intbuf_sel; | |
467 | //input mb0_intbuf_wr_en; | |
468 | input mb0_intbuf_rd_en; | |
469 | //input mb0_iobuf_sel; | |
470 | input mb0_iobuf_rd_en; | |
471 | input mb0_run; | |
472 | ||
473 | // IO buffer interface | |
474 | output [4:0] iobuf_head_ptr; | |
475 | output iobuf_rden; | |
476 | output intbuf_rden; | |
477 | ||
478 | // Internal signals | |
479 | // interrupt buffer head and tail //// | |
480 | //// | |
481 | //// | |
482 | ||
483 | ||
484 | //////////////////////////////////////////////////////////////////////// | |
485 | // Code starts here | |
486 | //////////////////////////////////////////////////////////////////////// | |
487 | /************************************************************ | |
488 | * IO-to-CPX Mux Control | |
489 | ************************************************************/ | |
490 | // Generate mux selects | |
491 | assign intbuf_sel_next = ~|(cpx_buf_full[7:0] & ~cpx_ncu_grant[7:0] & intbuf_cpx_req[7:0]) & | |
492 | intbuf_vld & | |
493 | ~intbuf_dout_d1_ue ; | |
494 | ||
495 | assign iobuf_sel_next = ~|(cpx_buf_full[7:0] & ~cpx_ncu_grant[7:0] & iobuf_cpx_req[7:0]) & | |
496 | ~intbuf_sel_next & iobuf_vld & | |
497 | ~iobuf_dout_d1_ue ; | |
498 | ||
499 | ||
500 | /************************************************************ | |
501 | * Flop grant from CPX | |
502 | ************************************************************/ | |
503 | ncu_i2cfc_ctl_msff_ctl_macro__width_8 cpx_ncu_grant_ff | |
504 | ( | |
505 | .scan_in(cpx_ncu_grant_ff_scanin), | |
506 | .scan_out(cpx_ncu_grant_ff_scanout), | |
507 | .dout (cpx_ncu_grant[7:0]), | |
508 | .l1clk (l1clk), | |
509 | .din (cpx_ncu_grant_cx[7:0]), | |
510 | .siclk(siclk), | |
511 | .soclk(soclk) | |
512 | ); | |
513 | ||
514 | ||
515 | /************************************************************ | |
516 | * Counters to keep track of each CPX's buffer level | |
517 | ************************************************************/ | |
518 | ||
519 | /***********************/ | |
520 | /***** CPX0 Count ******/ | |
521 | /***********************/ | |
522 | //i2c_cpx_cnt count0 ( .clk(l2clk), .ncu_cpx_req_next(ncu_cpx_req_next[0]), | |
523 | // .cpx_ncu_grant(cpx_ncu_grant[0]), .cpx_buf_full(cpx_buf_full[0])); | |
524 | reg [1:0] cpx_cnt0_next; | |
525 | // Assertion: request cannot be asserted if count is 2 | |
526 | // grant cannot be asserted if count is 0 | |
527 | assign cpx_cnt0_plus1_sel = ncu_cpx_req_next[0] & ~cpx_ncu_grant[0]; | |
528 | assign cpx_cnt0_minus1_sel = cpx_ncu_grant[0] & ~ncu_cpx_req_next[0]; | |
529 | assign cpx_cnt0_plus1[1:0] = cpx_cnt0[1:0] + 2'b01; | |
530 | assign cpx_cnt0_minus1[1:0] = cpx_cnt0[1:0] - 2'b01; | |
531 | always @(cpx_cnt0 or cpx_cnt0_minus1 or cpx_cnt0_minus1_sel or | |
532 | cpx_cnt0_plus1 or cpx_cnt0_plus1_sel) | |
533 | case ({cpx_cnt0_minus1_sel,cpx_cnt0_plus1_sel}) // 0in case -parallel -full | |
534 | 2'b01 : cpx_cnt0_next[1:0] = cpx_cnt0_plus1[1:0]; | |
535 | 2'b10 : cpx_cnt0_next[1:0] = cpx_cnt0_minus1[1:0]; | |
536 | default : cpx_cnt0_next[1:0] = cpx_cnt0[1:0]; | |
537 | endcase //case(cpx_cnt_plus1_sel,cpx_cnt_minus1_sel) | |
538 | ||
539 | ncu_i2cfc_ctl_msff_ctl_macro__width_2 cpx_cnt0_ff | |
540 | ( | |
541 | .scan_in(cpx_cnt0_ff_scanin), | |
542 | .scan_out(cpx_cnt0_ff_scanout), | |
543 | .dout (cpx_cnt0[1:0]), | |
544 | .l1clk (l1clk), | |
545 | .din (cpx_cnt0_next[1:0]), | |
546 | .siclk(siclk), | |
547 | .soclk(soclk) | |
548 | ); | |
549 | ||
550 | assign cpx_buf_full[0] = cpx_cnt0[1]; | |
551 | ||
552 | ||
553 | /***********************/ | |
554 | /***** CPX1 Count ******/ | |
555 | /***********************/ | |
556 | //i2c_cpx_cnt count1 ( .clk(l2clk), .ncu_cpx_req_next(ncu_cpx_req_next[1]), | |
557 | // .cpx_ncu_grant(cpx_ncu_grant[1]), .cpx_buf_full(cpx_buf_full[1])); | |
558 | reg [1:0] cpx_cnt1_next; | |
559 | // Assertion: request cannot be asserted if count is 2 | |
560 | // grant cannot be asserted if count is 0 | |
561 | assign cpx_cnt1_plus1_sel = ncu_cpx_req_next[1] & ~cpx_ncu_grant[1]; | |
562 | assign cpx_cnt1_minus1_sel = cpx_ncu_grant[1] & ~ncu_cpx_req_next[1]; | |
563 | assign cpx_cnt1_plus1[1:0] = cpx_cnt1[1:0] + 2'b01; | |
564 | assign cpx_cnt1_minus1[1:0] = cpx_cnt1[1:0] - 2'b01; | |
565 | always @(cpx_cnt1 or cpx_cnt1_minus1 or cpx_cnt1_minus1_sel or | |
566 | cpx_cnt1_plus1 or cpx_cnt1_plus1_sel) | |
567 | case ({cpx_cnt1_minus1_sel,cpx_cnt1_plus1_sel}) // 0in case -parallel -full | |
568 | 2'b01 : cpx_cnt1_next[1:0] = cpx_cnt1_plus1[1:0]; | |
569 | 2'b10 : cpx_cnt1_next[1:0] = cpx_cnt1_minus1[1:0]; | |
570 | default : cpx_cnt1_next[1:0] = cpx_cnt1[1:0]; | |
571 | endcase //case(cpx_cnt_plus1_sel,cpx_cnt_minus1_sel) | |
572 | ||
573 | ncu_i2cfc_ctl_msff_ctl_macro__width_2 cpx_cnt1_ff | |
574 | ( | |
575 | .scan_in(cpx_cnt1_ff_scanin), | |
576 | .scan_out(cpx_cnt1_ff_scanout), | |
577 | .dout (cpx_cnt1[1:0]), | |
578 | .l1clk (l1clk), | |
579 | .din (cpx_cnt1_next[1:0]), | |
580 | .siclk(siclk), | |
581 | .soclk(soclk) | |
582 | ); | |
583 | ||
584 | assign cpx_buf_full[1] = cpx_cnt1[1]; | |
585 | ||
586 | ||
587 | /***********************/ | |
588 | /***** CPX2 Count ******/ | |
589 | /***********************/ | |
590 | //i2c_cpx_cnt count2 ( .clk(l2clk), .ncu_cpx_req_next(ncu_cpx_req_next[2]), | |
591 | // .cpx_ncu_grant(cpx_ncu_grant[2]), .cpx_buf_full(cpx_buf_full[2])); | |
592 | reg [1:0] cpx_cnt2_next; | |
593 | // Assertion: request cannot be asserted if count is 2 | |
594 | // grant cannot be asserted if count is 0 | |
595 | assign cpx_cnt2_plus1_sel = ncu_cpx_req_next[2] & ~cpx_ncu_grant[2]; | |
596 | assign cpx_cnt2_minus1_sel = cpx_ncu_grant[2] & ~ncu_cpx_req_next[2]; | |
597 | assign cpx_cnt2_plus1[1:0] = cpx_cnt2[1:0] + 2'b01; | |
598 | assign cpx_cnt2_minus1[1:0] = cpx_cnt2[1:0] - 2'b01; | |
599 | always @(cpx_cnt2 or cpx_cnt2_minus1 or cpx_cnt2_minus1_sel or | |
600 | cpx_cnt2_plus1 or cpx_cnt2_plus1_sel) | |
601 | case ({cpx_cnt2_minus1_sel,cpx_cnt2_plus1_sel}) // 0in case -parallel -full | |
602 | 2'b01 : cpx_cnt2_next[1:0] = cpx_cnt2_plus1[1:0]; | |
603 | 2'b10 : cpx_cnt2_next[1:0] = cpx_cnt2_minus1[1:0]; | |
604 | default : cpx_cnt2_next[1:0] = cpx_cnt2[1:0]; | |
605 | endcase //case(cpx_cnt_plus1_sel,cpx_cnt_minus1_sel) | |
606 | ||
607 | ncu_i2cfc_ctl_msff_ctl_macro__width_2 cpx_cnt2_ff | |
608 | ( | |
609 | .scan_in(cpx_cnt2_ff_scanin), | |
610 | .scan_out(cpx_cnt2_ff_scanout), | |
611 | .dout (cpx_cnt2[1:0]), | |
612 | .l1clk (l1clk), | |
613 | .din (cpx_cnt2_next[1:0]), | |
614 | .siclk(siclk), | |
615 | .soclk(soclk) | |
616 | ); | |
617 | ||
618 | assign cpx_buf_full[2] = cpx_cnt2[1]; | |
619 | ||
620 | ||
621 | /***********************/ | |
622 | //***** CPX3 Count *****/ | |
623 | /***********************/ | |
624 | //i2c_cpx_cnt count3 ( .clk(l2clk), .ncu_cpx_req_next(ncu_cpx_req_next[3]), | |
625 | // .cpx_ncu_grant(cpx_ncu_grant[3]), .cpx_buf_full(cpx_buf_full[3])); | |
626 | reg [1:0] cpx_cnt3_next; | |
627 | // Assertion: request cannot be asserted if count is 2 | |
628 | // grant cannot be asserted if count is 0 | |
629 | assign cpx_cnt3_plus1_sel = ncu_cpx_req_next[3] & ~cpx_ncu_grant[3]; | |
630 | assign cpx_cnt3_minus1_sel = cpx_ncu_grant[3] & ~ncu_cpx_req_next[3]; | |
631 | assign cpx_cnt3_plus1[1:0] = cpx_cnt3[1:0] + 2'b01; | |
632 | assign cpx_cnt3_minus1[1:0] = cpx_cnt3[1:0] - 2'b01; | |
633 | always @(cpx_cnt3 or cpx_cnt3_minus1 or cpx_cnt3_minus1_sel or | |
634 | cpx_cnt3_plus1 or cpx_cnt3_plus1_sel) | |
635 | case ({cpx_cnt3_minus1_sel,cpx_cnt3_plus1_sel}) // 0in case -parallel -full | |
636 | 2'b01 : cpx_cnt3_next[1:0] = cpx_cnt3_plus1[1:0]; | |
637 | 2'b10 : cpx_cnt3_next[1:0] = cpx_cnt3_minus1[1:0]; | |
638 | default : cpx_cnt3_next[1:0] = cpx_cnt3[1:0]; | |
639 | endcase //case(cpx_cnt_plus1_sel,cpx_cnt_minus1_sel) | |
640 | ||
641 | ncu_i2cfc_ctl_msff_ctl_macro__width_2 cpx_cnt3_ff | |
642 | ( | |
643 | .scan_in(cpx_cnt3_ff_scanin), | |
644 | .scan_out(cpx_cnt3_ff_scanout), | |
645 | .dout (cpx_cnt3[1:0]), | |
646 | .l1clk (l1clk), | |
647 | .din (cpx_cnt3_next[1:0]), | |
648 | .siclk(siclk), | |
649 | .soclk(soclk) | |
650 | ); | |
651 | ||
652 | assign cpx_buf_full[3] = cpx_cnt3[1]; | |
653 | ||
654 | ||
655 | /***********************/ | |
656 | /***** CPX4 Count ******/ | |
657 | /***********************/ | |
658 | //i2c_cpx_cnt count4 ( .clk(l2clk), .ncu_cpx_req_next(ncu_cpx_req_next[4]), | |
659 | // .cpx_ncu_grant(cpx_ncu_grant[4]), .cpx_buf_full(cpx_buf_full[4])); | |
660 | reg [1:0] cpx_cnt4_next; | |
661 | // Assertion: request cannot be asserted if count is 2 | |
662 | // grant cannot be asserted if count is 0 | |
663 | assign cpx_cnt4_plus1_sel = ncu_cpx_req_next[4] & ~cpx_ncu_grant[4]; | |
664 | assign cpx_cnt4_minus1_sel = cpx_ncu_grant[4] & ~ncu_cpx_req_next[4]; | |
665 | assign cpx_cnt4_plus1[1:0] = cpx_cnt4[1:0] + 2'b01; | |
666 | assign cpx_cnt4_minus1[1:0] = cpx_cnt4[1:0] - 2'b01; | |
667 | always @(cpx_cnt4 or cpx_cnt4_minus1 or cpx_cnt4_minus1_sel or | |
668 | cpx_cnt4_plus1 or cpx_cnt4_plus1_sel) | |
669 | case ({cpx_cnt4_minus1_sel,cpx_cnt4_plus1_sel}) // 0in case -parallel -full | |
670 | 2'b01 : cpx_cnt4_next[1:0] = cpx_cnt4_plus1[1:0]; | |
671 | 2'b10 : cpx_cnt4_next[1:0] = cpx_cnt4_minus1[1:0]; | |
672 | default : cpx_cnt4_next[1:0] = cpx_cnt4[1:0]; | |
673 | endcase //case(cpx_cnt_plus1_sel,cpx_cnt_minus1_sel) | |
674 | ||
675 | ncu_i2cfc_ctl_msff_ctl_macro__width_2 cpx_cnt4_ff | |
676 | ( | |
677 | .scan_in(cpx_cnt4_ff_scanin), | |
678 | .scan_out(cpx_cnt4_ff_scanout), | |
679 | .dout (cpx_cnt4[1:0]), | |
680 | .l1clk (l1clk), | |
681 | .din (cpx_cnt4_next[1:0]), | |
682 | .siclk(siclk), | |
683 | .soclk(soclk) | |
684 | ); | |
685 | ||
686 | assign cpx_buf_full[4] = cpx_cnt4[1]; | |
687 | ||
688 | ||
689 | ||
690 | /***********************/ | |
691 | /***** CPX5 Count ******/ | |
692 | /***********************/ | |
693 | //i2c_cpx_cnt count5 ( .clk(l2clk), .ncu_cpx_req_next(ncu_cpx_req_next[5]), | |
694 | // .cpx_ncu_grant(cpx_ncu_grant[5]), .cpx_buf_full(cpx_buf_full[5])); | |
695 | reg [1:0] cpx_cnt5_next; | |
696 | // Assertion: request cannot be asserted if count is 2 | |
697 | // grant cannot be asserted if count is 0 | |
698 | assign cpx_cnt5_plus1_sel = ncu_cpx_req_next[5] & ~cpx_ncu_grant[5]; | |
699 | assign cpx_cnt5_minus1_sel = cpx_ncu_grant[5] & ~ncu_cpx_req_next[5]; | |
700 | assign cpx_cnt5_plus1[1:0] = cpx_cnt5[1:0] + 2'b01; | |
701 | assign cpx_cnt5_minus1[1:0] = cpx_cnt5[1:0] - 2'b01; | |
702 | always @(cpx_cnt5 or cpx_cnt5_minus1 or cpx_cnt5_minus1_sel or | |
703 | cpx_cnt5_plus1 or cpx_cnt5_plus1_sel) | |
704 | case ({cpx_cnt5_minus1_sel,cpx_cnt5_plus1_sel}) // 0in case -parallel -full | |
705 | 2'b01 : cpx_cnt5_next[1:0] = cpx_cnt5_plus1[1:0]; | |
706 | 2'b10 : cpx_cnt5_next[1:0] = cpx_cnt5_minus1[1:0]; | |
707 | default : cpx_cnt5_next[1:0] = cpx_cnt5[1:0]; | |
708 | endcase //case(cpx_cnt_plus1_sel,cpx_cnt_minus1_sel) | |
709 | ||
710 | ncu_i2cfc_ctl_msff_ctl_macro__width_2 cpx_cnt5_ff | |
711 | ( | |
712 | .scan_in(cpx_cnt5_ff_scanin), | |
713 | .scan_out(cpx_cnt5_ff_scanout), | |
714 | .dout (cpx_cnt5[1:0]), | |
715 | .l1clk (l1clk), | |
716 | .din (cpx_cnt5_next[1:0]), | |
717 | .siclk(siclk), | |
718 | .soclk(soclk) | |
719 | ); | |
720 | ||
721 | assign cpx_buf_full[5] = cpx_cnt5[1]; | |
722 | ||
723 | ||
724 | ||
725 | /***********************/ | |
726 | /***** CPX6 Count ******/ | |
727 | /***********************/ | |
728 | //i2c_cpx_cnt count6 ( .clk(l2clk), .ncu_cpx_req_next(ncu_cpx_req_next[6]), | |
729 | // .cpx_ncu_grant(cpx_ncu_grant[6]), .cpx_buf_full(cpx_buf_full[6])); | |
730 | reg [1:0] cpx_cnt6_next; | |
731 | // Assertion: request cannot be asserted if count is 2 | |
732 | // grant cannot be asserted if count is 0 | |
733 | assign cpx_cnt6_plus1_sel = ncu_cpx_req_next[6] & ~cpx_ncu_grant[6]; | |
734 | assign cpx_cnt6_minus1_sel = cpx_ncu_grant[6] & ~ncu_cpx_req_next[6]; | |
735 | assign cpx_cnt6_plus1[1:0] = cpx_cnt6[1:0] + 2'b01; | |
736 | assign cpx_cnt6_minus1[1:0] = cpx_cnt6[1:0] - 2'b01; | |
737 | always @(cpx_cnt6 or cpx_cnt6_minus1 or cpx_cnt6_minus1_sel or | |
738 | cpx_cnt6_plus1 or cpx_cnt6_plus1_sel) | |
739 | case ({cpx_cnt6_minus1_sel,cpx_cnt6_plus1_sel}) // 0in case -parallel -full | |
740 | 2'b01 : cpx_cnt6_next[1:0] = cpx_cnt6_plus1[1:0]; | |
741 | 2'b10 : cpx_cnt6_next[1:0] = cpx_cnt6_minus1[1:0]; | |
742 | default : cpx_cnt6_next[1:0] = cpx_cnt6[1:0]; | |
743 | endcase //case(cpx_cnt_plus1_sel,cpx_cnt_minus1_sel) | |
744 | ||
745 | ncu_i2cfc_ctl_msff_ctl_macro__width_2 cpx_cnt6_ff | |
746 | ( | |
747 | .scan_in(cpx_cnt6_ff_scanin), | |
748 | .scan_out(cpx_cnt6_ff_scanout), | |
749 | .dout (cpx_cnt6[1:0]), | |
750 | .l1clk (l1clk), | |
751 | .din (cpx_cnt6_next[1:0]), | |
752 | .siclk(siclk), | |
753 | .soclk(soclk) | |
754 | ); | |
755 | ||
756 | assign cpx_buf_full[6] = cpx_cnt6[1]; | |
757 | ||
758 | ||
759 | ||
760 | /***********************/ | |
761 | /***** CPX7 Count ******/ | |
762 | /***********************/ | |
763 | //i2c_cpx_cnt count7 ( .clk(l2clk), .ncu_cpx_req_next(ncu_cpx_req_next[7]), | |
764 | // .cpx_ncu_grant(cpx_ncu_grant[7]), .cpx_buf_full(cpx_buf_full[7])); | |
765 | reg [1:0] cpx_cnt7_next; | |
766 | // Assertion: request cannot be asserted if count is 2 | |
767 | // grant cannot be asserted if count is 0 | |
768 | assign cpx_cnt7_plus1_sel = ncu_cpx_req_next[7] & ~cpx_ncu_grant[7]; | |
769 | assign cpx_cnt7_minus1_sel = cpx_ncu_grant[7] & ~ncu_cpx_req_next[7]; | |
770 | assign cpx_cnt7_plus1[1:0] = cpx_cnt7[1:0] + 2'b01; | |
771 | assign cpx_cnt7_minus1[1:0] = cpx_cnt7[1:0] - 2'b01; | |
772 | always @(cpx_cnt7 or cpx_cnt7_minus1 or cpx_cnt7_minus1_sel or | |
773 | cpx_cnt7_plus1 or cpx_cnt7_plus1_sel) | |
774 | case ({cpx_cnt7_minus1_sel,cpx_cnt7_plus1_sel}) // 0in case -parallel -full | |
775 | 2'b01 : cpx_cnt7_next[1:0] = cpx_cnt7_plus1[1:0]; | |
776 | 2'b10 : cpx_cnt7_next[1:0] = cpx_cnt7_minus1[1:0]; | |
777 | default : cpx_cnt7_next[1:0] = cpx_cnt7[1:0]; | |
778 | endcase //case(cpx_cnt_plus1_sel,cpx_cnt_minus1_sel) | |
779 | ||
780 | ncu_i2cfc_ctl_msff_ctl_macro__width_2 cpx_cnt7_ff | |
781 | ( | |
782 | .scan_in(cpx_cnt7_ff_scanin), | |
783 | .scan_out(cpx_cnt7_ff_scanout), | |
784 | .dout (cpx_cnt7[1:0]), | |
785 | .l1clk (l1clk), | |
786 | .din (cpx_cnt7_next[1:0]), | |
787 | .siclk(siclk), | |
788 | .soclk(soclk) | |
789 | ); | |
790 | ||
791 | assign cpx_buf_full[7] = cpx_cnt7[1]; | |
792 | ||
793 | ||
794 | ||
795 | /************************************************************ | |
796 | * Interrupt Status Table Read Result Buffer Control | |
797 | * An 16 deep buffer to store interrupt table read results. | |
798 | * | |
799 | * __decode int stat table read | |
800 | * flop req | | |
801 | * | | __read int stat table here | |
802 | * | | | | |
803 | * | | | __flop read result | |
804 | * | | | | | |
805 | * | | | | __tail pointer increment | |
806 | * | | | | | | |
807 | * | | | | | compute hwm __stall sent here | |
808 | * | | | | | | | | |
809 | * V V V V d2 V V V | |
810 | * PQ PA PX1 rptr PX2 C1 C2 C3 C4 C5 rptr | |
811 | * PQ PA PX1 rptr PX2 C1 C2 C3 C4 C5 rptr | |
812 | * PQ PA PX1 rptr PX2 C1 C2 C3 C4 | |
813 | * PQ PA PX1 rptr PX2 C1 C2 C3 | |
814 | * PQ PA PX1 rptr PX2 C1 C2 | |
815 | * PQ PA PX1 rptr PX2 C1 | |
816 | * PQ PA PX1 rptr PX2 | |
817 | * PQ PA PX1 rptr | |
818 | * PQ PA PX1 rptr | |
819 | * PQ PA PX1 rptr | |
820 | * PQ PA PX1 | |
821 | * --> PQ | |
822 | * | | |
823 | * | | |
824 | * packet in this PQ is stalled | |
825 | * | |
826 | * When stall is signalled, there can potentially be 10 packets in C4, C3, | |
827 | * C2, C1, PX2, rptr, PX1, PA, PQ, and PQ-1 that need to be queued in the CPU shared buffer. | |
828 | ************************************************************/ | |
829 | //assign cpu_mondo_rdwr_d2 = cpu_mondo_rd_d2 | cpu_mondo_wr_d2; | |
830 | //assign intbuf_wr = cpu_mondo_rdwr_d2; | |
831 | ||
832 | // Tail pointer to interrupt table read result buffer | |
833 | assign intbuf_tail_plus[5:0] = intbuf_tail[5:0] + 6'd1; | |
834 | assign intbuf_tail_ptr[4:0] = mb0_run ? mb0_waddr[4:0] : intbuf_tail[4:0]; | |
835 | ncu_i2cfc_ctl_msff_ctl_macro__en_1__width_6 intbuf_tail_ff | |
836 | ( | |
837 | .scan_in(intbuf_tail_ff_scanin), | |
838 | .scan_out(intbuf_tail_ff_scanout), | |
839 | .dout (intbuf_tail[5:0]), | |
840 | .l1clk (l1clk), | |
841 | .en (intbuf_wr2i2c), | |
842 | .din (intbuf_tail_plus[5:0]), | |
843 | .siclk(siclk), | |
844 | .soclk(soclk) | |
845 | ); | |
846 | ||
847 | assign intbuf_tail_plus10[5:0] = intbuf_tail[5:0] + 6'd8; | |
848 | assign intbuf_hit_hwm = ((intbuf_tail_plus10[5] != intbuf_head[5]) & | |
849 | (intbuf_tail_plus10[4:0] >= intbuf_head[4:0])) | | |
850 | ((intbuf_tail_plus10[5] == intbuf_head[5]) & | |
851 | (intbuf_tail_plus10[4:0] <= intbuf_head[4:0])); | |
852 | ||
853 | ||
854 | /************************************************************ | |
855 | * INT Buffer Control | |
856 | ************************************************************/ | |
857 | ncu_i2cfc_ctl_msff_ctl_macro__width_6 intbuf_head_d1_ff | |
858 | ( | |
859 | .scan_in(intbuf_head_d1_ff_scanin), | |
860 | .scan_out(intbuf_head_d1_ff_scanout), | |
861 | .dout (intbuf_head_d1[5:0]), | |
862 | .l1clk (l1clk), | |
863 | .din (intbuf_head[5:0]), | |
864 | .siclk(siclk), | |
865 | .soclk(soclk) | |
866 | ); | |
867 | ||
868 | //assign mb0_intbuf_sel = mb0_run & mb0_intbuf_rd_en; | |
869 | assign intbuf_head_ptr[4:0] = mb0_run ? mb0_raddr[4:0] : intbuf_head[4:0]; | |
870 | ||
871 | assign int_pipe_full = ~int_aov ? (int_pav & int_pbv & intbuf_vld) : | |
872 | ~int_pav ? (int_pbv & intbuf_vld) : | |
873 | ~int_pbv ? (intbuf_vld) : 1'b1 ; | |
874 | ||
875 | assign intbuf_head_inc = int_aog & (intrd | ~int_pipe_full) ; | |
876 | assign intbuf_head[5:0] = intbuf_head_inc ? intbuf_head_d1[5:0]+6'h01 : intbuf_head_d1[5:0] ; | |
877 | ||
878 | assign intbuf_rden = mb0_run ? mb0_intbuf_rd_en : (intbuf_tail[4:0] != intbuf_head[4:0]) ; | |
879 | ncu_i2cfc_ctl_msff_ctl_macro__width_1 int_aog_ff | |
880 | ( | |
881 | .scan_in(int_aog_ff_scanin), | |
882 | .scan_out(int_aog_ff_scanout), | |
883 | .dout (int_aog), | |
884 | .l1clk (l1clk), | |
885 | .din (intbuf_rden), | |
886 | .siclk(siclk), | |
887 | .soclk(soclk) | |
888 | ); | |
889 | ||
890 | assign int_aov_next = intbuf_rden & (intbuf_head_inc | ~int_aog); | |
891 | ncu_i2cfc_ctl_msff_ctl_macro__width_1 int_aov_ff | |
892 | ( | |
893 | .scan_in(int_aov_ff_scanin), | |
894 | .scan_out(int_aov_ff_scanout), | |
895 | .dout (int_aov), | |
896 | .l1clk (l1clk), | |
897 | .din (int_aov_next), | |
898 | .siclk(siclk), | |
899 | .soclk(soclk) | |
900 | ); | |
901 | ||
902 | assign int_pa_ld = (int_pav==intbuf_rd) ; | |
903 | ncu_i2cfc_ctl_msff_ctl_macro__en_1__width_1 int_pav_ff | |
904 | ( | |
905 | .scan_in(int_pav_ff_scanin), | |
906 | .scan_out(int_pav_ff_scanout), | |
907 | .dout (int_pav), | |
908 | .l1clk (l1clk), | |
909 | .en (int_pa_ld), | |
910 | .din (int_pbv), | |
911 | .siclk(siclk), | |
912 | .soclk(soclk) | |
913 | ); | |
914 | ||
915 | assign int_pb_ld = (~int_pav | intbuf_rd | ~int_pbv) ; | |
916 | ncu_i2cfc_ctl_msff_ctl_macro__en_1__width_1 int_pbv_ff | |
917 | ( | |
918 | .scan_in(int_pbv_ff_scanin), | |
919 | .scan_out(int_pbv_ff_scanout), | |
920 | .dout (int_pbv), | |
921 | .l1clk (l1clk), | |
922 | .en (int_pb_ld), | |
923 | .din (int_aov), | |
924 | .siclk(siclk), | |
925 | .soclk(soclk) | |
926 | ); | |
927 | ||
928 | assign int_pbs_next = int_pas ? (int_aov & !int_pbv & int_pav)&intrd : intbuf_rd ; | |
929 | ncu_i2cfc_ctl_msff_ctl_macro__width_1 int_pbs_ff | |
930 | ( | |
931 | .scan_in(int_pbs_ff_scanin), | |
932 | .scan_out(int_pbs_ff_scanout), | |
933 | .dout (int_pbs), | |
934 | .l1clk (l1clk), | |
935 | .din (int_pbs_next), | |
936 | .siclk(siclk), | |
937 | .soclk(soclk) | |
938 | ); | |
939 | ||
940 | assign int_pas = ~int_pbs; | |
941 | assign int_mov = int_pas ? int_pav : int_pbv ; | |
942 | assign intbuf_rd = int_mov & (~intbuf_vld | intrd) ; | |
943 | ||
944 | assign intbuf_vld_next = intbuf_rd | (intbuf_vld & ~intbuf_sel_next & ~intbuf_dout_d1_ue); | |
945 | ||
946 | assign intrd = intbuf_vld & (intbuf_sel_next|intbuf_dout_d1_ue) ; | |
947 | ||
948 | ncu_i2cfc_ctl_msff_ctl_macro__width_1 intbuf_vld_ff | |
949 | ( | |
950 | .scan_in(intbuf_vld_ff_scanin), | |
951 | .scan_out(intbuf_vld_ff_scanout), | |
952 | .dout (intbuf_vld), | |
953 | .l1clk (l1clk), | |
954 | .din (intbuf_vld_next), | |
955 | .siclk(siclk), | |
956 | .soclk(soclk) | |
957 | ); | |
958 | ||
959 | ||
960 | ||
961 | /************************************************************ | |
962 | * IO Buffer Control | |
963 | ************************************************************/ | |
964 | // Flop tail pointer once to convert to cpu clock domain | |
965 | ncu_i2cfc_ctl_msff_ctl_macro__en_1__width_6 iobuf_tail_ff | |
966 | ( | |
967 | .scan_in(iobuf_tail_ff_scanin), | |
968 | .scan_out(iobuf_tail_ff_scanout), | |
969 | .dout (iobuf_tail[5:0]), | |
970 | .l1clk (l1clk), | |
971 | .en (io_cmp_sync_en), | |
972 | .din (iobuf_tail_s[5:0]), | |
973 | .siclk(siclk), | |
974 | .soclk(soclk) | |
975 | ); | |
976 | ||
977 | ncu_i2cfc_ctl_msff_ctl_macro__width_6 iobuf_head_d1_ff | |
978 | ( | |
979 | .scan_in(iobuf_head_d1_ff_scanin), | |
980 | .scan_out(iobuf_head_d1_ff_scanout), | |
981 | .dout (iobuf_head_d1[5:0]), | |
982 | .l1clk (l1clk), | |
983 | .din (iobuf_head[5:0]), | |
984 | .siclk(siclk), | |
985 | .soclk(soclk) | |
986 | ); | |
987 | //assign mb0_iobuf_sel = mb0_run & mb0_iobuf_rd_en; | |
988 | assign iobuf_head_ptr[4:0] = mb0_run ? mb0_raddr[4:0] : iobuf_head[4:0]; | |
989 | ncu_i2cfc_ctl_msff_ctl_macro__en_1__width_6 iobuf_head_f_ff | |
990 | ( | |
991 | .scan_in(iobuf_head_f_ff_scanin), | |
992 | .scan_out(iobuf_head_f_ff_scanout), | |
993 | .dout (iobuf_head_f[5:0]), | |
994 | .l1clk (l1clk), | |
995 | .en (cmp_io_sync_en), | |
996 | .din (iobuf_head[5:0]), | |
997 | .siclk(siclk), | |
998 | .soclk(soclk) | |
999 | ); | |
1000 | ||
1001 | assign io_pipe_full = ~io_aov ? (io_pav & io_pbv & iobuf_vld) : | |
1002 | ~io_pav ? (io_pbv & iobuf_vld) : | |
1003 | ~io_pbv ? (iobuf_vld) : 1'b1 ; | |
1004 | ||
1005 | assign iobuf_head_inc = io_aog & (iord | ~io_pipe_full) ; | |
1006 | assign iobuf_head[5:0] = iobuf_head_inc ? iobuf_head_d1[5:0]+6'h01 : iobuf_head_d1[5:0] ; | |
1007 | ||
1008 | assign iobuf_rden = mb0_run ? mb0_iobuf_rd_en : (iobuf_tail[5:0] != iobuf_head[5:0]) ; | |
1009 | ncu_i2cfc_ctl_msff_ctl_macro__width_1 io_aog_ff | |
1010 | ( | |
1011 | .scan_in(io_aog_ff_scanin), | |
1012 | .scan_out(io_aog_ff_scanout), | |
1013 | .dout (io_aog), | |
1014 | .l1clk (l1clk), | |
1015 | .din (iobuf_rden), | |
1016 | .siclk(siclk), | |
1017 | .soclk(soclk) | |
1018 | ); | |
1019 | ||
1020 | assign io_aov_next = iobuf_rden & (iobuf_head_inc | ~io_aog); | |
1021 | ncu_i2cfc_ctl_msff_ctl_macro__width_1 io_aov_ff | |
1022 | ( | |
1023 | .scan_in(io_aov_ff_scanin), | |
1024 | .scan_out(io_aov_ff_scanout), | |
1025 | .dout (io_aov), | |
1026 | .l1clk (l1clk), | |
1027 | .din (io_aov_next), | |
1028 | .siclk(siclk), | |
1029 | .soclk(soclk) | |
1030 | ); | |
1031 | ||
1032 | assign io_pa_ld = (io_pav==iobuf_rd) ; | |
1033 | ncu_i2cfc_ctl_msff_ctl_macro__en_1__width_1 io_pav_ff | |
1034 | ( | |
1035 | .scan_in(io_pav_ff_scanin), | |
1036 | .scan_out(io_pav_ff_scanout), | |
1037 | .dout (io_pav), | |
1038 | .l1clk (l1clk), | |
1039 | .en (io_pa_ld), | |
1040 | .din (io_pbv), | |
1041 | .siclk(siclk), | |
1042 | .soclk(soclk) | |
1043 | ); | |
1044 | ||
1045 | assign io_pb_ld = (~io_pav | iobuf_rd | ~io_pbv) ; | |
1046 | ncu_i2cfc_ctl_msff_ctl_macro__en_1__width_1 io_pbv_ff | |
1047 | ( | |
1048 | .scan_in(io_pbv_ff_scanin), | |
1049 | .scan_out(io_pbv_ff_scanout), | |
1050 | .dout (io_pbv), | |
1051 | .l1clk (l1clk), | |
1052 | .en (io_pb_ld), | |
1053 | .din (io_aov), | |
1054 | .siclk(siclk), | |
1055 | .soclk(soclk) | |
1056 | ); | |
1057 | ||
1058 | assign io_pbs_next = io_pas ? (io_aov & !io_pbv & io_pav)&iord : iobuf_rd ; | |
1059 | ncu_i2cfc_ctl_msff_ctl_macro__width_1 io_pbs_ff | |
1060 | ( | |
1061 | .scan_in(io_pbs_ff_scanin), | |
1062 | .scan_out(io_pbs_ff_scanout), | |
1063 | .dout (io_pbs), | |
1064 | .l1clk (l1clk), | |
1065 | .din (io_pbs_next), | |
1066 | .siclk(siclk), | |
1067 | .soclk(soclk) | |
1068 | ); | |
1069 | ||
1070 | assign io_pas = ~io_pbs; | |
1071 | assign io_mov = io_pas ? io_pav : io_pbv ; | |
1072 | assign iobuf_rd = io_mov & (~iobuf_vld | iord) ; | |
1073 | ||
1074 | assign iobuf_vld_next = iobuf_rd | (iobuf_vld & ~iobuf_sel_next & ~iobuf_dout_d1_ue); | |
1075 | ||
1076 | assign iord = iobuf_vld & (iobuf_sel_next|iobuf_dout_d1_ue) ; | |
1077 | ||
1078 | ncu_i2cfc_ctl_msff_ctl_macro__width_1 iobuf_vld_ff | |
1079 | ( | |
1080 | .scan_in(iobuf_vld_ff_scanin), | |
1081 | .scan_out(iobuf_vld_ff_scanout), | |
1082 | .dout (iobuf_vld), | |
1083 | .l1clk (l1clk), | |
1084 | .din (iobuf_vld_next), | |
1085 | .siclk(siclk), | |
1086 | .soclk(soclk) | |
1087 | ); | |
1088 | ||
1089 | ||
1090 | /**** adding clock header ****/ | |
1091 | ncu_i2cfc_ctl_l1clkhdr_ctl_macro clkgen ( | |
1092 | .l2clk (l2clk), | |
1093 | .l1en (1'b1), | |
1094 | .l1clk (l1clk), | |
1095 | .pce_ov(pce_ov), | |
1096 | .stop(stop), | |
1097 | .se(se) | |
1098 | ); | |
1099 | ||
1100 | /*** building tcu port ***/ | |
1101 | assign siclk = tcu_aclk; | |
1102 | assign soclk = tcu_bclk; | |
1103 | assign se = tcu_scan_en; | |
1104 | assign pce_ov = tcu_pce_ov; | |
1105 | assign stop = tcu_clk_stop; | |
1106 | ||
1107 | // fixscan start: | |
1108 | assign cpx_ncu_grant_ff_scanin = scan_in ; | |
1109 | assign cpx_cnt0_ff_scanin = cpx_ncu_grant_ff_scanout ; | |
1110 | assign cpx_cnt1_ff_scanin = cpx_cnt0_ff_scanout ; | |
1111 | assign cpx_cnt2_ff_scanin = cpx_cnt1_ff_scanout ; | |
1112 | assign cpx_cnt3_ff_scanin = cpx_cnt2_ff_scanout ; | |
1113 | assign cpx_cnt4_ff_scanin = cpx_cnt3_ff_scanout ; | |
1114 | assign cpx_cnt5_ff_scanin = cpx_cnt4_ff_scanout ; | |
1115 | assign cpx_cnt6_ff_scanin = cpx_cnt5_ff_scanout ; | |
1116 | assign cpx_cnt7_ff_scanin = cpx_cnt6_ff_scanout ; | |
1117 | assign intbuf_tail_ff_scanin = cpx_cnt7_ff_scanout ; | |
1118 | assign intbuf_head_d1_ff_scanin = intbuf_tail_ff_scanout ; | |
1119 | assign int_aog_ff_scanin = intbuf_head_d1_ff_scanout; | |
1120 | assign int_aov_ff_scanin = int_aog_ff_scanout ; | |
1121 | assign int_pav_ff_scanin = int_aov_ff_scanout ; | |
1122 | assign int_pbv_ff_scanin = int_pav_ff_scanout ; | |
1123 | assign int_pbs_ff_scanin = int_pbv_ff_scanout ; | |
1124 | assign intbuf_vld_ff_scanin = int_pbs_ff_scanout ; | |
1125 | assign iobuf_tail_ff_scanin = intbuf_vld_ff_scanout ; | |
1126 | assign iobuf_head_d1_ff_scanin = iobuf_tail_ff_scanout ; | |
1127 | assign iobuf_head_f_ff_scanin = iobuf_head_d1_ff_scanout ; | |
1128 | assign io_aog_ff_scanin = iobuf_head_f_ff_scanout ; | |
1129 | assign io_aov_ff_scanin = io_aog_ff_scanout ; | |
1130 | assign io_pav_ff_scanin = io_aov_ff_scanout ; | |
1131 | assign io_pbv_ff_scanin = io_pav_ff_scanout ; | |
1132 | assign io_pbs_ff_scanin = io_pbv_ff_scanout ; | |
1133 | assign iobuf_vld_ff_scanin = io_pbs_ff_scanout ; | |
1134 | assign scan_out = iobuf_vld_ff_scanout ; | |
1135 | // fixscan end: | |
1136 | endmodule // i2c_fctrl | |
1137 | ||
1138 | ||
1139 | ||
1140 | ||
1141 | ||
1142 | ||
1143 | ||
1144 | ||
1145 | // any PARAMS parms go into naming of macro | |
1146 | ||
1147 | module ncu_i2cfc_ctl_msff_ctl_macro__width_8 ( | |
1148 | din, | |
1149 | l1clk, | |
1150 | scan_in, | |
1151 | siclk, | |
1152 | soclk, | |
1153 | dout, | |
1154 | scan_out); | |
1155 | wire [7:0] fdin; | |
1156 | wire [6:0] so; | |
1157 | ||
1158 | input [7:0] din; | |
1159 | input l1clk; | |
1160 | input scan_in; | |
1161 | ||
1162 | ||
1163 | input siclk; | |
1164 | input soclk; | |
1165 | ||
1166 | output [7:0] dout; | |
1167 | output scan_out; | |
1168 | assign fdin[7:0] = din[7:0]; | |
1169 | ||
1170 | ||
1171 | ||
1172 | ||
1173 | ||
1174 | ||
1175 | dff #(8) d0_0 ( | |
1176 | .l1clk(l1clk), | |
1177 | .siclk(siclk), | |
1178 | .soclk(soclk), | |
1179 | .d(fdin[7:0]), | |
1180 | .si({scan_in,so[6:0]}), | |
1181 | .so({so[6:0],scan_out}), | |
1182 | .q(dout[7:0]) | |
1183 | ); | |
1184 | ||
1185 | ||
1186 | ||
1187 | ||
1188 | ||
1189 | ||
1190 | ||
1191 | ||
1192 | ||
1193 | ||
1194 | ||
1195 | ||
1196 | endmodule | |
1197 | ||
1198 | ||
1199 | ||
1200 | ||
1201 | ||
1202 | ||
1203 | ||
1204 | ||
1205 | ||
1206 | ||
1207 | ||
1208 | ||
1209 | ||
1210 | // any PARAMS parms go into naming of macro | |
1211 | ||
1212 | module ncu_i2cfc_ctl_msff_ctl_macro__width_2 ( | |
1213 | din, | |
1214 | l1clk, | |
1215 | scan_in, | |
1216 | siclk, | |
1217 | soclk, | |
1218 | dout, | |
1219 | scan_out); | |
1220 | wire [1:0] fdin; | |
1221 | wire [0:0] so; | |
1222 | ||
1223 | input [1:0] din; | |
1224 | input l1clk; | |
1225 | input scan_in; | |
1226 | ||
1227 | ||
1228 | input siclk; | |
1229 | input soclk; | |
1230 | ||
1231 | output [1:0] dout; | |
1232 | output scan_out; | |
1233 | assign fdin[1:0] = din[1:0]; | |
1234 | ||
1235 | ||
1236 | ||
1237 | ||
1238 | ||
1239 | ||
1240 | dff #(2) d0_0 ( | |
1241 | .l1clk(l1clk), | |
1242 | .siclk(siclk), | |
1243 | .soclk(soclk), | |
1244 | .d(fdin[1:0]), | |
1245 | .si({scan_in,so[0:0]}), | |
1246 | .so({so[0:0],scan_out}), | |
1247 | .q(dout[1:0]) | |
1248 | ); | |
1249 | ||
1250 | ||
1251 | ||
1252 | ||
1253 | ||
1254 | ||
1255 | ||
1256 | ||
1257 | ||
1258 | ||
1259 | ||
1260 | ||
1261 | endmodule | |
1262 | ||
1263 | ||
1264 | ||
1265 | ||
1266 | ||
1267 | ||
1268 | ||
1269 | ||
1270 | ||
1271 | ||
1272 | ||
1273 | ||
1274 | ||
1275 | // any PARAMS parms go into naming of macro | |
1276 | ||
1277 | module ncu_i2cfc_ctl_msff_ctl_macro__en_1__width_6 ( | |
1278 | din, | |
1279 | en, | |
1280 | l1clk, | |
1281 | scan_in, | |
1282 | siclk, | |
1283 | soclk, | |
1284 | dout, | |
1285 | scan_out); | |
1286 | wire [5:0] fdin; | |
1287 | wire [4:0] so; | |
1288 | ||
1289 | input [5:0] din; | |
1290 | input en; | |
1291 | input l1clk; | |
1292 | input scan_in; | |
1293 | ||
1294 | ||
1295 | input siclk; | |
1296 | input soclk; | |
1297 | ||
1298 | output [5:0] dout; | |
1299 | output scan_out; | |
1300 | assign fdin[5:0] = (din[5:0] & {6{en}}) | (dout[5:0] & ~{6{en}}); | |
1301 | ||
1302 | ||
1303 | ||
1304 | ||
1305 | ||
1306 | ||
1307 | dff #(6) d0_0 ( | |
1308 | .l1clk(l1clk), | |
1309 | .siclk(siclk), | |
1310 | .soclk(soclk), | |
1311 | .d(fdin[5:0]), | |
1312 | .si({scan_in,so[4:0]}), | |
1313 | .so({so[4:0],scan_out}), | |
1314 | .q(dout[5:0]) | |
1315 | ); | |
1316 | ||
1317 | ||
1318 | ||
1319 | ||
1320 | ||
1321 | ||
1322 | ||
1323 | ||
1324 | ||
1325 | ||
1326 | ||
1327 | ||
1328 | endmodule | |
1329 | ||
1330 | ||
1331 | ||
1332 | ||
1333 | ||
1334 | ||
1335 | ||
1336 | ||
1337 | ||
1338 | ||
1339 | ||
1340 | ||
1341 | ||
1342 | // any PARAMS parms go into naming of macro | |
1343 | ||
1344 | module ncu_i2cfc_ctl_msff_ctl_macro__width_6 ( | |
1345 | din, | |
1346 | l1clk, | |
1347 | scan_in, | |
1348 | siclk, | |
1349 | soclk, | |
1350 | dout, | |
1351 | scan_out); | |
1352 | wire [5:0] fdin; | |
1353 | wire [4:0] so; | |
1354 | ||
1355 | input [5:0] din; | |
1356 | input l1clk; | |
1357 | input scan_in; | |
1358 | ||
1359 | ||
1360 | input siclk; | |
1361 | input soclk; | |
1362 | ||
1363 | output [5:0] dout; | |
1364 | output scan_out; | |
1365 | assign fdin[5:0] = din[5:0]; | |
1366 | ||
1367 | ||
1368 | ||
1369 | ||
1370 | ||
1371 | ||
1372 | dff #(6) d0_0 ( | |
1373 | .l1clk(l1clk), | |
1374 | .siclk(siclk), | |
1375 | .soclk(soclk), | |
1376 | .d(fdin[5:0]), | |
1377 | .si({scan_in,so[4:0]}), | |
1378 | .so({so[4:0],scan_out}), | |
1379 | .q(dout[5:0]) | |
1380 | ); | |
1381 | ||
1382 | ||
1383 | ||
1384 | ||
1385 | ||
1386 | ||
1387 | ||
1388 | ||
1389 | ||
1390 | ||
1391 | ||
1392 | ||
1393 | endmodule | |
1394 | ||
1395 | ||
1396 | ||
1397 | ||
1398 | ||
1399 | ||
1400 | ||
1401 | ||
1402 | ||
1403 | ||
1404 | ||
1405 | ||
1406 | ||
1407 | // any PARAMS parms go into naming of macro | |
1408 | ||
1409 | module ncu_i2cfc_ctl_msff_ctl_macro__width_1 ( | |
1410 | din, | |
1411 | l1clk, | |
1412 | scan_in, | |
1413 | siclk, | |
1414 | soclk, | |
1415 | dout, | |
1416 | scan_out); | |
1417 | wire [0:0] fdin; | |
1418 | ||
1419 | input [0:0] din; | |
1420 | input l1clk; | |
1421 | input scan_in; | |
1422 | ||
1423 | ||
1424 | input siclk; | |
1425 | input soclk; | |
1426 | ||
1427 | output [0:0] dout; | |
1428 | output scan_out; | |
1429 | assign fdin[0:0] = din[0:0]; | |
1430 | ||
1431 | ||
1432 | ||
1433 | ||
1434 | ||
1435 | ||
1436 | dff #(1) d0_0 ( | |
1437 | .l1clk(l1clk), | |
1438 | .siclk(siclk), | |
1439 | .soclk(soclk), | |
1440 | .d(fdin[0:0]), | |
1441 | .si(scan_in), | |
1442 | .so(scan_out), | |
1443 | .q(dout[0:0]) | |
1444 | ); | |
1445 | ||
1446 | ||
1447 | ||
1448 | ||
1449 | ||
1450 | ||
1451 | ||
1452 | ||
1453 | ||
1454 | ||
1455 | ||
1456 | ||
1457 | endmodule | |
1458 | ||
1459 | ||
1460 | ||
1461 | ||
1462 | ||
1463 | ||
1464 | ||
1465 | ||
1466 | ||
1467 | ||
1468 | ||
1469 | ||
1470 | ||
1471 | // any PARAMS parms go into naming of macro | |
1472 | ||
1473 | module ncu_i2cfc_ctl_msff_ctl_macro__en_1__width_1 ( | |
1474 | din, | |
1475 | en, | |
1476 | l1clk, | |
1477 | scan_in, | |
1478 | siclk, | |
1479 | soclk, | |
1480 | dout, | |
1481 | scan_out); | |
1482 | wire [0:0] fdin; | |
1483 | ||
1484 | input [0:0] din; | |
1485 | input en; | |
1486 | input l1clk; | |
1487 | input scan_in; | |
1488 | ||
1489 | ||
1490 | input siclk; | |
1491 | input soclk; | |
1492 | ||
1493 | output [0:0] dout; | |
1494 | output scan_out; | |
1495 | assign fdin[0:0] = (din[0:0] & {1{en}}) | (dout[0:0] & ~{1{en}}); | |
1496 | ||
1497 | ||
1498 | ||
1499 | ||
1500 | ||
1501 | ||
1502 | dff #(1) d0_0 ( | |
1503 | .l1clk(l1clk), | |
1504 | .siclk(siclk), | |
1505 | .soclk(soclk), | |
1506 | .d(fdin[0:0]), | |
1507 | .si(scan_in), | |
1508 | .so(scan_out), | |
1509 | .q(dout[0:0]) | |
1510 | ); | |
1511 | ||
1512 | ||
1513 | ||
1514 | ||
1515 | ||
1516 | ||
1517 | ||
1518 | ||
1519 | ||
1520 | ||
1521 | ||
1522 | ||
1523 | endmodule | |
1524 | ||
1525 | ||
1526 | ||
1527 | ||
1528 | ||
1529 | ||
1530 | ||
1531 | ||
1532 | ||
1533 | ||
1534 | ||
1535 | ||
1536 | ||
1537 | // any PARAMS parms go into naming of macro | |
1538 | ||
1539 | module ncu_i2cfc_ctl_l1clkhdr_ctl_macro ( | |
1540 | l2clk, | |
1541 | l1en, | |
1542 | pce_ov, | |
1543 | stop, | |
1544 | se, | |
1545 | l1clk); | |
1546 | ||
1547 | ||
1548 | input l2clk; | |
1549 | input l1en; | |
1550 | input pce_ov; | |
1551 | input stop; | |
1552 | input se; | |
1553 | output l1clk; | |
1554 | ||
1555 | ||
1556 | ||
1557 | ||
1558 | ||
1559 | cl_sc1_l1hdr_8x c_0 ( | |
1560 | ||
1561 | ||
1562 | .l2clk(l2clk), | |
1563 | .pce(l1en), | |
1564 | .l1clk(l1clk), | |
1565 | .se(se), | |
1566 | .pce_ov(pce_ov), | |
1567 | .stop(stop) | |
1568 | ); | |
1569 | ||
1570 | ||
1571 | ||
1572 | endmodule | |
1573 | ||
1574 | ||
1575 | ||
1576 | ||
1577 | ||
1578 | ||
1579 | ||
1580 |