// ========== Copyright Header Begin ========================================== // // OpenSPARC T2 Processor File: esr_ti_init.vr // 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 // have any questions. // // ========== Copyright Header End ============================================ #include #include "cMesg.vrh" #include "mif_memory_map.vri" #include "niu_gen_pio.vrh" extern Mesg be_msg; extern niu_gen_pio gen_pio_drv; class esr_tiinit_util { bit [31:0] get_port; string str_port, temp_port; integer port_num; integer port_no[4]; integer port0_enb = 0; integer port1_enb = 0; integer mac_speed0,mac_speed1; task new(); task serdes_init(); task wait_for_instr_comp(); } task esr_tiinit_util :: new() { integer i = 0; if ( get_plus_arg(CHECK, "MAC_SPEED0=") ) { mac_speed0 = get_plus_arg(NUM, "MAC_SPEED0") ; printf("mac_init:INFO:MAC0 port is set %0d Speed\n" ,mac_speed0); } if ( get_plus_arg(CHECK, "MAC_SPEED1=") ) { mac_speed1 = get_plus_arg(NUM, "MAC_SPEED1") ; printf("mac_init:INFO:MAC1 port is set %0d Speed\n" ,mac_speed1); } if( get_plus_arg(CHECK,"GET_MAC_PORTS=")) { get_port = get_plus_arg(STR,"GET_MAC_PORTS="); printf("esr_ti_init_util : val of get_port is %h\n",get_port); str_port.bittostr(get_port); printf("esr_ti_init_util : val of LEN %0d\n",str_port.len()); for(i=0;i