// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: lsu_spd_dp.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 ============================================
wire dff_st_addr_w_scanin;
wire dff_st_addr_w_scanout;
wire dff_last_line_0_scanin;
wire dff_last_line_0_scanout;
wire dff_last_line_1_scanin;
wire dff_last_line_1_scanout;
wire dff_last_line_2_scanin;
wire dff_last_line_2_scanout;
wire dff_last_line_3_scanin;
wire dff_last_line_3_scanout;
wire dff_last_line_4_scanin;
wire dff_last_line_4_scanout;
wire dff_last_line_5_scanin;
wire dff_last_line_5_scanout;
wire dff_last_line_6_scanin;
wire dff_last_line_6_scanout;
wire dff_last_line_7_scanin;
wire dff_last_line_7_scanout;
wire dff_cam_line_en_b_scanin;
wire dff_cam_line_en_b_scanout;
input [39:3] sbd_st_addr_b;
input [7:0] sbc_st_addr_new;
input [7:0] sbc_thread_b;
input [7:0] sbc_cam_line_en_m;
input [44:0] stb_cam_data;
input dcc_bmask_parity_b;
output spd_st_line_match;
output [7:0] stb_cam_line_en_b;
input tcu_pce_ov; // scan signals
input tcu_se_scancollar_in;
lsu_spd_dp_buff_macro__dbuff_32x__rep_1__stack_none__width_4 test_rep0 (
.din ({tcu_scan_en,tcu_pce_ov,spc_aclk,spc_bclk}),
.dout({se,pce_ov,siclk,soclk})
////////////////////////////////////////////////////////////////////////////////
// Address staging and compare for store pipelining.
// For a 64B line, addr[5:0] do not compare. IO stores are not pipelined, so
// PA[39] does not need to factor into the compare.
lsu_spd_dp_buff_macro__rep_1__stack_40c__width_37 st_addr_b_buf (
.din (sbd_st_addr_b[39:3]),
lsu_spd_dp_msff_macro__left_3__stack_40c__width_33 dff_st_addr_w (
.scan_in(dff_st_addr_w_scanin),
.scan_out(dff_st_addr_w_scanout),
lsu_spd_dp_msff_macro__left_3__stack_40c__width_33 dff_last_line_0 (
.scan_in(dff_last_line_0_scanin),
.scan_out(dff_last_line_0_scanout),
.dout (last_line_0[38:6]),
.en (sbc_st_addr_new[0]),
lsu_spd_dp_msff_macro__left_3__stack_40c__width_33 dff_last_line_1 (
.scan_in(dff_last_line_1_scanin),
.scan_out(dff_last_line_1_scanout),
.dout (last_line_1[38:6]),
.en (sbc_st_addr_new[1]),
lsu_spd_dp_msff_macro__left_3__stack_40c__width_33 dff_last_line_2 (
.scan_in(dff_last_line_2_scanin),
.scan_out(dff_last_line_2_scanout),
.dout (last_line_2[38:6]),
.en (sbc_st_addr_new[2]),
lsu_spd_dp_msff_macro__left_3__stack_40c__width_33 dff_last_line_3 (
.scan_in(dff_last_line_3_scanin),
.scan_out(dff_last_line_3_scanout),
.dout (last_line_3[38:6]),
.en (sbc_st_addr_new[3]),
lsu_spd_dp_msff_macro__left_3__stack_40c__width_33 dff_last_line_4 (
.scan_in(dff_last_line_4_scanin),
.scan_out(dff_last_line_4_scanout),
.dout (last_line_4[38:6]),
.en (sbc_st_addr_new[4]),
lsu_spd_dp_msff_macro__left_3__stack_40c__width_33 dff_last_line_5 (
.scan_in(dff_last_line_5_scanin),
.scan_out(dff_last_line_5_scanout),
.dout (last_line_5[38:6]),
.en (sbc_st_addr_new[5]),
lsu_spd_dp_msff_macro__left_3__stack_40c__width_33 dff_last_line_6 (
.scan_in(dff_last_line_6_scanin),
.scan_out(dff_last_line_6_scanout),
.dout (last_line_6[38:6]),
.en (sbc_st_addr_new[6]),
lsu_spd_dp_msff_macro__left_3__stack_40c__width_33 dff_last_line_7 (
.scan_in(dff_last_line_7_scanin),
.scan_out(dff_last_line_7_scanout),
.dout (last_line_7[38:6]),
.en (sbc_st_addr_new[7]),
// mux out the last line of the store in B
lsu_spd_dp_mux_macro__left_3__mux_aonpe__ports_8__stack_40c__width_33 mux_last_line (
.din0 (last_line_0[38:6]),
.din1 (last_line_1[38:6]),
.din2 (last_line_2[38:6]),
.din3 (last_line_3[38:6]),
.din4 (last_line_4[38:6]),
.din5 (last_line_5[38:6]),
.din6 (last_line_6[38:6]),
.din7 (last_line_7[38:6]),
lsu_spd_dp_mux_macro__left_3__mux_aope__ports_2__stack_40c__width_33 mux_cmp_addr (
.sel0 (sbc_tidb_eq_tidw),
lsu_spd_dp_cmp_macro__width_16 st_addr_cmp0 (
.din0 (st_addr_b[38:23]),
lsu_spd_dp_cmp_macro__width_16 st_addr_cmp1 (
lsu_spd_dp_xnor_macro__width_1 st_addr_cmp2 (
lsu_spd_dp_inv_macro__width_1 pa_b39_inv (
lsu_spd_dp_and_macro__ports_4__width_1 st_addr_cmp (
.din0 (line_match_38_23),
.din3 (pa_b39_b_), // IO stores cannot pipeline
.dout (spd_st_line_match)
////////////////////////////////////////////////////////////////////////////////
// Parity generation for stb_cam. Timing does not allow for parity
// to be written into the CAM. The parity is generated in the next cycle and
// in this physical order : dcc_bmask_parity_b,st_addr_b[39:3]
lsu_spd_dp_prty_macro__width_8 cam_wr_p0 (
.din ({dcc_bmask_parity_b,sbc_inv_addr_prty,1'b0,st_addr_b[39:35]}),
lsu_spd_dp_prty_macro__width_32 cam_wr_p1 (
lsu_spd_dp_xnor_macro__ports_2__width_1 camwr_parity_bar (
.dout (stb_cparity_calc_)
lsu_spd_dp_inv_macro__width_1 camwr_parity (
.din (stb_cparity_calc_),
///////////////////////////////////////////
// Parity error detection for stb_cam
// bits in this phyiscal order: stb_cam_data[7:0],2'b00,stb_cam_data[44:8],stb_ram_cparity
lsu_spd_dp_prty_macro__width_32 cam_rd_p0 (
.din ({stb_cam_data[7:0],stb_cam_data[44:23],2'b00}),
lsu_spd_dp_prty_macro__width_16 cam_rd_p1 (
.din ({stb_cam_data[22:8],stb_ram_cparity}),
lsu_spd_dp_xnor_macro__ports_2__width_1 cam_rd_perr (
lsu_spd_dp_inv_macro__width_1 buf_cam_perr (
///////////////////////////////////////////
// flops for stb_cam_line_en_b
lsu_spd_dp_msff_macro__stack_8l__width_8 dff_cam_line_en_b (
.scan_in(dff_cam_line_en_b_scanin),
.scan_out(dff_cam_line_en_b_scanout),
.din (sbc_cam_line_en_m[7:0]),
.dout (stb_cam_line_en_b[7:0]),
.se (tcu_se_scancollar_in),
assign dff_st_addr_w_scanin = scan_in ;
assign dff_last_line_0_scanin = dff_st_addr_w_scanout ;
assign dff_last_line_1_scanin = dff_last_line_0_scanout ;
assign dff_last_line_2_scanin = dff_last_line_1_scanout ;
assign dff_last_line_3_scanin = dff_last_line_2_scanout ;
assign dff_last_line_4_scanin = dff_last_line_3_scanout ;
assign dff_last_line_5_scanin = dff_last_line_4_scanout ;
assign dff_last_line_6_scanin = dff_last_line_5_scanout ;
assign dff_last_line_7_scanin = dff_last_line_6_scanout ;
assign dff_cam_line_en_b_scanin = dff_last_line_7_scanout ;
assign scan_out = dff_cam_line_en_b_scanout;
module lsu_spd_dp_buff_macro__dbuff_32x__rep_1__stack_none__width_4 (
module lsu_spd_dp_buff_macro__rep_1__stack_40c__width_37 (
// any PARAMS parms go into naming of macro
module lsu_spd_dp_msff_macro__left_3__stack_40c__width_33 (
.so({so[31:0],scan_out}),
// 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 lsu_spd_dp_mux_macro__left_3__mux_aonpe__ports_8__stack_40c__width_33 (
cl_dp1_muxbuff8_8x c0_0 (
// 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 lsu_spd_dp_mux_macro__left_3__mux_aope__ports_2__stack_40c__width_33 (
// comparator macro (output is 1 if both inputs are equal; 0 otherwise)
module lsu_spd_dp_cmp_macro__width_16 (
// xnor macro for ports = 2,3
module lsu_spd_dp_xnor_macro__width_1 (
module lsu_spd_dp_inv_macro__width_1 (
// and macro for ports = 2,3,4
module lsu_spd_dp_and_macro__ports_4__width_1 (
// parity macro (even parity)
module lsu_spd_dp_prty_macro__width_8 (
// parity macro (even parity)
module lsu_spd_dp_prty_macro__width_32 (
// xnor macro for ports = 2,3
module lsu_spd_dp_xnor_macro__ports_2__width_1 (
// parity macro (even parity)
module lsu_spd_dp_prty_macro__width_16 (
// any PARAMS parms go into naming of macro
module lsu_spd_dp_msff_macro__stack_8l__width_8 (