// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: n2_l2t_dp_32x160_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_32x160_cust (
wire ff_read_enable_scanin;
wire ff_read_enable_scanout;
wire ff_read_enable0_unused;
wire ff_read_enable1_unused;
wire ff_read_enable2_unused;
wire ff_word_wen_scanout;
wire ff_read_addr_scanin;
wire ff_read_addr_scanout;
wire [4:0] ff_read_addr_mq_l_unused;
wire [4:0] ff_read_addr_q_unused;
wire [4:0] ff_read_addr_q_l_unused;
input [159:0] din; // data input
input [4:0] rd_adr1; // read addr1
input [4:0] rd_adr2; // read addr2
input sel_rdaddr1; // sel read addr1
input [4:0] wr_adr; // write addr
input wr_en ; // used in conjunction with
input [3:0] word_wen; // word enables ( if you don't use these
input tcu_array_wr_inhibit; // used to gate off write during scan.
input tcu_se_scancollar_in; // hold scan in data.
// synopsys translate_off
wire [4:0] rd_adr_mux_out;
// scan chain connections ////
assign pce_ov = tcu_pce_ov;
n2_l2t_dp_32x160_cust_l1clkhdr_ctl_macro clkgen_andclk
n2_l2t_dp_32x160_cust_l1clkhdr_ctl_macro clkgen_clk_en
.se (tcu_se_scancollar_in),
n2_l2t_dp_32x160_cust_msff_ctl_macro__scanreverse_1__width_80 ff_wdata_0
.scan_in(ff_wdata_0_scanin),
.scan_out(ff_wdata_0_scanout),
n2_l2t_dp_32x160_cust_msff_ctl_macro__scanreverse_1__width_80 ff_wdata_1
.scan_in(ff_wdata_1_scanin),
.scan_out(ff_wdata_1_scanout),
.dout(wrdata_d1[159:80]),
n2_l2t_dp_32x160_cust_msff_ctl_macro__width_1 ff_wr_en (
.scan_in(ff_wr_en_scanin),
.scan_out(ff_wr_en_scanout),
n2_l2t_dp_32x160_cust_msff_ctl_macro__scanreverse_1__width_5 ff_wr_adr (
.scan_in(ff_wr_adr_scanin),
.scan_out(ff_wr_adr_scanout),
n2_l2t_dp_32x160_cust_sram_msff_mo_macro__width_1 ff_read_enable
.scan_in(ff_read_enable_scanin),
.scan_out(ff_read_enable_scanout),
.q(ff_read_enable0_unused),
.q_l(ff_read_enable1_unused),
.mq_l(ff_read_enable2_unused),
n2_l2t_dp_32x160_cust_msff_ctl_macro__scanreverse_1__width_4 ff_word_wen
.scan_in(ff_word_wen_scanin),
.scan_out(ff_word_wen_scanout),
n2_l2t_dp_32x160_cust_inv_macro__width_1 sel_rdaddr1_inv
n2_l2t_dp_32x160_cust_mux_macro__mux_aonpe__ports_2__width_5 mux_rd_addr
.dout (rd_adr_mux_out[4:0]),
n2_l2t_dp_32x160_cust_sram_msff_mo_macro__scanreverse_1__width_5 ff_read_addr
.scan_in(ff_read_addr_scanin),
.scan_out(ff_read_addr_scanout),
.mq_l(ff_read_addr_mq_l_unused[4:0]),
.q(ff_read_addr_q_unused[4:0]),
.q_l(ff_read_addr_q_l_unused[4:0]),
n2_l2t_dp_32x160_cust_array array (
.tcu_array_wr_inhibit(tcu_array_wr_inhibit),
.word_wen(word_wen_d1[3:0])
assign ff_wdata_0_scanin = scan_in ;
assign ff_word_wen_scanin = ff_wdata_0_scanout ;
assign ff_wr_en_scanin = ff_word_wen_scanout ;
assign ff_wr_adr_scanin = ff_wr_en_scanout ;
assign ff_read_addr_scanin = ff_wr_adr_scanout ;
assign ff_read_enable_scanin = ff_read_addr_scanout ;
assign ff_wdata_1_scanin = ff_read_enable_scanout ;
assign scan_out = ff_wdata_1_scanout ;
module n2_l2t_dp_32x160_cust_array (
input tcu_array_wr_inhibit;
assign write_disable = tcu_array_wr_inhibit;
//assign read_disable = tcu_array_wr_inhibit;
reg [159:0] inq_ary [31:0];
reg [159:0] temp, tmp_dout;
for (j1=0; j1<32; j1=j1+1) begin
inq_ary [j1] = {160{1'b0}};
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
always @(rd_addr or rd_en or tmp_dout or write_disable or word_wen or wr_en or wr_addr or l1clk)
if (rd_en & ~write_disable)
for(rd_i=0; rd_i< 160; rd_i=rd_i+4)
tmp_dout = inq_ary[rd_addr] ;
if((rd_addr == wr_addr)) begin
dout[rd_i] = ( word_wen[0] & wr_en & ~write_disable )?
dout[rd_i+1] = ( word_wen[1] & wr_en & ~write_disable )?
1'bx : tmp_dout[rd_i+1] ;
dout[rd_i+2] = ( word_wen[2] & wr_en & ~write_disable )?
1'bx : tmp_dout[rd_i+2] ;
dout[rd_i+3] = ( word_wen[3] & wr_en & ~write_disable )?
1'bx : tmp_dout[rd_i+3] ;
dout[rd_i] = tmp_dout[rd_i] ;
dout[rd_i+1] = tmp_dout[rd_i+1] ;
dout[rd_i+2] = tmp_dout[rd_i+2] ;
dout[rd_i+3] = tmp_dout[rd_i+3] ;
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
always @(write_disable or word_wen or wr_en or din or wr_addr or temp or l1clk)
if(wr_en & ~write_disable & ~l1clk)
for (wr_i=0; wr_i<160; wr_i=wr_i+4)
data_in[wr_i] = ( word_wen[0] & wr_en & ~write_disable ) ?
data_in[wr_i+1] = ( word_wen[1] & wr_en & ~write_disable ) ?
din[wr_i+1] : temp[wr_i+1] ;
data_in[wr_i+2] = ( word_wen[2] & wr_en & ~write_disable ) ?
din[wr_i+2] : temp[wr_i+2] ;
data_in[wr_i+3] = ( word_wen[3] & wr_en & ~write_disable ) ?
din[wr_i+3] : temp[wr_i+3] ;
inq_ary[wr_addr] = data_in ;
// any PARAMS parms go into naming of macro
module n2_l2t_dp_32x160_cust_l1clkhdr_ctl_macro (
// any PARAMS parms go into naming of macro
module n2_l2t_dp_32x160_cust_msff_ctl_macro__scanreverse_1__width_80 (
assign fdin[79:0] = din[79:0];
.so({scan_out,so[0:78]}),
// any PARAMS parms go into naming of macro
module n2_l2t_dp_32x160_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_32x160_cust_msff_ctl_macro__scanreverse_1__width_5 (
assign fdin[4:0] = din[4:0];
// macro for cl_mc1_sram_msff_mo_{16,8,4}x flops
module n2_l2t_dp_32x160_cust_sram_msff_mo_macro__width_1 (
//place::generic_place($width,$stack,$left);
// any PARAMS parms go into naming of macro
module n2_l2t_dp_32x160_cust_msff_ctl_macro__scanreverse_1__width_4 (
assign fdin[3:0] = din[3:0];
module n2_l2t_dp_32x160_cust_inv_macro__width_1 (
// general mux macro for pass-gate and and-or muxes with/wout priority encoders
// also for pass-gate with decoder
// any PARAMS parms go into naming of macro
module n2_l2t_dp_32x160_cust_mux_macro__mux_aonpe__ports_2__width_5 (
cl_dp1_muxbuff2_8x c0_0 (
// macro for cl_mc1_sram_msff_mo_{16,8,4}x flops
module n2_l2t_dp_32x160_cust_sram_msff_mo_macro__scanreverse_1__width_5 (
//place::generic_place($width,$stack,$left);