// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: lsu_asd_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 i_pid_pkt_d2_reg_scanin;
wire i_pid_pkt_d2_reg_scanout;
wire [63:0] asdl_data_2f;
wire [62:0] asdl_ring_pkt;
wire i_rng_pkt_reg_scanin;
wire i_rng_pkt_reg_scanout;
wire [62:0] asd_ring_pkt;
wire [62:0] lsu_ring_cdbus;
input tcu_pce_ov; // scan signals
input [127:0] pid_asi_pkt; // 127:0, 128 bit packet coming from pid to ASI block
// 125:124 - 00-ASI, 01-ASR, 10-PR, 11-HPR
// 111:64 - Virtual address
input asc_ring_ctl; // ring control bit from asc
input asc_ring_data; // ring data bit from asc
input asc_ring_local; // local ring sending
input asc_ring_fast; // fast ring sending
output asd_p2a_vld; // valid packet from pid
output asd_p2a_fast; // packet from pid is destined for fast bus
output [64:0] lsu_rngf_cdbus;
output [64:0] lsu_rngl_cdbus;
output [12:0] lsu_ifu_ctxt_data;
output [63:56] asd_ring_ctl;
output [7:0] asd_ring_asi;
output [8:3] asd_ring_addr;
lsu_asd_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})
///////////////////////////////////////////////////////////////////
// PROCESS DATA FROM PID AND SEND IT OVER APPROPRIATE RING
///////////////////////////////////////////////////////////////////
// rename valid and Fast signal coming from the pid and send it to asc
assign asd_p2a_vld = pid_asi_pkt[127];
assign asd_p2a_fast = pid_asi_pkt[126];
// pipe data packet for one more cycle
// ctl and data packets are sent on the ring over two cycles
lsu_asd_dp_msff_macro__stack_66c__width_64 i_pid_pkt_d2_reg
.scan_in(i_pid_pkt_d2_reg_scanin),
.scan_out(i_pid_pkt_d2_reg_scanout),
.din (pid_asi_pkt[63:0]),
.dout(asdl_data_2f[63:0]),
// Mux between the data and control packet
lsu_asd_dp_mux_macro__mux_aonpe__ports_2__stack_66c__width_65 i_rng_pkt_mux
.din0( {asc_ring_local, asc_ring_fast, 1'b0,pid_asi_pkt[125:64]}),
.din1( {asdl_data_2f[63],asdl_data_2f[63],asdl_data_2f[62:0]}),
.dout( {asdl_rngl_b63,asdl_rngf_b63,asdl_ring_pkt[62:0]})
lsu_asd_dp_msff_macro__stack_66c__width_65 i_rng_pkt_reg
.scan_in(i_rng_pkt_reg_scanin),
.scan_out(i_rng_pkt_reg_scanout),
.din ({asdl_rngl_b63,asdl_rngf_b63,asdl_ring_pkt[62:0]}),
.dout({asd_rngl_b63, asd_rngf_b63, asd_ring_pkt[62:0]}),
assign asd_ring_ctl[63:56] = {asd_rngf_b63,asd_ring_pkt[62:56]};
assign asd_ring_asi[7:0] = asd_ring_pkt[55:48];
assign asd_ring_addr[8:3] = asd_ring_pkt[8:3];
lsu_asd_dp_buff_macro__dbuff_16x__rep_1__stack_66c__width_13 ifu_rngf_buf (
.din (asd_ring_pkt[12:0]),
.dout (lsu_ifu_ctxt_data[12:0])
// send packet over the ring
lsu_asd_dp_buff_macro__dbuff_16x__rep_1__stack_66c__width_65 ring_buf (
.din ({asd_rngl_b63, asd_rngf_b63, asd_ring_pkt[62:0]}),
.dout ({lsu_rngl_cdbus_b63,lsu_rngf_cdbus_b63,lsu_ring_cdbus[62:0]})
lsu_asd_dp_buff_macro__dbuff_32x__rep_1__stack_none__width_65 rngf_buf (
.din ({lsu_ring_ctl, lsu_rngf_cdbus_b63, lsu_ring_cdbus[62:0]}),
.dout (lsu_rngf_cdbus[64:0])
lsu_asd_dp_buff_macro__dbuff_16x__rep_1__stack_none__width_65 rngl_buf (
.din ({lsu_ring_ctl, lsu_rngl_cdbus_b63, lsu_ring_cdbus[62:0]}),
.dout (lsu_rngl_cdbus[64:0])
assign i_pid_pkt_d2_reg_scanin = scan_in ;
assign i_rng_pkt_reg_scanin = i_pid_pkt_d2_reg_scanout ;
assign scan_out = i_rng_pkt_reg_scanout ;
module lsu_asd_dp_buff_macro__dbuff_32x__rep_1__stack_none__width_4 (
// any PARAMS parms go into naming of macro
module lsu_asd_dp_msff_macro__stack_66c__width_64 (
.so({so[62: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_asd_dp_mux_macro__mux_aonpe__ports_2__stack_66c__width_65 (
cl_dp1_muxbuff2_8x c0_0 (
// any PARAMS parms go into naming of macro
module lsu_asd_dp_msff_macro__stack_66c__width_65 (
.so({so[63:0],scan_out}),
module lsu_asd_dp_buff_macro__dbuff_16x__rep_1__stack_66c__width_13 (
module lsu_asd_dp_buff_macro__dbuff_16x__rep_1__stack_66c__width_65 (
module lsu_asd_dp_buff_macro__dbuff_32x__rep_1__stack_none__width_65 (
module lsu_asd_dp_buff_macro__dbuff_16x__rep_1__stack_none__width_65 (