| 1 | // ========== Copyright Header Begin ========================================== |
| 2 | // |
| 3 | // OpenSPARC T2 Processor File: l2_inv_vector_sample.vrhpal |
| 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 | .for $sparc (0..7) { |
| 36 | . for $way (0..7) { |
| 37 | . for $id (0..1) { |
| 38 | . if ($way >= 4) { |
| 39 | . $newway = $way - 4; |
| 40 | . } |
| 41 | . else{ |
| 42 | . $newway = $way; |
| 43 | . } |
| 44 | . if ($newway == 0) { $vld = "00"; } |
| 45 | . elsif ($newway == 1) { $vld = "01"; } |
| 46 | . elsif ($newway == 2) { $vld = "10"; } |
| 47 | . elsif ($newway == 3) { $vld = "11"; } |
| 48 | . if ($id == 0) { |
| 49 | . if ($way < 4) { |
| 50 | . $vld = "0" . $vld . "1"; |
| 51 | . } else { |
| 52 | . $vld = "1" . $vld . "1"; |
| 53 | . } |
| 54 | . $type = "_I"; |
| 55 | . } else { |
| 56 | . $vld = $vld . "10"; |
| 57 | . $type = "_D"; |
| 58 | . } |
| 59 | . $x32 = ""; |
| 60 | . for $i (0..7) { |
| 61 | . if ($i == $sparc) { $x32 = $vld . $x32; } |
| 62 | . else { $x32 = "xxxx" . $x32; } |
| 63 | . } |
| 64 | . if (($way < 4) || ($id == 0)) { |
| 65 | wildcard state EVICT_a00_s${sparc}_w${way}${type}( {1'b1, EVICT_REQ, 24'bx, 32'bx, 24'bx, 32'b${x32}} ); |
| 66 | . } ## if ($way < 4) || ($id == 0) |
| 67 | . } ## for id |
| 68 | . } ## for way |
| 69 | .} ## for sparc |
| 70 | |
| 71 | |
| 72 | |
| 73 | // EVICT_REQ addr=01 |
| 74 | .for $sparc (0..7) { |
| 75 | . for $way (0..3) { |
| 76 | . if ($way == 0) { $vld = "00"; } |
| 77 | . elsif ($way == 1) { $vld = "01"; } |
| 78 | . elsif ($way == 2) { $vld = "10"; } |
| 79 | . elsif ($way == 3) { $vld = "11"; } |
| 80 | . $vld = $vld . "1"; |
| 81 | . $x24 = ""; |
| 82 | . for $i (0..7) { |
| 83 | . if ($i == $sparc) { $x24 = $vld . $x24; } |
| 84 | . else { $x24 = "xxx" . $x24; } |
| 85 | . } |
| 86 | wildcard state EVICT_a01_s${sparc}_w${way}_D( {1'b1, EVICT_REQ, 24'bx, 32'bx, 24'b${x24}, 32'bx} ); |
| 87 | . } ## for way |
| 88 | .} ## for sparc |
| 89 | |
| 90 | |
| 91 | |
| 92 | // EVICT_REQ addr=10 |
| 93 | .for $sparc (0..7) { |
| 94 | . for $way (0..7) { |
| 95 | . for $id (0..1) { |
| 96 | . if ($way >= 4) { |
| 97 | . $newway = $way - 4; |
| 98 | . } |
| 99 | . else{ |
| 100 | . $newway = $way; |
| 101 | . } |
| 102 | . |
| 103 | . if ($newway == 0) { $vld = "00"; } |
| 104 | . elsif ($newway == 1) { $vld = "01"; } |
| 105 | . elsif ($newway == 2) { $vld = "10"; } |
| 106 | . elsif ($newway == 3) { $vld = "11"; } |
| 107 | . if ($id == 0) { |
| 108 | . if ($way < 4) { |
| 109 | . $vld = "0" . $vld . "1"; |
| 110 | . } else { |
| 111 | . $vld = "1" . $vld . "1"; |
| 112 | . } |
| 113 | . $type = "_I"; |
| 114 | . } else { |
| 115 | . $vld = $vld . "10"; |
| 116 | . $type = "_D"; |
| 117 | . } |
| 118 | . $x32 = ""; |
| 119 | . for $i (0..7) { |
| 120 | . if ($i == $sparc) { $x32 = $vld . $x32; } |
| 121 | . else { $x32 = "xxxx" . $x32; } |
| 122 | . } |
| 123 | . if (($way < 4) || ($id == 0)) { |
| 124 | wildcard state EVICT_a10_s${sparc}_w${way}${type}( {1'b1, EVICT_REQ, 24'bx, 32'b${x32}, 24'bx, 32'bx} ); |
| 125 | . } ## if ($way < 4) || ($id == 0) |
| 126 | . } ## for id |
| 127 | . } ## for way |
| 128 | .} ## for sparc |
| 129 | |
| 130 | |
| 131 | // EVICT_REQ addr=11 |
| 132 | .for $sparc (0..7) { |
| 133 | . for $way (0..3) { |
| 134 | . if ($way == 0) { $vld = "00"; } |
| 135 | . elsif ($way == 1) { $vld = "01"; } |
| 136 | . elsif ($way == 2) { $vld = "10"; } |
| 137 | . elsif ($way == 3) { $vld = "11"; } |
| 138 | . $vld = $vld . "1"; |
| 139 | . $x24 = ""; |
| 140 | . for $i (0..7) { |
| 141 | . if ($i == $sparc) { $x24 = $vld . $x24; } |
| 142 | . else { $x24 = "xxx" . $x24; } |
| 143 | . } |
| 144 | wildcard state EVICT_a11_s${sparc}_w${way}_D( {1'b1, EVICT_REQ, 24'b${x24}, 32'bx, 24'bx, 32'bx} ); |
| 145 | . } ## for way |
| 146 | .} ## for sparc |
| 147 | |
| 148 | |