// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: lsu_pid_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 [63:0] lmd_cas_pkt2_data;
wire [129:0] load_pcx_pkt;
wire [129:0] store_pcx_pkt;
wire [129:0] pcx_data_pa;
wire [126:0] store_asi_pkt;
wire [126:0] load_asi_pkt;
wire [126:0] asi_pkt_hold;
wire dff_asi_pkt_hi_scanin;
wire dff_asi_pkt_hi_scanout;
wire dff_asi_pkt_lo_scanin;
wire dff_asi_pkt_lo_scanout;
input tcu_pce_ov; // scan signals
input [2:0] const_cpuid; // hardwired CPU ID
input [63:0] lmd_bypass_data_m;
input [2:0] lmc_ld_tid; // thread id of load packet
input [2:0] lmd_pcx_rqtyp;
input [1:0] lmd_pcx_rway;
input [39:0] lmd_pcx_addr;
input [1:0] lmd_asi_type;
input [2:0] sbc_st_sel_tid_p4;
input [7:0] sbc_pcx_bmask;
input [2:0] sbc_pcx_addr;
input sbc_pid_kill_store_p4_;
input [2:0] sbc_st_type_p4;
input [44:0] stb_cam_data;
input [63:0] stb_ram_data;
input pic_ld_pcx_sel_p4; // load port has access
input pic_st_pcx_sel_p4; // store port has access
output [129:0] spc_pcx_data_pa; // PCX Packet
output [127:0] pid_asi_pkt;
lsu_pid_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})
assign lmd_cas_pkt2_data[63:0] = lmd_bypass_data_m[63:0];
assign load_pcx_pkt[129:0] = {
2'b00, lmd_pcx_rqtyp[2:0], // rqtyp
lmc_ld_inv_p4, lmd_pcx_pref, // inval and prefetch
1'b0, lmd_pcx_rway[1:0], // replacement way
{4{lmc_ld_sz[4]}}, lmc_ld_sz[3:0], // size
assign store_pcx_pkt[129:0] = {
2'b00,sbc_st_type_p4[2:0],
sbc_pcx_bmask[7:0], // byte mask
stb_cam_data[44:8], sbc_pcx_addr[2:0], // address
lsu_pid_dp_mux_macro__dmux_2x__mux_aonpe__ports_2__stack_66c__width_65 mx_pcx_data_hi (
.din0 (load_pcx_pkt[129:65]),
.din1 (store_pcx_pkt[129:65]),
.sel0 (pic_ld_pcx_sel_p4),
.sel1 (pic_st_pcx_sel_p4),
.dout (pcx_data_pa[129:65])
lsu_pid_dp_mux_macro__dmux_2x__mux_aonpe__ports_2__stack_66c__width_65 mx_pcx_data_lo (
.din0 (load_pcx_pkt[64:0]),
.din1 (store_pcx_pkt[64:0]),
.sel0 (pic_ld_pcx_sel_p4),
.sel1 (pic_st_pcx_sel_p4),
.dout (pcx_data_pa[64:0])
lsu_pid_dp_buff_macro__stack_66c__width_65 buf_pcx_data_hi (
.din (pcx_data_pa[129:65]),
.dout (spc_pcx_data_pa[129:65])
lsu_pid_dp_buff_macro__stack_66c__width_65 buf_pcx_data_lo (
.din (pcx_data_pa[64:0]),
.dout (spc_pcx_data_pa[64:0])
////////////////////////////////////////////////////////////////////////////////
// Interface to the ASI block
// Unlike the pcx interface, the asi interface includes the "request" as the
// packet valid bit. Because the asi interface will reply with an ack on the
// next cycle best case, all packets will be driven for at least two cycles.
////////////////////////////////////////////////////////////////////////////////
assign store_asi_pkt[126:0] = {
stb_cam_data[7:0], // ASI ID
8'h00,stb_cam_data[44:8], 3'b0, // virt. addr
stb_ram_data[63:0] // data
assign load_asi_pkt[126:0] = {
8'h00,lmd_pcx_addr[39:0],
lsu_pid_dp_mux_macro__mux_aope__ports_3__stack_66c__width_62 mx_asi_pkt_hi (
.din0 (store_asi_pkt[126:65]),
.din1 (load_asi_pkt[126:65]),
.din2 (asi_pkt_hold[126:65]),
.dout (pid_asi_pkt[126:65])
lsu_pid_dp_mux_macro__mux_aope__ports_3__stack_66c__width_65 mx_asi_pkt_lo (
.din0 (store_asi_pkt[64:0]),
.din1 (load_asi_pkt[64:0]),
.din2 (asi_pkt_hold[64:0]),
.dout (pid_asi_pkt[64:0])
lsu_pid_dp_msff_macro__stack_66c__width_62 dff_asi_pkt_hi (
.scan_in(dff_asi_pkt_hi_scanin),
.scan_out(dff_asi_pkt_hi_scanout),
.din (pid_asi_pkt[126:65]),
.dout (asi_pkt_hold[126:65]),
lsu_pid_dp_msff_macro__stack_66c__width_65 dff_asi_pkt_lo (
.scan_in(dff_asi_pkt_lo_scanin),
.scan_out(dff_asi_pkt_lo_scanout),
.din (pid_asi_pkt[64:0]),
.dout (asi_pkt_hold[64:0]),
assign pid_asi_pkt[127] = pic_asi_req;
////////////////////////////////
// Check that CAS packets are always back to back
// 0in assert_sequence -var (spc_pcx_data_pa[129:124] == 6'b100010) (spc_pcx_data_pa[129:124] == 6'b100011) -max 1 -message "CAS packets not back-to-back"
assign dff_asi_pkt_hi_scanin = scan_in ;
assign dff_asi_pkt_lo_scanin = dff_asi_pkt_hi_scanout ;
assign scan_out = dff_asi_pkt_lo_scanout ;
module lsu_pid_dp_buff_macro__dbuff_32x__rep_1__stack_none__width_4 (
// 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_pid_dp_mux_macro__dmux_2x__mux_aonpe__ports_2__stack_66c__width_65 (
cl_dp1_muxbuff2_8x c0_0 (
module lsu_pid_dp_buff_macro__stack_66c__width_65 (
// 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_pid_dp_mux_macro__mux_aope__ports_3__stack_66c__width_62 (
// 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_pid_dp_mux_macro__mux_aope__ports_3__stack_66c__width_65 (
// any PARAMS parms go into naming of macro
module lsu_pid_dp_msff_macro__stack_66c__width_62 (
.so({so[60:0],scan_out}),
// any PARAMS parms go into naming of macro
module lsu_pid_dp_msff_macro__stack_66c__width_65 (
.so({so[63:0],scan_out}),