// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: ncu_c2ifcd_ctl.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 ============================================
tap_mondo_acc_addr_invld_d2_f,
wire mondo_data_bypass_d2;
wire mondo_addr_creg_mdata0_dec_d2;
wire mondo_addr_creg_mdata1_dec_d2;
wire mondo_addr_creg_mbusy_dec_d2;
wire cpu_mondo_addr_invld_d2;
wire [5:0] mondo_busy_addr_p0;
wire [5:0] mondo_busy_addr_p1;
wire [5:0] mondo_busy_addr_p2;
wire ncu_c2ifc_ctl_scanin;
wire ncu_c2ifc_ctl_scanout;
wire [39:0] pcx_ncu_addr;
wire [5:0] pcx_ncu_cputhr;
wire ncu_c2ifd_ctl_scanin;
wire ncu_c2ifd_ctl_scanout;
input cmp_io_sync_en; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v, ...
input [5:0] cpubuf_head_s; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
input intbuf_hit_hwm; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
input io_cmp_sync_en; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v, ...
input [63:0] io_mondo_data0_din_s; // To ncu_c2ifd_ctl of ncu_c2ifd_ctl.v
input [63:0] io_mondo_data1_din_s; // To ncu_c2ifd_ctl of ncu_c2ifd_ctl.v
input [5:0] io_mondo_data_wr_addr_s;// To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
input io_mondo_data_wr_s; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
input l2clk; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v, ...
input [71:0] mondo_data0_dout; // To ncu_c2ifd_ctl of ncu_c2ifd_ctl.v
input [71:0] mondo_data1_dout; // To ncu_c2ifd_ctl of ncu_c2ifd_ctl.v
input [129:0] pcx_ncu_data_px2; // To ncu_c2ifd_ctl of ncu_c2ifd_ctl.v
input pcx_ncu_data_rdy_px1; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
input scan_in; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
input [21:0] tap_mondo_acc_addr_s; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
input tap_mondo_acc_seq_s; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
input [63:0] tap_mondo_din_s; // To ncu_c2ifd_ctl of ncu_c2ifd_ctl.v
input tap_mondo_wr_s; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
input tcu_clk_stop; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v, ...
input tcu_pce_ov; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v, ...
input tcu_aclk; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v, ...
input tcu_bclk; // To ncu_c2ifc_ctl of ncu_c2ifc_ctl.v, ...
output [143:0] cpubuf_din; // From ncu_c2ifd_ctl of ncu_c2ifd_ctl.v
output [5:0] cpubuf_tail_f; // From ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
output [4:0] cpubuf_tail_ptr; // From ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
output cpubuf_wr; // From ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
output intbuf_wr; // From ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
output [143:0] intbuf_din; // From ncu_c2ifd_ctl of ncu_c2ifd_ctl.v
output [63:0] mondo_busy_vec_f; // From ncu_c2ifd_ctl of ncu_c2ifd_ctl.v
output [71:0] mondo_data0_din; // From ncu_c2ifd_ctl of ncu_c2ifd_ctl.v
output mondo_data0_wr; // From ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
output [71:0] mondo_data1_din; // From ncu_c2ifd_ctl of ncu_c2ifd_ctl.v
output mondo_data1_wr; // From ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
output [5:0] mondo_data_addr_p0; // From ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
output [5:0] mondo_data_addr_p1; // From ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
output ncu_pcx_stall_pq; // From ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
output scan_out; // From ncu_c2ifd_ctl of ncu_c2ifd_ctl.v
output tap_mondo_acc_addr_invld_d2_f;// From ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
output tap_mondo_acc_seq_d2_f; // From ncu_c2ifc_ctl of ncu_c2ifc_ctl.v
output [63:0] tap_mondo_dout_d2_f; // From ncu_c2ifd_ctl of ncu_c2ifd_ctl.v
//assign mondo_rd_en = mb0_run ? mb0_mondo_rd_en : 1'b1;
assign mondo_rd_en = mb0_run ? mb0_mondo_rd_en : ~((mondo_data_addr_p0[5:0]==mondo_data_addr_p1[5:0])&
(mondo_data0_wr|mondo_data1_wr));
/*****************************************************************
*****************************************************************/
///* ncu_c2ifc_ctl auto_template (
ncu_c2ifc_ctl ncu_c2ifc_ctl (/*AUTOINST*/
.ncu_pcx_stall_pq(ncu_pcx_stall_pq),
.io_mondo_data_wr(io_mondo_data_wr),
.mondo_data_bypass_d2(mondo_data_bypass_d2),
.mondo_addr_creg_mdata0_dec_d2(mondo_addr_creg_mdata0_dec_d2),
.mondo_addr_creg_mdata1_dec_d2(mondo_addr_creg_mdata1_dec_d2),
.mondo_addr_creg_mbusy_dec_d2(mondo_addr_creg_mbusy_dec_d2),
.tap_mondo_rd_d2(tap_mondo_rd_d2),
.cpu_mondo_addr_invld_d2(cpu_mondo_addr_invld_d2),
.cpubuf_tail_f(cpubuf_tail_f[5:0]),
.intbuf_wr2i2c(intbuf_wr2i2c),
.cpu_mondo_rd_d2(cpu_mondo_rd_d2),
.tap_mondo_acc_addr_invld_d2_f(tap_mondo_acc_addr_invld_d2_f),
.tap_mondo_acc_seq_d2_f(tap_mondo_acc_seq_d2_f),
.mondo_data_addr_p0(mondo_data_addr_p0[5:0]),
.mondo_busy_addr_p0(mondo_busy_addr_p0[5:0]),
.mondo_data_addr_p1(mondo_data_addr_p1[5:0]),
.mondo_busy_addr_p1(mondo_busy_addr_p1[5:0]),
.mondo_busy_wr_p1(mondo_busy_wr_p1),
.mondo_busy_addr_p2(mondo_busy_addr_p2[5:0]),
.mondo_busy_wr_p2(mondo_busy_wr_p2),
.mondo_data0_wr(mondo_data0_wr),
.mondo_data1_wr(mondo_data1_wr),
.cpubuf_tail_ptr(cpubuf_tail_ptr[4:0]),
.scan_in(ncu_c2ifc_ctl_scanin),
.scan_out(ncu_c2ifc_ctl_scanout),
.cmp_io_sync_en(cmp_io_sync_en),
.io_cmp_sync_en(io_cmp_sync_en),
.tcu_scan_en(tcu_scan_en),
.tcu_clk_stop(tcu_clk_stop),
.pcx_ncu_data_rdy_px1(pcx_ncu_data_rdy_px1),
.pcx_ncu_vld(pcx_ncu_vld),
.pcx_ncu_req(pcx_ncu_req[4:0]),
.pcx_ncu_addr(pcx_ncu_addr[39:0]),
.pcx_ncu_cputhr(pcx_ncu_cputhr[5:0]),
.cpubuf_head_s(cpubuf_head_s[5:0]),
.intbuf_hit_hwm(intbuf_hit_hwm),
.io_mondo_data_wr_s(io_mondo_data_wr_s),
.io_mondo_data_wr_addr_s(io_mondo_data_wr_addr_s[5:0]),
.tap_mondo_acc_addr_s(tap_mondo_acc_addr_s[21:0]),
.tap_mondo_acc_seq_s(tap_mondo_acc_seq_s),
.tap_mondo_wr_s(tap_mondo_wr_s),
.mb1_cpubuf_wr_en(mb1_cpubuf_wr_en),
.mb1_waddr(mb1_addr[5:0]),
.mb0_intbuf_wr_en(mb0_intbuf_wr_en),
.mb0_waddr (mb0_waddr[5:0]),
.mb0_raddr (mb0_raddr[5:0]),
.mb0_mondo_wr_en(mb0_mondo_wr_en));
/*****************************************************************
* cpu-to-io fast datapath
*****************************************************************/
///* ncu_c2ifd_ctl auto_template (
ncu_c2ifd_ctl ncu_c2ifd_ctl (/*AUTOINST*/
.pcx_ncu_vld(pcx_ncu_vld),
.pcx_ncu_req(pcx_ncu_req[4:0]),
.pcx_ncu_addr(pcx_ncu_addr[39:0]),
.pcx_ncu_cputhr(pcx_ncu_cputhr[5:0]),
.tap_mondo_dout_d2_f(tap_mondo_dout_d2_f[63:0]),
.mondotbl_pe_f(mondotbl_pe_f),
.intbuf_din(intbuf_din[143:0]),
.mondo_data0_din(mondo_data0_din[71:0]),
.mondo_data1_din(mondo_data1_din[71:0]),
.mondo_busy_vec_f(mondo_busy_vec_f[63:0]),
.cpubuf_din(cpubuf_din[143:0]),
.scan_in(ncu_c2ifd_ctl_scanin),
.scan_out(ncu_c2ifd_ctl_scanout),
.cmp_io_sync_en(cmp_io_sync_en),
.io_cmp_sync_en(io_cmp_sync_en),
.tcu_scan_en(tcu_scan_en),
.tcu_clk_stop(tcu_clk_stop),
.pcx_ncu_data_px2(pcx_ncu_data_px2[129:0]),
.io_mondo_data_wr(io_mondo_data_wr),
.mondo_data_bypass_d2(mondo_data_bypass_d2),
.mondo_addr_creg_mdata0_dec_d2(mondo_addr_creg_mdata0_dec_d2),
.mondo_addr_creg_mdata1_dec_d2(mondo_addr_creg_mdata1_dec_d2),
.mondo_addr_creg_mbusy_dec_d2(mondo_addr_creg_mbusy_dec_d2),
.tap_mondo_rd_d2(tap_mondo_rd_d2),
.cpu_mondo_rd_d2(cpu_mondo_rd_d2),
.cpu_mondo_addr_invld_d2(cpu_mondo_addr_invld_d2),
.io_mondo_data0_din_s(io_mondo_data0_din_s[63:0]),
.io_mondo_data1_din_s(io_mondo_data1_din_s[63:0]),
.tap_mondo_din_s(tap_mondo_din_s[63:0]),
.mb0_mondo_wr_en(mb0_mondo_wr_en),
//.mb0_intbuf_wr_en(mb0_intbuf_wr_en),
//.mb0_cpubuf_sel(mb0_cpubuf_sel),
.mb1_wdata(mb1_wdata[7:0]),
.mb1_addr(mb1_addr[5:0]),
.mb1_cpubuf_wr_en(mb1_cpubuf_wr_en),
.mb0_wdata (mb0_wdata[7:0]),
.mondotbl_pei(mondotbl_pei),
.mondo_data0_dout(mondo_data0_dout[71:0]),
.mondo_data1_dout(mondo_data1_dout[71:0]),
.mondo_busy_addr_p0(mondo_busy_addr_p0[5:0]),
.mondo_busy_addr_p1(mondo_busy_addr_p1[5:0]),
.mondo_busy_wr_p1(mondo_busy_wr_p1),
.mondo_busy_addr_p2(mondo_busy_addr_p2[5:0]),
.mondo_busy_wr_p2(mondo_busy_wr_p2));
assign ncu_c2ifc_ctl_scanin = scan_in ;
assign ncu_c2ifd_ctl_scanin = ncu_c2ifc_ctl_scanout ;
assign scan_out = ncu_c2ifd_ctl_scanout ;
// verilog-library-directories:("." "../common")
// any PARAMS parms go into naming of macro
module ncu_c2ifcd_ctl_msff_ctl_macro__width_1 (
assign fdin[0:0] = din[0:0];
// any PARAMS parms go into naming of macro
module ncu_c2ifcd_ctl_msff_ctl_macro__en_1__width_1 (
assign fdin[0:0] = (din[0:0] & {1{en}}) | (dout[0:0] & ~{1{en}});
// any PARAMS parms go into naming of macro
module ncu_c2ifcd_ctl_msff_ctl_macro__en_1__width_6 (
assign fdin[5:0] = (din[5:0] & {6{en}}) | (dout[5:0] & ~{6{en}});
// any PARAMS parms go into naming of macro
module ncu_c2ifcd_ctl_msff_ctl_macro__en_1__width_22 (
assign fdin[21:0] = (din[21:0] & {22{en}}) | (dout[21:0] & ~{22{en}});
.so({so[20:0],scan_out}),
// any PARAMS parms go into naming of macro
module ncu_c2ifcd_ctl_msff_ctl_macro__width_6 (
assign fdin[5:0] = din[5:0];
// any PARAMS parms go into naming of macro
module ncu_c2ifcd_ctl_l1clkhdr_ctl_macro (
// verilog-auto-sense-defines-constant:t
// any PARAMS parms go into naming of macro
module ncu_c2ifcd_ctl_msff_ctl_macro__width_129 (
assign fdin[128:0] = din[128:0];
.si({scan_in,so[127:0]}),
.so({so[127:0],scan_out}),
// any PARAMS parms go into naming of macro
module ncu_c2ifcd_ctl_msff_ctl_macro__en_1__width_64 (
assign fdin[63:0] = (din[63:0] & {64{en}}) | (dout[63:0] & ~{64{en}});
.so({so[62:0],scan_out}),
// any PARAMS parms go into naming of macro
module ncu_c2ifcd_ctl_msff_ctl_macro__width_72 (
assign fdin[71:0] = din[71:0];
.so({so[70:0],scan_out}),
// any PARAMS parms go into naming of macro
module ncu_c2ifcd_ctl_msff_ctl_macro__width_3 (
assign fdin[2:0] = din[2:0];
// any PARAMS parms go into naming of macro
module ncu_c2ifcd_ctl_msff_ctl_macro__width_8 (
assign fdin[7:0] = din[7:0];
// any PARAMS parms go into naming of macro
module ncu_c2ifcd_ctl_msff_ctl_macro__width_64 (
assign fdin[63:0] = din[63:0];
.so({so[62:0],scan_out}),
// any PARAMS parms go into naming of macro
module ncu_c2ifcd_ctl_msff_ctl_macro__width_122 (
assign fdin[121:0] = din[121:0];
.si({scan_in,so[120:0]}),
.so({so[120:0],scan_out}),