// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: n2_ict_sp_1920b_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_ict_sp_1920b_cust (
wire [2:0] wrway_b_unused;
wire index_reg_i_5_scanin;
wire index_reg_i_5_scanout;
wire [10:5] index_f_l_unused;
wire index_reg_i_6_scanin;
wire index_reg_i_6_scanout;
wire index_reg_i_7_scanin;
wire index_reg_i_7_scanout;
wire index_reg_i_8_scanin;
wire index_reg_i_8_scanout;
wire index_reg_i_9_scanin;
wire index_reg_i_9_scanout;
wire index_reg_i_10_scanin;
wire index_reg_i_10_scanout;
wire rdreq_reg_dup_scanin;
wire rdreq_reg_dup_scanout;
wire rdreq_f_l_dup_unused;
wire wrreq_reg_dup_scanin;
wire wrreq_reg_dup_scanout;
wire [29:0] wrtag_reg_in;
wire [29:0] wrtag_reg_out;
wire [29:0] ic_wrtag_f_l;
input tcu_se_scancollar_in;
input tcu_array_wr_inhibit;
input [10:5] agd_ic_index_bf;
input [2:0] agc_fill_wrway_bf; // way to write to, this is
// sent by the l2c over the cpx
input [29:0] agd_ict_wrtag_bf; // tag + 1b parity
output [29:0] ict_itlb_way_0_tag_f; // Tag compare is done in TLB block
output [29:0] ict_itlb_way_1_tag_f; // Tag compare is done in TLB block
output [29:0] ict_itlb_way_2_tag_f; // Tag compare is done in TLB block
output [29:0] ict_itlb_way_3_tag_f; // Tag compare is done in TLB block
output [29:0] ict_itlb_way_4_tag_f; // Tag compare is done in TLB block
output [29:0] ict_itlb_way_5_tag_f; // Tag compare is done in TLB block
output [29:0] ict_itlb_way_6_tag_f; // Tag compare is done in TLB block
output [29:0] ict_itlb_way_7_tag_f; // Tag compare is done in TLB block
// synopsys translate_off
//================================================
//================================================
// This clock gates the wrtag input flops.
n2_ict_sp_1920b_cust_l1clkhdr_ctl_macro l1ch_din (
.se (tcu_se_scancollar_in),
n2_ict_sp_1920b_cust_l1clkhdr_ctl_macro l1ch_in (
.se (tcu_se_scancollar_in),
// This clock gates the array and internal logic.
n2_ict_sp_1920b_cust_l1clkhdr_ctl_macro l1ch_free (
assign pce_ov = tcu_pce_ov;
assign siclk = tcu_aclk ;
assign wr_inhibit = tcu_array_wr_inhibit;
// assign wr_en_way_0_f = wrreq_f & (wrway_f[2:0] == 3'b000) ;
// assign wr_en_way_1_f = wrreq_f & (wrway_f[2:0] == 3'b001) ;
// assign wr_en_way_2_f = wrreq_f & (wrway_f[2:0] == 3'b010) ;
// assign wr_en_way_3_f = wrreq_f & (wrway_f[2:0] == 3'b011) ;
// assign wr_en_way_4_f = wrreq_f & (wrway_f[2:0] == 3'b100) ;
// assign wr_en_way_5_f = wrreq_f & (wrway_f[2:0] == 3'b101) ;
// assign wr_en_way_6_f = wrreq_f & (wrway_f[2:0] == 3'b110) ;
// assign wr_en_way_7_f = wrreq_f & (wrway_f[2:0] == 3'b111) ;
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
n2_ict_sp_1920b_cust_mux_macro__mux_aodec__ports_8__width_8 wr_way_decode (
n2_ict_sp_1920b_cust_inv_macro__width_1 wr_inhibit_gate (
n2_ict_sp_1920b_cust_and_macro__ports_3__width_8 wr_en_gate (
assign wr_en_way_f[7:0] = wr_en_way_b[7:0] ;
assign wr_en_unused[7:0] = wr_en_way_f[7:0] ;
///////////////////////////////////////////////////////////////
// Scan chain connections //
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
n2_ict_sp_1920b_cust_tisram_msff_macro__width_3 wrway_reg (
.scan_in(wrway_reg_scanin),
.scan_out(wrway_reg_scanout),
.d ( agc_fill_wrway_bf[2:0] ),
.latout_l( wrway_b_unused[2:0] ),
n2_ict_sp_1920b_cust_tisram_msff_macro__width_1 index_reg_i_5 (
.scan_in(index_reg_i_5_scanin),
.scan_out(index_reg_i_5_scanout),
.d ( agd_ic_index_bf[5] ),
.latout_l( index_f_l_unused[5] ),
n2_ict_sp_1920b_cust_tisram_msff_macro__width_1 index_reg_i_6 (
.scan_in(index_reg_i_6_scanin),
.scan_out(index_reg_i_6_scanout),
.d ( agd_ic_index_bf[6] ),
.latout_l( index_f_l_unused[6] ),
n2_ict_sp_1920b_cust_tisram_msff_macro__width_1 index_reg_i_7 (
.scan_in(index_reg_i_7_scanin),
.scan_out(index_reg_i_7_scanout),
.d ( agd_ic_index_bf[7] ),
.latout_l( index_f_l_unused[7] ),
n2_ict_sp_1920b_cust_tisram_msff_macro__width_1 index_reg_i_8 (
.scan_in(index_reg_i_8_scanin),
.scan_out(index_reg_i_8_scanout),
.d ( agd_ic_index_bf[8] ),
.latout_l( index_f_l_unused[8] ),
n2_ict_sp_1920b_cust_tisram_msff_macro__width_1 index_reg_i_9 (
.scan_in(index_reg_i_9_scanin),
.scan_out(index_reg_i_9_scanout),
.d ( agd_ic_index_bf[9] ),
.latout_l( index_f_l_unused[9] ),
n2_ict_sp_1920b_cust_tisram_msff_macro__width_1 index_reg_i_10 (
.scan_in(index_reg_i_10_scanin),
.scan_out(index_reg_i_10_scanout),
.d ( agd_ic_index_bf[10] ),
.latout_l( index_f_l_unused[10] ),
n2_ict_sp_1920b_cust_msff_ctl_macro__width_1 rdreq_reg (
.scan_in(rdreq_reg_scanin),
.scan_out(rdreq_reg_scanout),
.din ( ftp_tg_rd_req_bf ),
assign rdreq_f = rdreq_a ;
assign rdreq_f_unused = rdreq_f ;
n2_ict_sp_1920b_cust_msff_ctl_macro__width_1 wrreq_reg (
.scan_in(wrreq_reg_scanin),
.scan_out(wrreq_reg_scanout),
.din ( ftp_tg_wr_req_bf ),
n2_ict_sp_1920b_cust_tisram_msff_macro__width_1 rdreq_reg_dup (
.scan_in(rdreq_reg_dup_scanin),
.scan_out(rdreq_reg_dup_scanout),
.latout_l( rdreq_f_l_dup_unused ),
n2_ict_sp_1920b_cust_tisram_msff_macro__width_1 wrreq_reg_dup (
.scan_in(wrreq_reg_dup_scanin),
.scan_out(wrreq_reg_dup_scanout),
n2_ict_sp_1920b_cust_and_macro__ports_3__width_1 read_and (
assign wrtag_reg_in[29:0] = {agd_ict_wrtag_bf[0],
n2_ict_sp_1920b_cust_msffi_ctl_macro__width_30 wrtag_reg (
.scan_in(wrtag_reg_scanin),
.scan_out(wrtag_reg_scanout),
.din(wrtag_reg_in[29:0]),
.q_l (wrtag_reg_out[29:0] ),
assign ic_wrtag_f_l[29:0] = {wrtag_reg_out[0],
n2_ict_sp_1920b_cust_inv_macro__width_30 data_inv (
.din(ic_wrtag_f_l[29:0]),
.dout(ic_wrtag_f[29:0]) ) ;
/////////////////////////////////////////////////////////////////
// Instantiate each TAG way ARRAY. //
/////////////////////////////////////////////////////////////////
//////////////////////////////
n2_ict_sp_1920b_array tag_way_0 (.addr(index_f[10:5]), // comes on negedge
.rd_en_b(rd_en_b), // comes on negedge
.wr_en_w_b(wr_en_way_b[0]), // comes on negedge
.rd_en_a(rdreq_a), // comes on posedge
.wrreq_a(wrreq_a), // comes on posedge
.dout(ict_itlb_way_0_tag_f[29:0]),
//////////////////////////////
//////////////////////////////
n2_ict_sp_1920b_array tag_way_1 (.addr(index_f[10:5]),
.rd_en_b(rd_en_b), // comes on negedge
.wr_en_w_b(wr_en_way_b[1]), // comes on negedge
.rd_en_a(rdreq_a), // comes on posedge
.wrreq_a(wrreq_a), // comes on posedge
.dout(ict_itlb_way_1_tag_f[29:0]),
//////////////////////////////
//////////////////////////////
n2_ict_sp_1920b_array tag_way_2 (.addr(index_f[10:5]),
.rd_en_b(rd_en_b), // comes on negedge
.wr_en_w_b(wr_en_way_b[2]), // comes on negedge
.rd_en_a(rdreq_a), // comes on posedge
.wrreq_a(wrreq_a), // comes on posedge
.dout(ict_itlb_way_2_tag_f[29:0]),
//////////////////////////////
//////////////////////////////
n2_ict_sp_1920b_array tag_way_3 (.addr(index_f[10:5]),
.rd_en_b(rd_en_b), // comes on negedge
.wr_en_w_b(wr_en_way_b[3]), // comes on negedge
.rd_en_a(rdreq_a), // comes on posedge
.wrreq_a(wrreq_a), // comes on posedge
.dout(ict_itlb_way_3_tag_f[29:0]),
//////////////////////////////
//////////////////////////////
n2_ict_sp_1920b_array tag_way_4 (.addr(index_f[10:5]),
.rd_en_b(rd_en_b), // comes on negedge
.wr_en_w_b(wr_en_way_b[4]), // comes on negedge
.rd_en_a(rdreq_a), // comes on posedge
.wrreq_a(wrreq_a), // comes on posedge
.dout(ict_itlb_way_4_tag_f[29:0]),
//////////////////////////////
//////////////////////////////
n2_ict_sp_1920b_array tag_way_5 (.addr(index_f[10:5]),
.rd_en_b(rd_en_b), // comes on negedge
.wr_en_w_b(wr_en_way_b[5]), // comes on negedge
.rd_en_a(rdreq_a), // comes on posedge
.wrreq_a(wrreq_a), // comes on posedge
.dout(ict_itlb_way_5_tag_f[29:0]),
//////////////////////////////
//////////////////////////////
n2_ict_sp_1920b_array tag_way_6 (.addr(index_f[10:5]),
.rd_en_b(rd_en_b), // comes on negedge
.wr_en_w_b(wr_en_way_b[6]), // comes on negedge
.rd_en_a(rdreq_a), // comes on posedge
.wrreq_a(wrreq_a), // comes on posedge
.dout(ict_itlb_way_6_tag_f[29:0]),
//////////////////////////////
//////////////////////////////
n2_ict_sp_1920b_array tag_way_7 (.addr(index_f[10:5]),
.rd_en_b(rd_en_b), // comes on negedge
.wr_en_w_b(wr_en_way_b[7]), // comes on negedge
.rd_en_a(rdreq_a), // comes on posedge
.wrreq_a(wrreq_a), // comes on posedge
.dout(ict_itlb_way_7_tag_f[29:0]),
// agc_fill_wrway_bf<2> - 43th
// agc_fill_wrway_bf<1> - 42th
// agc_fill_wrway_bf<0> - 41th
// agd_ic_index_bf<5> - 40th
// agd_ic_index_bf<6> - 39th
// agd_ic_index_bf<7> - 38th
// agd_ic_index_bf<8> - 37th
// agd_ic_index_bf<9> - 36th
// agd_ic_index_bf<10> - 35th
// ftp_tg_rd_req_bf - 34th
// ftp_tg_wr_req_bf - 33th
// ftp_tg_rd_req_bf - 32th
// ftp_tg_wr_req_bf - 31th
// agd_ict_wrtag_bf<0> - 30th
// agd_ict_wrtag_bf<1> - 29th
// agd_ict_wrtag_bf<27> - 3rd
// agd_ict_wrtag_bf<28> - 2nd
// agd_ict_wrtag_bf<29> - 1st
assign wrway_reg_scanin = scan_in ;
assign index_reg_i_5_scanin = wrway_reg_scanout ;
assign index_reg_i_6_scanin = index_reg_i_5_scanout ;
assign index_reg_i_7_scanin = index_reg_i_6_scanout ;
assign index_reg_i_8_scanin = index_reg_i_7_scanout ;
assign index_reg_i_9_scanin = index_reg_i_8_scanout ;
assign index_reg_i_10_scanin = index_reg_i_9_scanout ;
assign rdreq_reg_scanin = index_reg_i_10_scanout ;
assign wrreq_reg_scanin = rdreq_reg_scanout ;
assign rdreq_reg_dup_scanin = wrreq_reg_scanout ;
assign wrreq_reg_dup_scanin = rdreq_reg_dup_scanout ;
assign wrtag_reg_scanin = wrreq_reg_dup_scanout ;
assign scan_out = wrtag_reg_scanout ;
endmodule // sparc_ifu_ict
// any PARAMS parms go into naming of macro
module n2_ict_sp_1920b_cust_l1clkhdr_ctl_macro (
// 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_ict_sp_1920b_cust_mux_macro__mux_aodec__ports_8__width_8 (
module n2_ict_sp_1920b_cust_inv_macro__width_1 (
// and macro for ports = 2,3,4
module n2_ict_sp_1920b_cust_and_macro__ports_3__width_8 (
// macro for cl_mc1_tisram_msff_{16,8}x flops
module n2_ict_sp_1920b_cust_tisram_msff_macro__width_3 (
//place::generic_place($width,$stack,$left);
// macro for cl_mc1_tisram_msff_{16,8}x flops
module n2_ict_sp_1920b_cust_tisram_msff_macro__width_1 (
//place::generic_place($width,$stack,$left);
// any PARAMS parms go into naming of macro
module n2_ict_sp_1920b_cust_msff_ctl_macro__width_1 (
assign fdin[0:0] = din[0:0];
// and macro for ports = 2,3,4
module n2_ict_sp_1920b_cust_and_macro__ports_3__width_1 (
// any PARAMS parms go into naming of macro
module n2_ict_sp_1920b_cust_msffi_ctl_macro__width_30 (
.so({so[28:0],scan_out}),
module n2_ict_sp_1920b_cust_inv_macro__width_30 (
module n2_ict_sp_1920b_array (
input rd_en_b; // comes on negedge
input wr_en_w_b; // comes on negedge (way specific)
input rd_en_a; // comes on posedge
input wrreq_a; // comes on posedge (not way specific)
input [`ADDRBITS-1:0] addr; // comes on negedge
input wr_inhibit; // async
input [`WIDTH-1:0] din; // comes on posedge
output [`WIDTH-1:0] dout;
reg [`WIDTH-1:0] mem[`ENTRIES-1:0];
reg [`WIDTH-1:0] local_dout;
assign rd_en_b_unused = rd_en_b;
for (i=0; i<`ENTRIES; i=i+1) begin
local_dout = {`WIDTH{1'b0}};
always @(negedge clk) begin
// always @(clk or rd_en_a or wr_en_a or addr) begin
// local_dout[`WIDTH-1:0] = `WIDTH'hx;
// local_dout[`WIDTH-1:0] = mem[addr] ;
// local_dout[`WIDTH-1:0] = `WIDTH'h0;
always @(posedge clk) begin
local_dout[`WIDTH-1:0] <= mem[addr];
local_dout[`WIDTH-1:0] <= `WIDTH'h0;
assign dout[`WIDTH-1:0] = local_dout[`WIDTH-1:0] & {`WIDTH{rd_en_a & ~wrreq_a & ~wr_inhibit}};