| 1 | // ========== Copyright Header Begin ========================================== |
| 2 | // |
| 3 | // OpenSPARC T2 Processor File: ilupeuLinkErrPEUStr.vr |
| 4 | // Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved |
| 5 | // 4150 Network Circle, Santa Clara, California 95054, U.S.A. |
| 6 | // |
| 7 | // * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 8 | // |
| 9 | // This program is free software; you can redistribute it and/or modify |
| 10 | // it under the terms of the GNU General Public License as published by |
| 11 | // the Free Software Foundation; version 2 of the License. |
| 12 | // |
| 13 | // This program is distributed in the hope that it will be useful, |
| 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | // GNU General Public License for more details. |
| 17 | // |
| 18 | // You should have received a copy of the GNU General Public License |
| 19 | // along with this program; if not, write to the Free Software |
| 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 21 | // |
| 22 | // For the avoidance of doubt, and except that if any non-GPL license |
| 23 | // choice is available it will apply instead, Sun elects to use only |
| 24 | // the General Public License version 2 (GPLv2) at this time for any |
| 25 | // software where a choice of GPL license versions is made |
| 26 | // available with the language indicating that GPLv2 or any later version |
| 27 | // may be used, or where a choice of which version of the GPL is applied is |
| 28 | // otherwise unspecified. |
| 29 | // |
| 30 | // Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
| 31 | // CA 95054 USA or visit www.sun.com if you need additional information or |
| 32 | // have any questions. |
| 33 | // |
| 34 | // ========== Copyright Header End ============================================ |
| 35 | class LinkErrPEUStr extends PEUStrBase |
| 36 | { |
| 37 | integer f_errQueue; // A mailbox for bad pkt headers |
| 38 | |
| 39 | task new( PEUTestEnv a_env ) |
| 40 | { |
| 41 | super.new( a_env ); |
| 42 | f_errQueue = 0; |
| 43 | } |
| 44 | |
| 45 | task SetErrQueue( integer errQueue ) |
| 46 | { |
| 47 | f_errQueue = errQueue; |
| 48 | } |
| 49 | |
| 50 | task Execute() |
| 51 | { |
| 52 | bit[4:0] ltssmState; |
| 53 | // Pull down the link and wait for the |
| 54 | // TLU to signal "drain state". |
| 55 | f_env.linkDown(); |
| 56 | f_env.activityStalled += 1; //Stall the hangDetect since LTSSM must |
| 57 | // timeout in recovery before going to |
| 58 | // detect |
| 59 | |
| 60 | //Make sure we go to Recovery.RcvrLock |
| 61 | #ifdef N2_IOS |
| 62 | f_env.toLtssmState( ILUPEU_LTSSM_RCVRY_RCVRLOCK,200, CSRT_OMNI); |
| 63 | #else |
| 64 | f_env.toLtssmState( ILUPEU_LTSSM_RCVRY_RCVRLOCK,200 ); |
| 65 | #endif |
| 66 | |
| 67 | /* |
| 68 | //Drain state is not entered until timing out in RCVRY_LOCK |
| 69 | f_env.waitDrainState(); |
| 70 | |
| 71 | // Tell the enivronment that we're |
| 72 | // entering the drain state. All |
| 73 | // subsequent non-posted requests will |
| 74 | // then expect an aborted completion |
| 75 | // from the ILU. All new "expectTLU" |
| 76 | // requests will return when the ILU |
| 77 | // returns an aborted completion, and |
| 78 | // will result in an error if the |
| 79 | // request is forwarded by the TLU. |
| 80 | // "enterDrainState" returns immediately |
| 81 | // if our request was posted, or when |
| 82 | // the completion is presented (for |
| 83 | // non-posted requests). |
| 84 | f_env.enterDrainState( 128'bx ); |
| 85 | |
| 86 | */ |
| 87 | |
| 88 | // Tell the error-checker about this |
| 89 | // bad-boy. |
| 90 | if ( f_errQueue != 0 ) |
| 91 | { |
| 92 | mailbox_put( f_errQueue, e_ERR_none ); |
| 93 | mailbox_put( f_errQueue, 4 ); |
| 94 | mailbox_put( f_errQueue, e_ERR_oe_lin ); |
| 95 | mailbox_put( f_errQueue, 128'bx ); |
| 96 | //Removed for 1.0 PRM |
| 97 | // mailbox_put( f_errQueue, e_ERR_oe_lin ); //DLPL errors will always set Primary and Secondary |
| 98 | // mailbox_put( f_errQueue, 128'bx ); // Link Interrupt bit |
| 99 | mailbox_put( f_errQueue, e_ERR_dlpl_sds_los ); //Cleared 1st in ilupeuErrChkPEUStr |
| 100 | mailbox_put( f_errQueue, 128'bx ); |
| 101 | //Optional Phy errors may occur since link is randomly shut down |
| 102 | mailbox_put( f_errQueue, e_ERR_dlpl_stp_no_end_edb ); |
| 103 | mailbox_put( f_errQueue, 128'bx0 ); |
| 104 | mailbox_put( f_errQueue, e_ERR_dlpl_sdp_no_end ); |
| 105 | mailbox_put( f_errQueue, 128'bx0 ); |
| 106 | |
| 107 | } |
| 108 | } /* end Execute */ |
| 109 | } /* end LinkErrPEUStr */ |