| 1 | // ========== Copyright Header Begin ========================================== |
| 2 | // |
| 3 | // OpenSPARC T2 Processor File: n2_com_dp_32x72_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 | module n2_com_dp_32x72_cust ( |
| 36 | wr_adr, |
| 37 | wr_en, |
| 38 | rd_adr, |
| 39 | rd_en, |
| 40 | din, |
| 41 | dout, |
| 42 | rdclk, |
| 43 | wrclk, |
| 44 | scan_in, |
| 45 | tcu_pce_ov, |
| 46 | tcu_aclk, |
| 47 | tcu_bclk, |
| 48 | tcu_array_wr_inhibit, |
| 49 | tcu_se_scancollar_in, |
| 50 | bist_clk_mux_sel, |
| 51 | rd_pce, |
| 52 | wr_pce, |
| 53 | scan_out); |
| 54 | wire rd_lce; |
| 55 | wire wr_lce; |
| 56 | wire rdclk_in; |
| 57 | wire wrclk_in; |
| 58 | wire rdclk_free; |
| 59 | wire wrclk_free; |
| 60 | wire dff_wr_addr_scanin; |
| 61 | wire dff_wr_addr_scanout; |
| 62 | wire [4:0] wr_adr_d1; |
| 63 | wire [4:1] dff_rd_addr_scan; |
| 64 | wire dff_rd_addr_scanin; |
| 65 | wire dff_rd_addr_scanout; |
| 66 | wire [4:0] rd_adr_d1; |
| 67 | wire [4:0] rd_adr_mq_l_unused; |
| 68 | wire [4:0] rd_adr_q_unused; |
| 69 | wire [4:0] rd_adr_q_l_unused; |
| 70 | wire dff_rd_en_scanin; |
| 71 | wire dff_rd_en_scanout; |
| 72 | wire rd_en_d1; |
| 73 | wire rd_en_mq_l_unused; |
| 74 | wire rd_en_q_unused; |
| 75 | wire rd_en_q_l_unused; |
| 76 | wire dff_wr_en_scanin; |
| 77 | wire dff_wr_en_scanout; |
| 78 | wire wr_en_d1; |
| 79 | wire [35:1] dff_din_hi_scan; |
| 80 | wire dff_din_hi_scanin; |
| 81 | wire dff_din_hi_scanout; |
| 82 | wire [71:0] din_d1; |
| 83 | wire [35:1] dff_din_lo_scan; |
| 84 | wire dff_din_lo_scanin; |
| 85 | wire dff_din_lo_scanout; |
| 86 | wire wr_inh_; |
| 87 | wire rd_en_d1_qual; |
| 88 | wire wr_en_d1_qual; |
| 89 | wire [71:0] local_dout; |
| 90 | wire dff_dout_scanout; |
| 91 | wire dff_dout_scanin; |
| 92 | |
| 93 | input [4:0] wr_adr; |
| 94 | input wr_en; |
| 95 | input [4:0] rd_adr; |
| 96 | input rd_en; |
| 97 | input [71:0] din; |
| 98 | output [71:0] dout; |
| 99 | input rdclk; |
| 100 | input wrclk; |
| 101 | input scan_in; |
| 102 | input tcu_pce_ov; |
| 103 | input tcu_aclk; |
| 104 | input tcu_bclk; |
| 105 | input tcu_array_wr_inhibit; |
| 106 | input tcu_se_scancollar_in; |
| 107 | |
| 108 | |
| 109 | input bist_clk_mux_sel; |
| 110 | input rd_pce; |
| 111 | input wr_pce; |
| 112 | output scan_out; |
| 113 | |
| 114 | `ifndef FPGA |
| 115 | // synopsys translate_off |
| 116 | `endif |
| 117 | |
| 118 | wire pce_ov = tcu_pce_ov; |
| 119 | wire siclk = tcu_aclk; |
| 120 | wire soclk = tcu_bclk; |
| 121 | //================================================ |
| 122 | // Clock headers |
| 123 | //================================================ |
| 124 | cl_mc1_bistlatch_4x rd_pce_lat ( |
| 125 | .l2clk (rdclk), |
| 126 | .pce (rd_pce), |
| 127 | .pce_ov (pce_ov), |
| 128 | .lce (rd_lce) |
| 129 | ); |
| 130 | cl_mc1_bistlatch_4x wr_pce_lat ( |
| 131 | .l2clk (wrclk), |
| 132 | .pce (wr_pce), |
| 133 | .pce_ov (pce_ov), |
| 134 | .lce (wr_lce) |
| 135 | ); |
| 136 | cl_mc1_bistl1hdr_8x rch_in ( |
| 137 | .l2clk (rdclk), |
| 138 | .se (tcu_se_scancollar_in), |
| 139 | .clksel (bist_clk_mux_sel), |
| 140 | .bistclk(rdclk), |
| 141 | .lce (rd_lce), |
| 142 | .l1clk (rdclk_in) |
| 143 | ); |
| 144 | cl_mc1_bistl1hdr_8x wch_in ( |
| 145 | .l2clk (wrclk), |
| 146 | .se (tcu_se_scancollar_in), |
| 147 | .clksel (bist_clk_mux_sel), |
| 148 | .bistclk(rdclk), |
| 149 | .lce (wr_lce), |
| 150 | .l1clk (wrclk_in) |
| 151 | ); |
| 152 | cl_mc1_bistl1hdr_8x rch_free ( |
| 153 | .l2clk (rdclk), |
| 154 | .se (1'b0), |
| 155 | .clksel (bist_clk_mux_sel), |
| 156 | .bistclk(rdclk), |
| 157 | .lce (rd_lce), |
| 158 | .l1clk (rdclk_free) |
| 159 | ); |
| 160 | cl_mc1_bistl1hdr_8x wch_free ( |
| 161 | .l2clk (wrclk), |
| 162 | .se (1'b0), |
| 163 | .clksel (bist_clk_mux_sel), |
| 164 | .bistclk(rdclk), |
| 165 | .lce (wr_lce), |
| 166 | .l1clk (wrclk_free) |
| 167 | ); |
| 168 | |
| 169 | |
| 170 | /////////////////////////////////////////////////////////////// |
| 171 | // Flop the inputs // |
| 172 | /////////////////////////////////////////////////////////////// |
| 173 | n2_com_dp_32x72_cust_msff_ctl_macro__width_5 dff_wr_addr ( |
| 174 | .scan_in (dff_wr_addr_scanin), |
| 175 | .scan_out (dff_wr_addr_scanout), |
| 176 | .l1clk (wrclk_in), |
| 177 | .din (wr_adr[4:0]), |
| 178 | .dout (wr_adr_d1[4:0]), |
| 179 | .siclk(siclk), |
| 180 | .soclk(soclk) |
| 181 | ); |
| 182 | n2_com_dp_32x72_cust_sram_msff_mo_macro__fs_1__width_5 dff_rd_addr ( |
| 183 | .scan_in ({dff_rd_addr_scan[4:1],dff_rd_addr_scanin}), |
| 184 | .scan_out ({dff_rd_addr_scanout,dff_rd_addr_scan[4:1]}), |
| 185 | .l1clk (rdclk_in), |
| 186 | .and_clk (rdclk_in), |
| 187 | .d (rd_adr[4:0]), |
| 188 | .mq (rd_adr_d1[4:0]), |
| 189 | .mq_l (rd_adr_mq_l_unused[4:0]), |
| 190 | .q (rd_adr_q_unused[4:0]), |
| 191 | .q_l (rd_adr_q_l_unused[4:0]), |
| 192 | .siclk(siclk), |
| 193 | .soclk(soclk) |
| 194 | ); |
| 195 | n2_com_dp_32x72_cust_sram_msff_mo_macro__width_1 dff_rd_en ( |
| 196 | .scan_in (dff_rd_en_scanin), |
| 197 | .scan_out (dff_rd_en_scanout), |
| 198 | .l1clk (rdclk_in), |
| 199 | .and_clk (rdclk_in), |
| 200 | .d (rd_en), |
| 201 | .mq (rd_en_d1), |
| 202 | .mq_l (rd_en_mq_l_unused), |
| 203 | .q (rd_en_q_unused), |
| 204 | .q_l (rd_en_q_l_unused), |
| 205 | .siclk(siclk), |
| 206 | .soclk(soclk) |
| 207 | ); |
| 208 | n2_com_dp_32x72_cust_msff_ctl_macro__width_1 dff_wr_en ( |
| 209 | .scan_in (dff_wr_en_scanin), |
| 210 | .scan_out (dff_wr_en_scanout), |
| 211 | .l1clk (wrclk_in), |
| 212 | .din (wr_en), |
| 213 | .dout (wr_en_d1), |
| 214 | .siclk(siclk), |
| 215 | .soclk(soclk) |
| 216 | ); |
| 217 | n2_com_dp_32x72_cust_msff_ctl_macro__fs_1__width_36 dff_din_hi ( |
| 218 | .scan_in ({dff_din_hi_scan[35:1],dff_din_hi_scanin}), |
| 219 | .scan_out ({dff_din_hi_scanout,dff_din_hi_scan[35:1]}), |
| 220 | .l1clk (wrclk_in), |
| 221 | .din (din[71:36]), |
| 222 | .dout (din_d1[71:36]), |
| 223 | .siclk(siclk), |
| 224 | .soclk(soclk) |
| 225 | ); |
| 226 | n2_com_dp_32x72_cust_msff_ctl_macro__fs_1__width_36 dff_din_lo ( |
| 227 | .scan_in ({dff_din_lo_scan[35:1],dff_din_lo_scanin}), |
| 228 | .scan_out ({dff_din_lo_scanout,dff_din_lo_scan[35:1]}), |
| 229 | .l1clk (wrclk_in), |
| 230 | .din (din[35:0]), |
| 231 | .dout (din_d1[35:0]), |
| 232 | .siclk(siclk), |
| 233 | .soclk(soclk) |
| 234 | ); |
| 235 | n2_com_dp_32x72_cust_inv_macro__width_1 wr_inh_inv ( |
| 236 | .din (tcu_array_wr_inhibit), |
| 237 | .dout (wr_inh_) |
| 238 | ); |
| 239 | n2_com_dp_32x72_cust_and_macro__width_2 enable_qual ( |
| 240 | .din0 ({2{wr_inh_}}), |
| 241 | .din1 ({rd_en_d1,wr_en_d1}), |
| 242 | .dout ({rd_en_d1_qual,wr_en_d1_qual}) |
| 243 | ); |
| 244 | n2_com_dp_32x72_cust_n2_com_array_macro__rows_32__width_72__z_array array ( |
| 245 | .rclk (rdclk_free), |
| 246 | .wclk (wrclk_free), |
| 247 | .wr_adr (wr_adr_d1[4:0]), |
| 248 | .wr_en (wr_en_d1_qual), |
| 249 | .rd_adr (rd_adr_d1[4:0]), |
| 250 | .rd_en (rd_en_d1_qual), |
| 251 | .din (din_d1[71:0]), |
| 252 | .dout (local_dout[71:0]) |
| 253 | ); |
| 254 | |
| 255 | |
| 256 | assign dout[71:0] = local_dout[71:0]; |
| 257 | assign dff_dout_scanout = dff_dout_scanin; |
| 258 | |
| 259 | supply0 vss; |
| 260 | supply1 vdd; |
| 261 | |
| 262 | // fixscan start: |
| 263 | assign dff_wr_addr_scanin = scan_in ; |
| 264 | assign dff_rd_addr_scanin = dff_wr_addr_scanout ; |
| 265 | assign dff_wr_en_scanin = dff_rd_addr_scanout ; |
| 266 | assign dff_rd_en_scanin = dff_wr_en_scanout ; |
| 267 | assign dff_din_lo_scanin = dff_rd_en_scanout ; |
| 268 | assign dff_din_hi_scanin = dff_din_lo_scanout ; |
| 269 | assign dff_dout_scanin = dff_din_hi_scanout ; |
| 270 | assign scan_out = dff_dout_scanout ; |
| 271 | // fixscan end: |
| 272 | |
| 273 | |
| 274 | `ifndef FPGA |
| 275 | // synopsys translate_on |
| 276 | `endif |
| 277 | |
| 278 | endmodule |
| 279 | |
| 280 | |
| 281 | |
| 282 | |
| 283 | |
| 284 | |
| 285 | |
| 286 | // any PARAMS parms go into naming of macro |
| 287 | |
| 288 | module n2_com_dp_32x72_cust_msff_ctl_macro__width_5 ( |
| 289 | din, |
| 290 | l1clk, |
| 291 | scan_in, |
| 292 | siclk, |
| 293 | soclk, |
| 294 | dout, |
| 295 | scan_out); |
| 296 | wire [4:0] fdin; |
| 297 | wire [3:0] so; |
| 298 | |
| 299 | input [4:0] din; |
| 300 | input l1clk; |
| 301 | input scan_in; |
| 302 | |
| 303 | |
| 304 | input siclk; |
| 305 | input soclk; |
| 306 | |
| 307 | output [4:0] dout; |
| 308 | output scan_out; |
| 309 | assign fdin[4:0] = din[4:0]; |
| 310 | |
| 311 | |
| 312 | |
| 313 | |
| 314 | |
| 315 | |
| 316 | dff #(5) d0_0 ( |
| 317 | .l1clk(l1clk), |
| 318 | .siclk(siclk), |
| 319 | .soclk(soclk), |
| 320 | .d(fdin[4:0]), |
| 321 | .si({scan_in,so[3:0]}), |
| 322 | .so({so[3:0],scan_out}), |
| 323 | .q(dout[4:0]) |
| 324 | ); |
| 325 | |
| 326 | |
| 327 | |
| 328 | |
| 329 | |
| 330 | |
| 331 | |
| 332 | |
| 333 | |
| 334 | |
| 335 | |
| 336 | |
| 337 | endmodule |
| 338 | |
| 339 | |
| 340 | |
| 341 | |
| 342 | |
| 343 | |
| 344 | |
| 345 | |
| 346 | |
| 347 | // |
| 348 | // macro for cl_mc1_sram_msff_mo_{16,8,4}x flops |
| 349 | // |
| 350 | // |
| 351 | |
| 352 | |
| 353 | |
| 354 | |
| 355 | |
| 356 | module n2_com_dp_32x72_cust_sram_msff_mo_macro__fs_1__width_5 ( |
| 357 | d, |
| 358 | scan_in, |
| 359 | l1clk, |
| 360 | and_clk, |
| 361 | siclk, |
| 362 | soclk, |
| 363 | mq, |
| 364 | mq_l, |
| 365 | scan_out, |
| 366 | q, |
| 367 | q_l); |
| 368 | input [4:0] d; |
| 369 | input [4:0] scan_in; |
| 370 | input l1clk; |
| 371 | input and_clk; |
| 372 | input siclk; |
| 373 | input soclk; |
| 374 | output [4:0] mq; |
| 375 | output [4:0] mq_l; |
| 376 | output [4:0] scan_out; |
| 377 | output [4:0] q; |
| 378 | output [4:0] q_l; |
| 379 | |
| 380 | |
| 381 | |
| 382 | |
| 383 | |
| 384 | |
| 385 | new_dlata #(5) d0_0 ( |
| 386 | .d(d[4:0]), |
| 387 | .si(scan_in[4:0]), |
| 388 | .so(scan_out[4:0]), |
| 389 | .l1clk(l1clk), |
| 390 | .and_clk(and_clk), |
| 391 | .siclk(siclk), |
| 392 | .soclk(soclk), |
| 393 | .q(q[4:0]), |
| 394 | .q_l(q_l[4:0]), |
| 395 | .mq(mq[4:0]), |
| 396 | .mq_l(mq_l[4:0]) |
| 397 | ); |
| 398 | |
| 399 | |
| 400 | |
| 401 | |
| 402 | |
| 403 | |
| 404 | |
| 405 | |
| 406 | |
| 407 | |
| 408 | //place::generic_place($width,$stack,$left); |
| 409 | |
| 410 | endmodule |
| 411 | |
| 412 | |
| 413 | |
| 414 | |
| 415 | |
| 416 | // |
| 417 | // macro for cl_mc1_sram_msff_mo_{16,8,4}x flops |
| 418 | // |
| 419 | // |
| 420 | |
| 421 | |
| 422 | |
| 423 | |
| 424 | |
| 425 | module n2_com_dp_32x72_cust_sram_msff_mo_macro__width_1 ( |
| 426 | d, |
| 427 | scan_in, |
| 428 | l1clk, |
| 429 | and_clk, |
| 430 | siclk, |
| 431 | soclk, |
| 432 | mq, |
| 433 | mq_l, |
| 434 | scan_out, |
| 435 | q, |
| 436 | q_l); |
| 437 | input [0:0] d; |
| 438 | input scan_in; |
| 439 | input l1clk; |
| 440 | input and_clk; |
| 441 | input siclk; |
| 442 | input soclk; |
| 443 | output [0:0] mq; |
| 444 | output [0:0] mq_l; |
| 445 | output scan_out; |
| 446 | output [0:0] q; |
| 447 | output [0:0] q_l; |
| 448 | |
| 449 | |
| 450 | |
| 451 | |
| 452 | |
| 453 | |
| 454 | new_dlata #(1) d0_0 ( |
| 455 | .d(d[0:0]), |
| 456 | .si(scan_in), |
| 457 | .so(scan_out), |
| 458 | .l1clk(l1clk), |
| 459 | .and_clk(and_clk), |
| 460 | .siclk(siclk), |
| 461 | .soclk(soclk), |
| 462 | .q(q[0:0]), |
| 463 | .q_l(q_l[0:0]), |
| 464 | .mq(mq[0:0]), |
| 465 | .mq_l(mq_l[0:0]) |
| 466 | ); |
| 467 | |
| 468 | |
| 469 | |
| 470 | |
| 471 | |
| 472 | |
| 473 | |
| 474 | |
| 475 | |
| 476 | |
| 477 | //place::generic_place($width,$stack,$left); |
| 478 | |
| 479 | endmodule |
| 480 | |
| 481 | |
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | |
| 487 | |
| 488 | |
| 489 | // any PARAMS parms go into naming of macro |
| 490 | |
| 491 | module n2_com_dp_32x72_cust_msff_ctl_macro__width_1 ( |
| 492 | din, |
| 493 | l1clk, |
| 494 | scan_in, |
| 495 | siclk, |
| 496 | soclk, |
| 497 | dout, |
| 498 | scan_out); |
| 499 | wire [0:0] fdin; |
| 500 | |
| 501 | input [0:0] din; |
| 502 | input l1clk; |
| 503 | input scan_in; |
| 504 | |
| 505 | |
| 506 | input siclk; |
| 507 | input soclk; |
| 508 | |
| 509 | output [0:0] dout; |
| 510 | output scan_out; |
| 511 | assign fdin[0:0] = din[0:0]; |
| 512 | |
| 513 | |
| 514 | |
| 515 | |
| 516 | |
| 517 | |
| 518 | dff #(1) d0_0 ( |
| 519 | .l1clk(l1clk), |
| 520 | .siclk(siclk), |
| 521 | .soclk(soclk), |
| 522 | .d(fdin[0:0]), |
| 523 | .si(scan_in), |
| 524 | .so(scan_out), |
| 525 | .q(dout[0:0]) |
| 526 | ); |
| 527 | |
| 528 | |
| 529 | |
| 530 | |
| 531 | |
| 532 | |
| 533 | |
| 534 | |
| 535 | |
| 536 | |
| 537 | |
| 538 | |
| 539 | endmodule |
| 540 | |
| 541 | |
| 542 | |
| 543 | |
| 544 | |
| 545 | |
| 546 | |
| 547 | |
| 548 | |
| 549 | |
| 550 | |
| 551 | |
| 552 | |
| 553 | // any PARAMS parms go into naming of macro |
| 554 | |
| 555 | module n2_com_dp_32x72_cust_msff_ctl_macro__fs_1__width_36 ( |
| 556 | din, |
| 557 | l1clk, |
| 558 | scan_in, |
| 559 | siclk, |
| 560 | soclk, |
| 561 | dout, |
| 562 | scan_out); |
| 563 | wire [35:0] fdin; |
| 564 | |
| 565 | input [35:0] din; |
| 566 | input l1clk; |
| 567 | input [35:0] scan_in; |
| 568 | |
| 569 | |
| 570 | input siclk; |
| 571 | input soclk; |
| 572 | |
| 573 | output [35:0] dout; |
| 574 | output [35:0] scan_out; |
| 575 | assign fdin[35:0] = din[35:0]; |
| 576 | |
| 577 | |
| 578 | |
| 579 | |
| 580 | |
| 581 | |
| 582 | dff #(36) d0_0 ( |
| 583 | .l1clk(l1clk), |
| 584 | .siclk(siclk), |
| 585 | .soclk(soclk), |
| 586 | .d(fdin[35:0]), |
| 587 | .si(scan_in[35:0]), |
| 588 | .so(scan_out[35:0]), |
| 589 | .q(dout[35:0]) |
| 590 | ); |
| 591 | |
| 592 | |
| 593 | |
| 594 | |
| 595 | |
| 596 | |
| 597 | |
| 598 | |
| 599 | |
| 600 | |
| 601 | |
| 602 | |
| 603 | endmodule |
| 604 | |
| 605 | |
| 606 | |
| 607 | |
| 608 | |
| 609 | |
| 610 | |
| 611 | |
| 612 | |
| 613 | // |
| 614 | // invert macro |
| 615 | // |
| 616 | // |
| 617 | |
| 618 | |
| 619 | |
| 620 | |
| 621 | |
| 622 | module n2_com_dp_32x72_cust_inv_macro__width_1 ( |
| 623 | din, |
| 624 | dout); |
| 625 | input [0:0] din; |
| 626 | output [0:0] dout; |
| 627 | |
| 628 | |
| 629 | |
| 630 | |
| 631 | |
| 632 | |
| 633 | inv #(1) d0_0 ( |
| 634 | .in(din[0:0]), |
| 635 | .out(dout[0:0]) |
| 636 | ); |
| 637 | |
| 638 | |
| 639 | |
| 640 | |
| 641 | |
| 642 | |
| 643 | |
| 644 | |
| 645 | |
| 646 | endmodule |
| 647 | |
| 648 | |
| 649 | |
| 650 | |
| 651 | |
| 652 | // |
| 653 | // and macro for ports = 2,3,4 |
| 654 | // |
| 655 | // |
| 656 | |
| 657 | |
| 658 | |
| 659 | |
| 660 | |
| 661 | module n2_com_dp_32x72_cust_and_macro__width_2 ( |
| 662 | din0, |
| 663 | din1, |
| 664 | dout); |
| 665 | input [1:0] din0; |
| 666 | input [1:0] din1; |
| 667 | output [1:0] dout; |
| 668 | |
| 669 | |
| 670 | |
| 671 | |
| 672 | |
| 673 | |
| 674 | and2 #(2) d0_0 ( |
| 675 | .in0(din0[1:0]), |
| 676 | .in1(din1[1:0]), |
| 677 | .out(dout[1:0]) |
| 678 | ); |
| 679 | |
| 680 | |
| 681 | |
| 682 | |
| 683 | |
| 684 | |
| 685 | |
| 686 | |
| 687 | |
| 688 | endmodule |
| 689 | |
| 690 | |
| 691 | |
| 692 | |
| 693 | |
| 694 | |
| 695 | |
| 696 | |
| 697 | |
| 698 | |
| 699 | module n2_com_dp_32x72_cust_n2_com_array_macro__rows_32__width_72__z_array ( |
| 700 | rclk, |
| 701 | wclk, |
| 702 | rd_adr, |
| 703 | rd_en, |
| 704 | wr_en, |
| 705 | wr_adr, |
| 706 | din, |
| 707 | dout); |
| 708 | |
| 709 | input rclk; |
| 710 | input wclk; |
| 711 | input [4:0] rd_adr; |
| 712 | input rd_en; |
| 713 | input wr_en; |
| 714 | input [4:0] wr_adr; |
| 715 | input [72-1:0] din; |
| 716 | output [72-1:0] dout; |
| 717 | |
| 718 | |
| 719 | |
| 720 | reg [72-1:0] mem[32-1:0]; |
| 721 | reg [72-1:0] local_dout; |
| 722 | |
| 723 | `ifndef NOINITMEM |
| 724 | // Emulate reset |
| 725 | integer i; |
| 726 | initial begin |
| 727 | for (i=0; i<32; i=i+1) begin |
| 728 | mem[i] = 72'b0; |
| 729 | end |
| 730 | local_dout = 72'b0; |
| 731 | end |
| 732 | `endif |
| 733 | ////////////////////// |
| 734 | // Read/write array |
| 735 | ////////////////////// |
| 736 | always @(negedge wclk) begin |
| 737 | if (wr_en) begin |
| 738 | mem[wr_adr] <= din; |
| 739 | |
| 740 | |
| 741 | end |
| 742 | end |
| 743 | always @(rclk or rd_en or wr_en or rd_adr or wr_adr) begin |
| 744 | if (rclk) begin |
| 745 | if (rd_en) begin |
| 746 | if (wr_en & (wr_adr[4:0] == rd_adr[4:0])) |
| 747 | local_dout[72-1:0] <= 72'hx; |
| 748 | else |
| 749 | local_dout[72-1:0] <= mem[rd_adr] ; |
| 750 | end |
| 751 | else |
| 752 | local_dout[72-1:0] <= ~(72'h0); |
| 753 | end |
| 754 | end |
| 755 | assign dout[72-1:0] = local_dout[72-1:0]; |
| 756 | supply0 vss; |
| 757 | supply1 vdd; |
| 758 | |
| 759 | |
| 760 | |
| 761 | |
| 762 | endmodule |
| 763 | |