Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / common / vera / include / ccx.vri
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: ccx.vri
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`ifdef INC__TMP_CCX_VRI
36
37`else
38`define INC__TMP_CCX_VRI
39
40//----------------------------------------------------------
41// CCX Req/Resp Pkt Types Defines
42
43`define CCX_REQ_LD 5'b00000
44`define CCX_REQ_PREF 5'b00000
45`define CCX_REQ_DIAG_LD 5'b00000
46`define CCX_REQ_D_INVAL 5'b00000
47`define CCX_REQ_IFILL 5'b10000
48`define CCX_REQ_I_INVAL 5'b10000
49`define CCX_REQ_ST 5'b00001
50`define CCX_REQ_BLK_ST 5'b00001
51`define CCX_REQ_DIAG_ST 5'b00001
52`define CCX_REQ_CAS1 5'b00010
53`define CCX_REQ_CAS2 5'b00011
54`define CCX_REQ_SWAP 5'b00111
55`define CCX_REQ_STR_LD 5'b00100
56`define CCX_REQ_STR_ST 5'b00101
57`define CCX_REQ_INTR 5'b01001
58`define CCX_REQ_FLUSH 5'b01001
59`define CCX_REQ_MMU_LD 5'b01000
60
61`define CCX_RESP_LD 4'b0000
62`define CCX_RESP_PREF 4'b0000
63`define CCX_RESP_DIAG_LD 4'b0000
64`define CCX_RESP_NCU_LD 4'b1000
65`define CCX_RESP_D_INVAL 4'b0100
66`define CCX_RESP_IFILL 4'b0001
67`define CCX_RESP_NCU_IFILL 4'b1001
68`define CCX_RESP_I_INVAL 4'b0100
69`define CCX_RESP_ST 4'b0100
70`define CCX_RESP_BLK_ST 4'b0100
71`define CCX_RESP_DIAG_ST 4'b0100
72`define CCX_RESP_CAS_RTN 4'b0000
73`define CCX_RESP_CAS_ACK 4'b0100
74`define CCX_RESP_SWAP_RTN 4'b0000
75`define CCX_RESP_SWAP_ACK 4'b0100
76`define CCX_RESP_STR_LD 4'b0010
77`define CCX_RESP_STR_ST 4'b0110
78`define CCX_RESP_MMU_RTN 4'b0101
79`define CCX_RESP_INTR 4'b0111
80`define CCX_RESP_EVICT 4'b0011
81`define CCX_RESP_ERROR_L2 4'b1100
82`define CCX_RESP_ERROR_SOC 4'b1101
83
84//----------------------------------------------------------
85// PCX packet bit indexes
86`define PCX_VALID 129
87`define PCX_RQTYP 128:124
88`define PCX_NC 123
89`define PCX_CID 122:120
90`define PCX_TID 119:117
91`define PCX_INV 116
92`define PCX_PF 115
93`define PCX_WAY 114:112
94`define PCX_SIZE 111:104
95`define PCX_ADDR 103:64
96`define PCX_DATA 63:0
97
98//----------------------------------------------------------
99// CPX packet bit indexes
100`define CPX_VALID 145
101`define CPX_RTNTYP 144:141
102`define CPX_L2MISS 140
103`define CPX_ERR 139:138
104`define CPX_NC 137
105`define CPX_TID 136:134
106`define CPX_WV 133
107`define CPX_WAY 132:131
108`define CPX_F4B 130
109`define CPX_ATOMIC 129
110`define CPX_PF 128
111`define CPX_DATA 127:0
112
113`define CPX_VACK_INVAL 124:123
114`define CPX_VACK_CID 120:118
115`define CPX_VACK_BMASK 103:96
116`define CPX_VACK_VECT 95:64
117`define CPX_VACK_DATA 63:0
118
119// Bit fields in Vack Inval Vector
120`define CPX_VINV_VECT 111:0
121
122`define CPX_D_INV7 29:28
123`define CPX_D_INV6 25:24
124`define CPX_D_INV5 21:20
125`define CPX_D_INV4 17:16
126`define CPX_D_INV3 13:12
127`define CPX_D_INV2 9:8
128`define CPX_D_INV1 5:4
129`define CPX_D_INV0 1:0
130
131// Bit fields in Vack Inval Vector
132// (inval.vector addr[5:4]=3|1 from eviction invalidation pkt)
133`define CPX_D_INV7_ALT 21
134`define CPX_D_INV6_ALT 18
135`define CPX_D_INV5_ALT 15
136`define CPX_D_INV4_ALT 12
137`define CPX_D_INV3_ALT 9
138`define CPX_D_INV2_ALT 6
139`define CPX_D_INV1_ALT 3
140`define CPX_D_INV0_ALT 0
141
142//----------------------------------------------------------
143// CCX Tag Table defines
144`define DATA_TAG 1
145`define INSTR_TAG 0
146`define WAY_3BIT 1
147`define WAY_4BIT 0
148`define TAG_VAL 1'b1
149`define TAG_INVAL 1'b0
150`define EVICT_D 2'b00
151`define EVICT_I 2'b01
152`define EVICT_DI 2'b10
153`define EVICT_ID 2'b11
154`define D_INVAL 2'b01
155`define I_INVAL 2'b10
156
157// Interrupt types
158`define INTR_HW 2'b00
159`define INTR_RESET 2'b01
160`define INTR_IDLE 2'b10
161`define INTR_RESUME 2'b11
162// Interrupt vectors
163`define INTR_POR 6'b000001
164`define INTR_XIR 6'b000011
165
166
167// for packet printing
168`define PP_CPX 0
169`define PP_PCX 1
170`define PP_MEM 2
171`define PP_SPC 3
172`define PP_TRG 4
173
174// misc
175`define READ 0
176`define WRITE 1
177`define PASSIVE 1
178`define ACTIVE 0
179
180
181`endif
182
183//----------------------------------------------------------
184// END OF FILE
185//----------------------------------------------------------