// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: n2_l2d_tstmod_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_l2d_tstmod_cust (
wire [1:0] msff_read_c4_scanin;
wire [1:0] msff_read_c4_scanout;
wire msff_buf_out_top_scanin;
wire msff_buf_out_top_scanout;
wire msff_buf_out_bot_scanin;
wire msff_buf_out_bot_scanout;
wire [2:0] msff_buf_out_corse_scanin;
wire [2:0] msff_buf_out_corse_scanout;
wire [2:0] msff_buf_out_fine_scanin;
wire [2:0] msff_buf_out_fine_scanout;
wire [2:0] ff_buf_out_corse_n;
wire [2:0] ff_buf_out_fine_n;
//-----------------------------------------------------------
//-----------------------------------------------------------
input wayerr_c3; // added 9/21/2005
input [3:0] coloff_c3; //
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// connecting between n2_l2d_tstmod_logic & n2_l2d_tstmod_delay_cust
//wire [1:0] tst_read_c3b;
//wire [3:0] tst_read_c4;
wire [2:0] ff_buf_out_corse;
wire [2:0] ff_buf_out_fine;
// start n2_l2d_tstmod_logic
n2_l2d_tstmod_cust_l1clkhdr_ctl_macro l1_clk_hdr (
//assign tst_read_c3a[1] = (~wayerr_c3 & rd_wr_c3 & (coloff_c3[3] | coloff_c3[1]));
//assign tst_read_c3a[0] = (~wayerr_c3 & rd_wr_c3 & (coloff_c3[2] | coloff_c3[0]));
n2_l2d_tstmod_cust_inv_macro__width_1 inv_wayerr_c3
n2_l2d_tstmod_cust_or_macro__width_1 or_coloff_c3_1_3
n2_l2d_tstmod_cust_or_macro__width_1 or_coloff_c3_2_3
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_tst_read_c3a_1
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_tst_read_c3a_0
n2_l2d_tstmod_cust_tisram_blb_macro__dmsff_4x__width_1 blb_read_c3_1
n2_l2d_tstmod_cust_tisram_blb_macro__dmsff_4x__width_1 blb_read_c3_0
//assign tst_read_c4[3:0] = 4'b0;
n2_l2d_tstmod_cust_msff_ctl_macro__fs_1__width_2 msff_read_c4
.scan_in (msff_read_c4_scanin[1:0]),
.scan_out (msff_read_c4_scanout[1:0]),
.din ( tst_read_c3a[1:0] & {~tst_bnken31_rstb_n,~tst_bnken02_rstb_n} ),
.dout ( {tst_bnken31_rstb_n,tst_bnken02_rstb_n} ),
//assign tst_bnken31_rstb = ~tst_bnken31_rstb_n;
//assign tst_bnken02_rstb = ~tst_bnken02_rstb_n;
n2_l2d_tstmod_cust_inv_macro__width_1 inv_tst_bnken31_rstb
.dout (tst_bnken31_rstb),
.din (tst_bnken31_rstb_n)
n2_l2d_tstmod_cust_inv_macro__width_1 inv_tst_bnken02_rstb
.dout (tst_bnken02_rstb),
.din (tst_bnken02_rstb_n)
n2_l2d_tstmod_cust_msff_ctl_macro__fs_1__width_1 msff_buf_out_top
.scan_in (msff_buf_out_top_scanin),
.scan_out (msff_buf_out_top_scanout),
.dout ( ff_buf_out_top ),
n2_l2d_tstmod_cust_msff_ctl_macro__fs_1__width_1 msff_buf_out_bot
.scan_in (msff_buf_out_bot_scanin),
.scan_out (msff_buf_out_bot_scanout),
.dout ( ff_buf_out_bot ),
n2_l2d_tstmod_cust_msff_ctl_macro__fs_1__width_3 msff_buf_out_corse
.scan_in (msff_buf_out_corse_scanin[2:0]),
.scan_out (msff_buf_out_corse_scanout[2:0]),
.din ( ff_buf_out_corse[2:0] ),
.dout ( ff_buf_out_corse[2:0] ),
n2_l2d_tstmod_cust_msff_ctl_macro__fs_1__width_3 msff_buf_out_fine
.scan_in (msff_buf_out_fine_scanin[2:0]),
.scan_out (msff_buf_out_fine_scanout[2:0]),
.din ( ff_buf_out_fine[2:0] ),
.dout ( ff_buf_out_fine[2:0] ),
//assign tstmod_rst_l = ff_buf_out_top & ff_buf_out_bot & ~wr_inhibit;
n2_l2d_tstmod_cust_inv_macro__width_1 inv_wr_inhibit
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_tstmod_rst_l
n2_l2d_tstmod_cust_inv_macro__width_3 inv_ff_buf_out_corse_012
.dout (ff_buf_out_corse_n[2:0]),
.din (ff_buf_out_corse[2:0])
//decoding: 3-to-8. 2/3, 1/0 swapped
//assign corse_sel[5] = ff_buf_out_corse[2] & ~ff_buf_out_corse[1] & ~ff_buf_out_corse[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_corse_sel_5
.din0 (ff_buf_out_corse[2]),
.din1 (ff_buf_out_corse_n[1]),
.din2 (ff_buf_out_corse_n[0])
//assign corse_sel[4] = ff_buf_out_corse[2] & ~ff_buf_out_corse[1] & ff_buf_out_corse[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_corse_sel_4
.din0 (ff_buf_out_corse[2]),
.din1 (ff_buf_out_corse_n[1]),
.din2 (ff_buf_out_corse[0])
//assign corse_sel[3] = ~ff_buf_out_corse[2] & ff_buf_out_corse[1] & ~ff_buf_out_corse[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_corse_sel_3
.din0 (ff_buf_out_corse_n[2]),
.din1 (ff_buf_out_corse[1]),
.din2 (ff_buf_out_corse_n[0])
//assign corse_sel[2] = ~ff_buf_out_corse[2] & ff_buf_out_corse[1] & ff_buf_out_corse[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_corse_sel_2
.din0 (ff_buf_out_corse_n[2]),
.din1 (ff_buf_out_corse[1]),
.din2 (ff_buf_out_corse[0])
//assign corse_sel[1] = ~ff_buf_out_corse[2] & ~ff_buf_out_corse[1] & ~ff_buf_out_corse[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_corse_sel_1
.din0 (ff_buf_out_corse_n[2]),
.din1 (ff_buf_out_corse_n[1]),
.din2 (ff_buf_out_corse_n[0])
//assign corse_sel[0] = ~ff_buf_out_corse[2] & ~ff_buf_out_corse[1] & ff_buf_out_corse[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_corse_sel_0
.din0 (ff_buf_out_corse_n[2]),
.din1 (ff_buf_out_corse_n[1]),
.din2 (ff_buf_out_corse[0])
n2_l2d_tstmod_cust_inv_macro__width_3 inv_ff_buf_out_fine_n
.dout (ff_buf_out_fine_n[2:0]),
.din (ff_buf_out_fine[2:0])
//assign fine_sel[7] = ff_buf_out_fine[2] & ff_buf_out_fine[1] & ~ff_buf_out_fine[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_fine_sel_7
.din0 (ff_buf_out_fine[2]),
.din1 (ff_buf_out_fine[1]),
.din2 (ff_buf_out_fine_n[0])
//assign fine_sel[6] = ff_buf_out_fine[2] & ff_buf_out_fine[1] & ff_buf_out_fine[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_fine_sel_6
.din0 (ff_buf_out_fine[2]),
.din1 (ff_buf_out_fine[1]),
.din2 (ff_buf_out_fine[0])
//assign fine_sel[5] = ff_buf_out_fine[2] & ~ff_buf_out_fine[1] & ~ff_buf_out_fine[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_fine_sel_5
.din0 (ff_buf_out_fine[2]),
.din1 (ff_buf_out_fine_n[1]),
.din2 (ff_buf_out_fine_n[0])
//assign fine_sel[4] = ff_buf_out_fine[2] & ~ff_buf_out_fine[1] & ff_buf_out_fine[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_fine_sel_4
.din0 (ff_buf_out_fine[2]),
.din1 (ff_buf_out_fine_n[1]),
.din2 (ff_buf_out_fine[0])
//assign fine_sel[3] = ~ff_buf_out_fine[2] & ff_buf_out_fine[1] & ~ff_buf_out_fine[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_fine_sel_3
.din0 (ff_buf_out_fine_n[2]),
.din1 (ff_buf_out_fine[1]),
.din2 (ff_buf_out_fine_n[0])
//assign fine_sel[2] = ~ff_buf_out_fine[2] & ff_buf_out_fine[1] & ff_buf_out_fine[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_fine_sel_2
.din0 (ff_buf_out_fine_n[2]),
.din1 (ff_buf_out_fine[1]),
.din2 (ff_buf_out_fine[0])
//assign fine_sel[1] = ~ff_buf_out_fine[2] & ~ff_buf_out_fine[1] & ~ff_buf_out_fine[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_fine_sel_1
.din0 (ff_buf_out_fine_n[2]),
.din1 (ff_buf_out_fine_n[1]),
.din2 (ff_buf_out_fine_n[0])
//assign fine_sel[0] = ~ff_buf_out_fine[2] & ~ff_buf_out_fine[1] & ff_buf_out_fine[0];
n2_l2d_tstmod_cust_and_macro__ports_3__width_1 and_fine_sel_0
.din0 (ff_buf_out_fine_n[2]),
.din1 (ff_buf_out_fine_n[1]),
.din2 (ff_buf_out_fine[0])
//end of n2_l2d_tstmod_logic
n2_l2d_tstmod_delay_cust tstmod_delay // NOT ATPGABLE
.tstmod_rst_l (tstmod_rst_l),
.tst_bnken31_setb(tst_bnken31_setb),
.tst_bnken02_setb(tst_bnken02_setb),
.tst_bnken31_rstb(tst_bnken31_rstb),
.tst_bnken02_rstb(tst_bnken02_rstb),
.corse_sel (corse_sel[5:0]),
.fine_sel (fine_sel[7:0]),
.delout31_lft (delout31_lft),
.delout31_rgt (delout31_rgt),
.delout20_lft (delout20_lft),
.delout20_rgt (delout20_rgt)
//msff_read_c4_scanin[1:0]
//msff_buf_out_top_scanin
//msff_buf_out_corse_scanin[0]
//msff_buf_out_corse_scanin[1]
//msff_buf_out_corse_scanin[2]
//msff_buf_out_fine_scanin[0]
//msff_buf_out_fine_scanin[1]
//msff_buf_out_fine_scanin[2]
//msff_buf_out_bot_scanin
// scanorder end281 // fixscan start
assign msff_read_c4_scanin[1]=si;
assign msff_read_c4_scanin[0]=msff_read_c4_scanout[1];
assign msff_buf_out_top_scanin=msff_read_c4_scanout[0];
assign msff_buf_out_corse_scanin[0]=msff_buf_out_top_scanout;
assign msff_buf_out_corse_scanin[1]=msff_buf_out_corse_scanout[0];
assign msff_buf_out_corse_scanin[2]=msff_buf_out_corse_scanout[1];
assign msff_buf_out_fine_scanin[0]=msff_buf_out_corse_scanout[2];
assign msff_buf_out_fine_scanin[1]=msff_buf_out_fine_scanout[0];
assign msff_buf_out_fine_scanin[2]=msff_buf_out_fine_scanout[1];
assign msff_buf_out_bot_scanin=msff_buf_out_fine_scanout[2];
assign so=msff_buf_out_bot_scanout;
endmodule // main program
//////////////////////////////////////////////
//////////////////////////////////////////////
//////////////////////////////////////////////
//////////////////////////////////////////////
//////////////////////////////////////////////
//////////////////////////////////////////////
//////////////////////////////////////////////
//////////////////////////////////////////////
//////////////////////////////////////////////
//////////////////////////////////////////////
//////////////////////////////////////////////
// THE FOLLOWING MODULE IS BLACKBOX TO ATPG
//////////////////////////////////////////////
module n2_l2d_tstmod_delay_cust (
wire [5:0] corse_sel_muxout;
wire [7:1] fine_sel_muxout;
assign corse_sel_muxout[5:0] = ( {1'b0,corse_sel_muxout[5:1]} & {~({5{tstmod_rst_l}} & corse_sel[5:1]),(tstmod_rst_l & ~corse_sel[0])}) |
({6{l1clk}} & {{{5{tstmod_rst_l}} & corse_sel[5:1]},(~(tstmod_rst_l & ~corse_sel[0])) & tstmod_rst_l});
//assign fine_sel_muxout[7:1] = ( ({corse_sel_muxout[0],fine_sel_muxout[7:2]}) & (~fine_sel[7:1]) )
// | ({&{corse_sel_muxout[0]}} & fine_sel[7:1]);
assign fine_sel_muxout[7:1] = ( ({corse_sel_muxout[0],fine_sel_muxout[7:2]}) & (~fine_sel[7:1]) ) |
({7{corse_sel_muxout[0]}} & fine_sel[7:1]);
.setl (~(l1clk & tstmod_rst_l & tst_bnken31_setb)),
.rstl2 (l1clk|~tst_bnken31_rstb),
.setl (~(l1clk & tstmod_rst_l & tst_bnken02_setb)),
.rstl2 (l1clk|~tst_bnken02_rstb),
.setl1 (~(fine_sel_muxout[1] & delayline_en_31 & ~fine_sel[0])),
.setl2 (~(corse_sel_muxout[0] & delayline_en_31 & fine_sel[0])),
.setl1 (~(fine_sel_muxout[1] & delayline_en_02 & ~fine_sel[0])),
.setl2 (~(corse_sel_muxout[0] & delayline_en_02 & fine_sel[0])),
assign delout31_lft = ~fine_dout_31;
assign delout31_rgt = ~fine_dout_31;
assign delout20_lft = ~fine_dout_02;
assign delout20_rgt = ~fine_dout_02;
endmodule //n2_l2d_tstmod_delay_cust
always @(setl or rstl1 or rstl2)
else if( ~(rstl1 & rstl2) ) out = 1'b0;
always @(setl1 or setl2 or rstl) begin
if( (setl1==0) || (setl2==0)) out = 1'b1;
else if(~rstl) out = 1'b0;
// any PARAMS parms go into naming of macro
module n2_l2d_tstmod_cust_l1clkhdr_ctl_macro (
module n2_l2d_tstmod_cust_inv_macro__width_1 (
// or macro for ports = 2,3
module n2_l2d_tstmod_cust_or_macro__width_1 (
// and macro for ports = 2,3,4
module n2_l2d_tstmod_cust_and_macro__ports_3__width_1 (
// macro for cl_mc1_tisram_blb_{8,4}x flops
module n2_l2d_tstmod_cust_tisram_blb_macro__dmsff_4x__width_1 (
//place::generic_place($width,$stack,$left);
// any PARAMS parms go into naming of macro
module n2_l2d_tstmod_cust_msff_ctl_macro__fs_1__width_2 (
assign fdin[1:0] = din[1:0];
// any PARAMS parms go into naming of macro
module n2_l2d_tstmod_cust_msff_ctl_macro__fs_1__width_1 (
assign fdin[0:0] = din[0:0];
// any PARAMS parms go into naming of macro
module n2_l2d_tstmod_cust_msff_ctl_macro__fs_1__width_3 (
assign fdin[2:0] = din[2:0];
module n2_l2d_tstmod_cust_inv_macro__width_3 (