// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: clkgen_mac.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 ============================================
/////////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2003 by Sun Microsystems, Inc.
// All rights reserved. No part of this design may be reproduced,
// stored in a retrieval system, or transmitted, in any form or by
// any means, electronic, mechanical, photocopying, recording, or
// otherwise, without prior written permission of Sun Microsystems,
// Sun Proprietary/Confidential
// Filename: clkgen_mac.v
// Description: Wrapper around clkgen_mac_io which
// provides l2clks locally within clusters.
// Services the IO domain of N2 MAC cluster.
// Primary Contact: carlos.castil@sun.com / john.lo@sun.com
// Feb 23,05 carlos.castil First Draft
// Mar 11,05 carlos.castil Removed IO_CLK_EXT
// Changed input name IO_CLK to gclk
// Changed input name tcu_sel_ext_clk to tcu_div_bypass
// Added scan ports scan_in, scan_out and tcu_scan_en
/////////////////////////////////////////////////////////////////////////////////////
// **************************
// **************************
output niu_clk; // Clock to core logic is output of L1 header
output aclk; // buffered version of aclk
output bclk; // buffered version of bclk
output pce_ov; // buffered version of pce_ov
input tcu_div_bypass; // bypasses clk divider to mux in ext clk
input gl_mac_io_clk_stop;
input gl_mac_io_out; // phase signal from ccu (div/4 or div/2)
input cmp_gclk_c1_mac; // global clk - this is either cmp or dr
wire array_wr_inhibit_wire;
assign tcu_clk_stop = tcu_atpg_mode ? 1'b0 : gl_mac_io_clk_stop;
cl_a1_l1hdr_8x io_l1hdr (
clkgen_mac_io clkgen_mac_io (
.l2clk (iol2clk), // outputs
.wmr_protect (wmr_protect),
.cmp_slow_sync_en (cmp_slow_sync_en),
.slow_cmp_sync_en (slow_cmp_sync_en),
// .tcu_clk_stop (gl_mac_io_clk_stop), // inputs
.tcu_clk_stop (tcu_clk_stop),
.tcu_pce_ov (tcu_pce_ov),
.array_wr_inhibit (array_wr_inhibit_wire),
.ccu_cmp_slow_sync_en (1'b0 & array_wr_inhibit_wire & aclk_wmr & tcu_scan_mode),
.ccu_slow_cmp_sync_en (1'b0 & cmp_slow_sync_en & slow_cmp_sync_en & tcu_scan_mode),
.tcu_div_bypass (tcu_div_bypass),
.ccu_div_ph (gl_mac_io_out),
.tcu_atpg_mode (tcu_atpg_mode),
.tcu_wr_inhibit (tcu_wr_inhibit),
.cluster_arst_l (cluster_arst_l), // new
.ccu_serdes_dtm (1'b0), // new