// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: rgmii_mux.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 ============================================
input txd0_d4, txd1_d5, txd2_d6, txd3_d7;
output rxd0_d4, rxd1_d5, rxd2_d6,rxd3_d7;
reg rxd0_d4, rxd1_d5, rxd2_d6,rxd3_d7;
// ----- TX negedge register -----
//if (tx_config[3:0] == 4'b0011)
txd_f[3] <= #0.5 txd3_d7;
txd_f[2] <= #0.5 txd2_d6;
txd_f[1] <= #0.5 txd1_d5;
txd_f[0] <= #0.5 txd0_d4;
txd_r[3:0] <= #0.5 {txd3_d7, txd2_d6, txd1_d5,txd0_d4};
assign txd[7:0] = {txd_f[3:0],txd_r[3:0]};
//always @(posedge rxclk)
//always @(negedge rxclk)
assign #0.5 {rxd0_d4, rxd1_d5, rxd2_d6, rxd3_d7, rxer_dv} = (rxclk==1) ?
{rxd[4],rxd[5], rxd[6],rxd[7], rxer} :
{rxd[0], rxd[1],rxd[2],rxd[3], rxdv};
assign #0.0 {rxd0_d4, rxd1_d5, rxd2_d6, rxd3_d7, rxer_dv} = (rxclk==1) ?
{rxd[4],rxd[5], rxd[6],rxd[7], rxer} :
{rxd[0], rxd[1],rxd[2],rxd[3], rxdv};
***************************/