| 1 | // ========== Copyright Header Begin ========================================== |
| 2 | // |
| 3 | // OpenSPARC T2 Processor File: PEUVeraInit.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 | #include <vera_defines.vrh> |
| 36 | #include "Testbench.vrh" |
| 37 | |
| 38 | virtual class ilupeuTest extends PEUTestBase { |
| 39 | |
| 40 | |
| 41 | task new (); |
| 42 | task execute (); |
| 43 | task init_scenario (); |
| 44 | |
| 45 | } |
| 46 | |
| 47 | |
| 48 | //////////////////////////////////////////////////////////////////////////////// |
| 49 | // execute the original new (super.new). It just start the Denali threads |
| 50 | //////////////////////////////////////////////////////////////////////////////// |
| 51 | task ilupeuTest::new () { |
| 52 | |
| 53 | super.new (); |
| 54 | printf("PEU After super \n"); |
| 55 | |
| 56 | init_scenario (); |
| 57 | } |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | //////////////////////////////////////////////////////////////////////////////// |
| 64 | // |
| 65 | // do not use the execute method in the original class since it starts up a |
| 66 | // lot of methods not used in FC |
| 67 | // just overload the original method |
| 68 | // |
| 69 | //////////////////////////////////////////////////////////////////////////////// |
| 70 | task ilupeuTest::execute () { |
| 71 | |
| 72 | printf("**ilupeuTest::PEUTestBase Begin Execution**\n"); |
| 73 | |
| 74 | |
| 75 | printf("**ilupeuTest::PEUTestBase Set Up Boot Strategy**\n"); |
| 76 | boot = new( Report, |
| 77 | Scenario ); // Let's get ready to rumble .... |
| 78 | this.setBoot(); |
| 79 | printf("**ilupeuTest::PEUTestBase Boot Strategy Set Up Complete**\n"); |
| 80 | |
| 81 | |
| 82 | printf("**ilupeuTest::PEUTestBase Execute Boot Strategy**\n"); |
| 83 | boot.Execute(); |
| 84 | printf("**ilupeuTest::PEUTestBase Boot Strategy Complete**\n"); |
| 85 | |
| 86 | |
| 87 | printf("**ilupeuTest::PEUTestBase Set Up Environment**\n"); |
| 88 | env = boot.getEnv(); |
| 89 | this.setEnv(); |
| 90 | printf("**ilupeuTest::PEUTestBase Environment Set Up Complete**\n"); |
| 91 | |
| 92 | |
| 93 | |
| 94 | printf("**ilupeuTest::PEUTestBase Expect Idle State**\n"); |
| 95 | env.expectIdleState(); |
| 96 | printf("**ilupeuTest::PEUTestBase Expect Idle State Complete**\n"); |
| 97 | |
| 98 | |
| 99 | printf("**ilupeuTest::PEUTestBase Execution Complete**\n"); |
| 100 | |
| 101 | |
| 102 | } |
| 103 | |
| 104 | |
| 105 | |
| 106 | //////////////////////////////////////////////////////////////////////////////// |
| 107 | task ilupeuTest::init_scenario () { |
| 108 | |
| 109 | |
| 110 | //Set a seed value - urand_seed = 32'hdeadbeef; in ilupeuTestBase |
| 111 | |
| 112 | //Default is fast link training bit set |
| 113 | //Scenario.FastLinkTraining = 1; |
| 114 | |
| 115 | //Set the ILU-PEU Max link width |
| 116 | // Scenario.ilupeuLinkCapMaxLinkWdth = 8; |
| 117 | |
| 118 | //Set the Denali Max link width |
| 119 | Scenario.denaliLinkCapMaxLinkWdth = 8; |
| 120 | |
| 121 | //Don't send any TLPs or DLLPs in this test |
| 122 | Scenario.EgrTlpWt = 100; |
| 123 | Scenario.EgrDllpFCWt = 0; |
| 124 | Scenario.EgrDllpPMWt = 0; |
| 125 | // Scenario.EgrTlpMinStrats = 0; |
| 126 | // Scenario.EgrTlpMaxStrats = 0; |
| 127 | Scenario.IngrTlpWt = 100; |
| 128 | Scenario.IngrDllpFCWt = 0; |
| 129 | Scenario.IngrDllpPMWt = 0; |
| 130 | // Scenario.IngrTlpMinStrats = 0; |
| 131 | // Scenario.IngrTlpMaxStrats = 0; |
| 132 | |
| 133 | if ( get_plus_arg(CHECK, "PEU_INGRESS") ) { |
| 134 | Scenario.IngrTlpMinStrats = 1; |
| 135 | Scenario.IngrTlpMaxStrats = 1; |
| 136 | Scenario.IngrMinTlpPayloadLngth4Byt = 4; |
| 137 | Scenario.IngrMaxTlpPayloadLngth4Byt = 4; //Max 512 bytes |
| 138 | Scenario.IngrTlpMRd32Wt = 0; |
| 139 | Scenario.IngrTlpMRd64Wt = 0; |
| 140 | Scenario.IngrTlpMWr32Wt = 0; |
| 141 | Scenario.IngrTlpMWr64Wt = 10; |
| 142 | } else { |
| 143 | Scenario.IngrTlpMinStrats = 0; |
| 144 | Scenario.IngrTlpMaxStrats = 0; |
| 145 | } |
| 146 | |
| 147 | |
| 148 | if ( get_plus_arg(CHECK, "PEU_EGRESS") ) { |
| 149 | //Don't send any TLPs or DLLPs in this test |
| 150 | Scenario.EgrTlpMinStrats = 1; |
| 151 | Scenario.EgrTlpMaxStrats = 1; |
| 152 | Scenario.EgrMinTlpPayloadLngth4Byt = 4; |
| 153 | Scenario.EgrMaxTlpPayloadLngth4Byt = 4; //Max 512 bytes |
| 154 | Scenario.EgrTlpMRd32Wt = 0; |
| 155 | Scenario.EgrTlpMRd64Wt = 0; |
| 156 | Scenario.EgrTlpMWr32Wt = 0; |
| 157 | Scenario.EgrTlpMWr64Wt = 10000; |
| 158 | |
| 159 | //Disable to make debugging easier |
| 160 | Scenario.denaliLtssmDisableScrambling = 1; |
| 161 | |
| 162 | } else { |
| 163 | Scenario.EgrTlpMinStrats = 0; |
| 164 | Scenario.EgrTlpMaxStrats = 0; |
| 165 | } |
| 166 | |
| 167 | printf("PEU After Scenario initialization \n"); |
| 168 | } |
| 169 | |