// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: n2_l2t_dp_32x128_cust.v
// Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
// 4150 Network Circle, Santa Clara, California 95054, U.S.A.
// * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// For the avoidance of doubt, and except that if any non-GPL license
// choice is available it will apply instead, Sun elects to use only
// the General Public License version 2 (GPLv2) at this time for any
// software where a choice of GPL license versions is made
// available with the language indicating that GPLv2 or any later version
// may be used, or where a choice of which version of the GPL is applied is
// otherwise unspecified.
// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
// CA 95054 USA or visit www.sun.com if you need additional information or
// ========== Copyright Header End ============================================
module n2_l2t_dp_32x128_cust (
input [127:0] din; // data input
input [31:0] rd_wl; // read addr
input [31:0] wr_wl; // write addr
input wr_en; // used in conjunction with
input tcu_array_wr_inhibit ; // gates off writes during SCAN.
input tcu_se_scancollar_in; // hold scan in data.
input tcu_scan_en; // hold scan in data.
// synopsys translate_off
assign dout[127:0] = dout_array[127:0];
// scan chain connections ////
assign pce_ov = tcu_pce_ov;
n2_l2t_dp_32x128_cust_l1clkhdr_ctl_macro clkgen_clk_en
.se (tcu_se_scancollar_in),
n2_l2t_dp_32x128_cust_l1clkhdr_ctl_macro clkgen_clk_en0
n2_l2t_dp_32x128_cust_msff_ctl_macro__scanreverse_1__width_64 ff_wdata_0
.scan_in(ff_wdata_0_scanin),
.scan_out(ff_wdata_0_scanout),
n2_l2t_dp_32x128_cust_msff_ctl_macro__scanreverse_1__width_64 ff_wdata_1
.scan_in(ff_wdata_1_scanin),
.scan_out(ff_wdata_1_scanout),
.dout(wrdata_d1[127:64]),
n2_l2t_dp_32x128_cust_msff_ctl_macro__width_1 ff_wr_en
.scan_in(ff_wr_en_scanin),
.scan_out(ff_wr_en_scanout),
n2_l2t_dp_32x128_cust_msff_ctl_macro__width_32 ff_wr_wl
.scan_in(ff_wr_wl_scanin),
.scan_out(ff_wr_wl_scanout),
n2_l2t_dp_32x128_cust_sram_msff_mo_macro__width_1 ff_ren
.scan_out(ff_ren_scanout),
n2_l2t_dp_32x128_cust_msff_ctl_macro__width_32 ff_rd_wl
.scan_in(ff_rd_wl_scanin),
.scan_out(ff_rd_wl_scanout),
//msff_ctl_macro ff_tcu_array_wr_inhibit (width=1)
// ( // not a real flop ( only used as a trigger ). Works only for accesses made in PH1
// .scan_in(ff_tcu_se_scanin),
// .scan_out(ff_tcu_se_scanout),
// .din(tcu_array_wr_inhibit),
n2_l2t_dp_32x128_cust_array array (
.wr_addr(wr_wl_d1[31:0]),
.rd_addr(rd_wl_d1[31:0]),
.dout(dout_array[127:0]),
.write_disable(tcu_array_wr_inhibit)
assign ff_wr_en_scanin = scan_in ;
assign ff_ren_scanin = ff_wr_en_scanout ;
assign ff_rd_wl_scanin = ff_ren_scanout ;
assign ff_wr_wl_scanin = ff_rd_wl_scanout ;
assign ff_wdata_0_scanin = ff_wr_wl_scanout ;
assign ff_wdata_1_scanin = ff_wdata_0_scanout ;
assign scan_out = ff_wdata_1_scanout ;
//assign scan_out = ff_tcu_se_scanout ;
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
module n2_l2t_dp_32x128_cust_array (
reg [127:0] inq_ary [31:0];
for (i=0; i<32; i=i+1) begin
inq_ary[i] = {128{1'b0}};
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
always @(rd_addr or rd_en or write_disable or wr_en or wr_addr or l1clk)
// ---- \/ added the write_disable qual on 11/11 \/------
if (rd_en & ~write_disable) begin
case(rd_addr & {32{~write_disable}})
32'b0000_0000_0000_0000_0000_0000_0000_0000: ; // do nothing
32'b0000_0000_0000_0000_0000_0000_0000_0001: rdptr_d1 = 5'b00000;
32'b0000_0000_0000_0000_0000_0000_0000_0010: rdptr_d1 = 5'b00001;
32'b0000_0000_0000_0000_0000_0000_0000_0100: rdptr_d1 = 5'b00010;
32'b0000_0000_0000_0000_0000_0000_0000_1000: rdptr_d1 = 5'b00011;
32'b0000_0000_0000_0000_0000_0000_0001_0000: rdptr_d1 = 5'b00100;
32'b0000_0000_0000_0000_0000_0000_0010_0000: rdptr_d1 = 5'b00101;
32'b0000_0000_0000_0000_0000_0000_0100_0000: rdptr_d1 = 5'b00110;
32'b0000_0000_0000_0000_0000_0000_1000_0000: rdptr_d1 = 5'b00111;
32'b0000_0000_0000_0000_0000_0001_0000_0000: rdptr_d1 = 5'b01000;
32'b0000_0000_0000_0000_0000_0010_0000_0000: rdptr_d1 = 5'b01001;
32'b0000_0000_0000_0000_0000_0100_0000_0000: rdptr_d1 = 5'b01010;
32'b0000_0000_0000_0000_0000_1000_0000_0000: rdptr_d1 = 5'b01011;
32'b0000_0000_0000_0000_0001_0000_0000_0000: rdptr_d1 = 5'b01100;
32'b0000_0000_0000_0000_0010_0000_0000_0000: rdptr_d1 = 5'b01101;
32'b0000_0000_0000_0000_0100_0000_0000_0000: rdptr_d1 = 5'b01110;
32'b0000_0000_0000_0000_1000_0000_0000_0000: rdptr_d1 = 5'b01111;
32'b0000_0000_0000_0001_0000_0000_0000_0000: rdptr_d1 = 5'b10000;
32'b0000_0000_0000_0010_0000_0000_0000_0000: rdptr_d1 = 5'b10001;
32'b0000_0000_0000_0100_0000_0000_0000_0000: rdptr_d1 = 5'b10010;
32'b0000_0000_0000_1000_0000_0000_0000_0000: rdptr_d1 = 5'b10011;
32'b0000_0000_0001_0000_0000_0000_0000_0000: rdptr_d1 = 5'b10100;
32'b0000_0000_0010_0000_0000_0000_0000_0000: rdptr_d1 = 5'b10101;
32'b0000_0000_0100_0000_0000_0000_0000_0000: rdptr_d1 = 5'b10110;
32'b0000_0000_1000_0000_0000_0000_0000_0000: rdptr_d1 = 5'b10111;
32'b0000_0001_0000_0000_0000_0000_0000_0000: rdptr_d1 = 5'b11000;
32'b0000_0010_0000_0000_0000_0000_0000_0000: rdptr_d1 = 5'b11001;
32'b0000_0100_0000_0000_0000_0000_0000_0000: rdptr_d1 = 5'b11010;
32'b0000_1000_0000_0000_0000_0000_0000_0000: rdptr_d1 = 5'b11011;
32'b0001_0000_0000_0000_0000_0000_0000_0000: rdptr_d1 = 5'b11100;
32'b0010_0000_0000_0000_0000_0000_0000_0000: rdptr_d1 = 5'b11101;
32'b0100_0000_0000_0000_0000_0000_0000_0000: rdptr_d1 = 5'b11110;
32'b1000_0000_0000_0000_0000_0000_0000_0000: rdptr_d1 = 5'b11111;
default: rdptr_d1 = 5'bx ;
rd_data = inq_ary[rdptr_d1];
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
always @ (write_disable or wr_en or wr_addr or din or l1clk)
if((wr_en==1'bx) & ~l1clk)
else if(wr_en & ~write_disable & ~l1clk)
32'b0000_0000_0000_0000_0000_0000_0000_0000: ; // do nothing
32'b0000_0000_0000_0000_0000_0000_0000_0001: wrptr_d1 = 5'b00000;
32'b0000_0000_0000_0000_0000_0000_0000_0010: wrptr_d1 = 5'b00001;
32'b0000_0000_0000_0000_0000_0000_0000_0100: wrptr_d1 = 5'b00010;
32'b0000_0000_0000_0000_0000_0000_0000_1000: wrptr_d1 = 5'b00011;
32'b0000_0000_0000_0000_0000_0000_0001_0000: wrptr_d1 = 5'b00100;
32'b0000_0000_0000_0000_0000_0000_0010_0000: wrptr_d1 = 5'b00101;
32'b0000_0000_0000_0000_0000_0000_0100_0000: wrptr_d1 = 5'b00110;
32'b0000_0000_0000_0000_0000_0000_1000_0000: wrptr_d1 = 5'b00111;
32'b0000_0000_0000_0000_0000_0001_0000_0000: wrptr_d1 = 5'b01000;
32'b0000_0000_0000_0000_0000_0010_0000_0000: wrptr_d1 = 5'b01001;
32'b0000_0000_0000_0000_0000_0100_0000_0000: wrptr_d1 = 5'b01010;
32'b0000_0000_0000_0000_0000_1000_0000_0000: wrptr_d1 = 5'b01011;
32'b0000_0000_0000_0000_0001_0000_0000_0000: wrptr_d1 = 5'b01100;
32'b0000_0000_0000_0000_0010_0000_0000_0000: wrptr_d1 = 5'b01101;
32'b0000_0000_0000_0000_0100_0000_0000_0000: wrptr_d1 = 5'b01110;
32'b0000_0000_0000_0000_1000_0000_0000_0000: wrptr_d1 = 5'b01111;
32'b0000_0000_0000_0001_0000_0000_0000_0000: wrptr_d1 = 5'b10000;
32'b0000_0000_0000_0010_0000_0000_0000_0000: wrptr_d1 = 5'b10001;
32'b0000_0000_0000_0100_0000_0000_0000_0000: wrptr_d1 = 5'b10010;
32'b0000_0000_0000_1000_0000_0000_0000_0000: wrptr_d1 = 5'b10011;
32'b0000_0000_0001_0000_0000_0000_0000_0000: wrptr_d1 = 5'b10100;
32'b0000_0000_0010_0000_0000_0000_0000_0000: wrptr_d1 = 5'b10101;
32'b0000_0000_0100_0000_0000_0000_0000_0000: wrptr_d1 = 5'b10110;
32'b0000_0000_1000_0000_0000_0000_0000_0000: wrptr_d1 = 5'b10111;
32'b0000_0001_0000_0000_0000_0000_0000_0000: wrptr_d1 = 5'b11000;
32'b0000_0010_0000_0000_0000_0000_0000_0000: wrptr_d1 = 5'b11001;
32'b0000_0100_0000_0000_0000_0000_0000_0000: wrptr_d1 = 5'b11010;
32'b0000_1000_0000_0000_0000_0000_0000_0000: wrptr_d1 = 5'b11011;
32'b0001_0000_0000_0000_0000_0000_0000_0000: wrptr_d1 = 5'b11100;
32'b0010_0000_0000_0000_0000_0000_0000_0000: wrptr_d1 = 5'b11101;
32'b0100_0000_0000_0000_0000_0000_0000_0000: wrptr_d1 = 5'b11110;
32'b1000_0000_0000_0000_0000_0000_0000_0000: wrptr_d1 = 5'b11111;
default: wrptr_d1= 5'bx ;
inq_ary[wrptr_d1] = din ;
inq_ary[wrptr_d1] = din ;
// any PARAMS parms go into naming of macro
module n2_l2t_dp_32x128_cust_l1clkhdr_ctl_macro (
// any PARAMS parms go into naming of macro
module n2_l2t_dp_32x128_cust_msff_ctl_macro__scanreverse_1__width_64 (
assign fdin[63:0] = din[63:0];
.so({scan_out,so[0:62]}),
// any PARAMS parms go into naming of macro
module n2_l2t_dp_32x128_cust_msff_ctl_macro__width_1 (
assign fdin[0:0] = din[0:0];
// any PARAMS parms go into naming of macro
module n2_l2t_dp_32x128_cust_msff_ctl_macro__width_32 (
assign fdin[31:0] = din[31:0];
.so({so[30:0],scan_out}),
// macro for cl_mc1_sram_msff_mo_{16,8,4}x flops
module n2_l2t_dp_32x128_cust_sram_msff_mo_macro__width_1 (
//place::generic_place($width,$stack,$left);