// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: mcu_ucbout_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 ============================================
wire stall_d1_ff_scanout;
wire outdata_vec_ff_scanin;
wire outdata_vec_ff_scanout;
wire outdata_buf_ff_scanin;
wire outdata_buf_ff_scanout;
//parameter UCB_BUS_WIDTH = 4;
//parameter REG_WIDTH = 64; // maximum data bits that needs to
// be sent. Set to 64 or 128
input [127:0] outdata_buf_in;
input [31:0] outdata_vec_in;
wire [31:0] outdata_vec_next;
wire [127:0] outdata_buf;
wire [127:0] outdata_buf_next;
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/************************************************************
* UCB bus interface flops
************************************************************/
assign vld = outdata_vec[0];
assign data = outdata_buf[3:0];
mcu_ucbout_ctl_msff_ctl_macro__width_1 stall_d1_ff (
.scan_in(stall_d1_ff_scanin),
.scan_out(stall_d1_ff_scanout),
/************************************************************
************************************************************/
// accept new data only if there is none being processed
assign load_outdata = outdata_buf_wr & ~outdata_buf_busy;
assign outdata_buf_busy = outdata_vec[0] | stall_d1;
assign shift_outdata = outdata_vec[0] & ~stall_d1;
assign outdata_vec_next =
load_outdata ? outdata_vec_in:
shift_outdata ? outdata_vec >> 1:
mcu_ucbout_ctl_msff_ctl_macro__width_32 outdata_vec_ff (
.scan_in(outdata_vec_ff_scanin),
.scan_out(outdata_vec_ff_scanout),
assign outdata_buf_next =
load_outdata ? outdata_buf_in:
shift_outdata ? (outdata_buf >> 4):
mcu_ucbout_ctl_msff_ctl_macro__width_128 outdata_buf_ff (
.scan_in(outdata_buf_ff_scanin),
.scan_out(outdata_buf_ff_scanout),
assign stall_d1_ff_scanin = scan_in ;
assign outdata_vec_ff_scanin = stall_d1_ff_scanout ;
assign outdata_buf_ff_scanin = outdata_vec_ff_scanout ;
assign scan_out = outdata_buf_ff_scanout ;
// any PARAMS parms go into naming of macro
module mcu_ucbout_ctl_msff_ctl_macro__width_1 (
assign fdin[0:0] = din[0:0];
// any PARAMS parms go into naming of macro
module mcu_ucbout_ctl_msff_ctl_macro__width_32 (
assign fdin[31:0] = din[31:0];
.so({so[30:0],scan_out}),
// any PARAMS parms go into naming of macro
module mcu_ucbout_ctl_msff_ctl_macro__width_128 (
assign fdin[127:0] = din[127:0];
.si({scan_in,so[126:0]}),
.so({so[126:0],scan_out}),