Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / niu / rtl / niu_smx_define.h
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: niu_smx_define.h
5* Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
6* 4150 Network Circle, Santa Clara, California 95054, U.S.A.
7*
8* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9*
10* This program is free software; you can redistribute it and/or modify
11* it under the terms of the GNU General Public License as published by
12* the Free Software Foundation; version 2 of the License.
13*
14* This program is distributed in the hope that it will be useful,
15* but WITHOUT ANY WARRANTY; without even the implied warranty of
16* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17* GNU General Public License for more details.
18*
19* You should have received a copy of the GNU General Public License
20* along with this program; if not, write to the Free Software
21* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22*
23* For the avoidance of doubt, and except that if any non-GPL license
24* choice is available it will apply instead, Sun elects to use only
25* the General Public License version 2 (GPLv2) at this time for any
26* software where a choice of GPL license versions is made
27* available with the language indicating that GPLv2 or any later version
28* may be used, or where a choice of which version of the GPL is applied is
29* otherwise unspecified.
30*
31* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
32* CA 95054 USA or visit www.sun.com if you need additional information or
33* have any questions.
34*
35*
36* ========== Copyright Header End ============================================
37*/
38
39`define SMX_PD
40
41`define SMX_CMDPOS_POST 5
42`define SMX_CMDPOS_ORDER 4
43`define SMX_CMDPOS_CODE 2:0
44
45// meta cmd code
46`define SMX_CMD_MEMRD 3'b000
47`define SMX_CMD_MEMWR 3'b001
48`define SMX_CMD_ORDER 1'b1
49`define SMX_CMD_BYPASS 1'b0
50`define SMX_CMD_POST 1'b1
51`define SMX_CMD_NONPOST 1'b0
52`define SMX_CMD_COMP_WITH_DATA 3'b101 // read resp ???
53`define SMX_CMD_COMP_WITHOUT_DATA 3'b110 // write resp ??
54
55// resp cmd code not sure ???
56// see below
57
58// si cmd code
59`define SMX_SICMD_WR_POST 6'b010010
60`define SMX_SICMD_WR_NONPOST 6'b000010
61`define SMX_SICMD_RD 6'b001010
62`define SMX_SICMD_WR_RESP 6'b100010
63`define SMX_SICMD_RD_RESP 6'b101010
64
65// sii hdr format position
66`define SMX_SICMD_POS_RESP 127 // 1
67`define SMX_SICMD_POS_POST 126 // 1
68`define SMX_SICMD_POS_RD 125 // 1
69
70`define SMX_SICMD_POS_CMD 127:122
71`define SMX_SICMD_POS_RSV0 121:85
72`define SMX_SICMD_POS_AP 84:83
73`define SMX_SICMD_POS_ERR 82:80 // 3
74`define SMX_SICMD_POS_HERR 81:80 // 2; hdr err E, UE
75`define SMX_SICMD_POS_ID 79:64 // 16
76`define SMX_SICMD_POS_RSV1 63
77`define SMX_SICMD_POS_CP 62
78`define SMX_SICMD_POS_ID_ECC 61:56
79`define SMX_SICMD_POS_RSV2 55:40
80`define SMX_SICMD_POS_PA 39:0
81
82`define SMX_SICMD_POS_ID_META 79:74
83`define SMX_SICMD_POS_ID_SEQ 73:64
84
85
86// cr
87`define SMX_SII_MAX_ORD_CR 5'd16
88`define SMX_SII_MAX_BYP_CR 5'd16
89
90// arb
91`define SMX_DATA_CYCLES 3'h4
92`define SMX_REQARB_RD 1'b0
93`define SMX_REQARB_WR 1'b1
94
95`define SMX_CMDFF_POS_CMD 65:60
96`define SMX_CMDFF_POS_ERR 59:57
97`define SMX_CMDFF_POS_ID 56:41
98`define SMX_CMDFF_POS_ADDR 40:1
99`define SMX_CMDFF_POS_ORDER 0
100
101 // ??? assign xtb position
102`define SMX_XTB_POS_RCVCNT 128:119 // 10; append at bus
103`define SMX_XTB_POS_ADDR 118:55 // 64
104`define SMX_XTB_POS_LEN 54:41 // 14
105`define SMX_XTB_POS_PORT 40:39 // 2
106`define SMX_XTB_POS_DMA 38:34 // 5
107`define SMX_XTB_POS_CLIENT 33:26 // 8
108`define SMX_XTB_POS_NOF64B 25:16 //10
109`define SMX_XTB_POS_SOP_LINE_EN 15:12 // 4
110`define SMX_XTB_POS_EOP_LINE_EN 11:8 // 4
111`define SMX_XTB_POS_SOP_BYTE_EN 7:4 // 4
112`define SMX_XTB_POS_EOP_BYTE_EN 3:0 // 4
113
114`define SMX_RESP_CMDFF_POS_WITH_DATA 21
115`define SMX_RESP_CMDFF_POS_RESP 20
116`define SMX_RESP_CMDFF_POS_RD 19
117`define SMX_RESP_CMDFF_POS_ERR 18:16
118`define SMX_RESP_CMDFF_POS_PKTERR 16
119`define SMX_RESP_CMDFF_POS_ID 15:0
120`define SMX_RESP_CMDFF_POS_ID_META 15:10
121`define SMX_RESP_CMDFF_POS_SEQ 9:0
122
123
124`define SMX_LE_B0 7:0
125`define SMX_LE_B1 15:8
126`define SMX_LE_B2 23:16
127`define SMX_LE_B3 31:24
128`define SMX_LE_B4 39:32
129`define SMX_LE_B5 47:40
130`define SMX_LE_B6 55:48
131`define SMX_LE_B7 63:56
132`define SMX_LE_B8 71:64
133`define SMX_LE_B9 79:72
134`define SMX_LE_B10 87:80
135`define SMX_LE_B11 95:88
136`define SMX_LE_B12 103:96
137`define SMX_LE_B13 111:104
138`define SMX_LE_B14 119:112
139`define SMX_LE_B15 127:120
140
141`define SMX_BE_B0 127:120
142`define SMX_BE_B1 119:112
143`define SMX_BE_B2 111:104
144`define SMX_BE_B3 103:96
145`define SMX_BE_B4 95:88
146`define SMX_BE_B5 87:80
147`define SMX_BE_B6 79:72
148`define SMX_BE_B7 71:64
149`define SMX_BE_B8 63:56
150`define SMX_BE_B9 55:48
151`define SMX_BE_B10 47:40
152`define SMX_BE_B11 39:32
153`define SMX_BE_B12 31:24
154`define SMX_BE_B13 23:16
155`define SMX_BE_B14 15:8
156`define SMX_BE_B15 7:0
157
158
159`define SMX_TRAINING_SET 3'h4
160`define SMX_TRAINING_LOAD 3'h5
161
162
163/* meta cmd
164 wr, rd
165 post, non-post
166 cmd[5] 1'b1 posted
167 1'b0 non-posted
168 cmd[4] 1'b1 order
169 1'b0 bypass
170 cmd[3] 1'b1 64b addressing
171 1'b0 32b addressing ??
172 cmd[2:0] 3'b000 rd
173 3'b001 wr
174 peu spec
175 [4:3] error type ???
176 peu spec
177 3'b101 completion with data ??
178 3'b110 completion without data ??
179
180 smx spec
181 3'b100 completion read
182 (completion with data) ??
183 3'b101 completion write
184 (completion without data ??
185 currently implement smx spec's
186*/
187/* si hdr
188 si.cmd
189 si.err[2:0]
190 si.id[15:0]
191 si.pa[39:0]
192 order/bypass
193*/
194
195