Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / niu / rxc_sat / vera / fflp / include / pkt_configurator_defines.vri
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: pkt_configurator_defines.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#ifndef __PKT_CONFIGURATOR_DEFINES_VRI__
36#define __PKT_CONFIGURATOR_DEFINES_VRI__
37
38
39#define MAX_DMA_CHAN 16
40#define MAX_RDC_TABLE 8
41#define INVALID_DMA_NUM 2*MAX_DMA_CHAN-1
42#define MAX_DA_1G 8
43#define MAX_DA_10G 16
44#define MAX_VLAN_ENTRIES 4096
45#define MAX_ZCP_RDC_ENTRIES 128
46
47#define MAX_CAM_ENTRIES 128
48#define MAX_L3_CLASSES 12
49
50// packet classification encodings
51#define PATH_NO_CLS_MACRDC_OFFSET0 0
52#define PATH_L2_CLS_MACRDC_OFFSET0 1
53#define PATH_L2_CLS_MACRDC_CAM_OFFSET0 2
54#define PATH_L3_CLS_MACRDC_HASH1_OFFSET 3
55#define PATH_L3_CLS_MACRDC_NOEXT_HASH1_OFFSET 4
56#define PATH_L3_CLS_MACRDC_EXT_HASH1_OFFSET 5
57#define PATH_L3_CLS_MACRDC_CAM_HASH1_OFFSET 6
58#define PATH_L3_CLS_MACRDC_CAM_NOEXT_HASH1_OFFSET 7
59#define PATH_L3_CLS_MACRDC_CAM_EXT_HASH1_OFFSET 8
60
61#define PATH_NO_CLS_VLNRDC_OFFSET0 9
62#define PATH_L2_CLS_VLNRDC_OFFSET0 10
63#define PATH_L2_CLS_VLNRDC_CAM_OFFSET0 11
64#define PATH_L3_CLS_VLNRDC_HASH1_OFFSET 12
65#define PATH_L3_CLS_VLNRDC_NOEXT_HASH1_OFFSET 13
66#define PATH_L3_CLS_VLNRDC_EXT_HASH1_OFFSET 14
67#define PATH_L3_CLS_VLNRDC_CAM_HASH1_OFFSET 15
68#define PATH_L3_CLS_VLNRDC_CAM_NOEXT_HASH1_OFFSET 16
69#define PATH_L3_CLS_VLNRDC_CAM_EXT_HASH1_OFFSET 17
70
71#define PATH_L2_CLS_ASCRDC_CAM_OFFSET0 18
72#define PATH_L2_CLS_ASCRDC_CAM_ASC_OFFSET 19
73#define PATH_L3_CLS_ASCRDC_CAM_ASC_OFFSET 20
74#define PATH_L3_CLS_ASCRDC_CAM_HASH1_OFFSET 21
75#define PATH_L3_CLS_ASCRDC_NOEXT_HASH1_OFFSET 22
76#define PATH_L3_CLS_ASCRDC_EXT_HASH1_OFFSET 23
77
78
79// tcam key fields for ipv4 and ipv6
80#define TCAM_CLS_CODE 199:195
81
82#define IPV4_CAM_CLS_CODE 199:195
83#define IPV4_CAM_L2RDC_TBL_NUM 191:187
84#define IPV4_CAM_NOPORT 186
85#define IPV4_CAM_TOS 111:104
86#define IPV4_CAM_PID 103:96
87#define IPV4_CAM_L4PT_SPI 95:64
88#define IPV4_CAM_L4_SRC_PORT 95:80
89#define IPV4_CAM_L4_DST_PORT 79:64
90#define IPV4_CAM_IP_ADDR_SA 63:32
91#define IPV4_CAM_IP_ADDR_DA 31:0
92
93#define IPV6_CAM_CLS_CODE 199:195
94#define IPV6_CAM_L2RDC_TBL_NUM 191:187
95#define IPV6_CAM_TOS 175:168
96#define IPV6_CAM_NXT_HDR 167:160
97#define IPV6_CAM_L4PT_SPI 159:128
98#define IPV6_CAM_L4_SRC_PORT 159:144
99#define IPV6_CAM_L4_DST_PORT 143:128
100#define IPV6_CAM_IP_ADDR 127:0
101
102#define ETHERTYPE_CLS_CODE 199:195
103#define ETHERTYPE_EFRAME 191:104
104
105
106// hash1 flow key lookup defines
107#define FLOW_KEY_PORT 23:22
108#define FLOW_KEY_PID 31:24
109#define FLOW_KEY_L4_1 47:32
110#define FLOW_KEY_L4_0 63:48
111#define FLOW_KEY_IPV4_DA 95:64
112#define FLOW_KEY_IPV6_DA 191:64
113#define FLOW_KEY_IPV4_SA 223:192
114#define FLOW_KEY_IPV6_SA 319:192
115#define FLOW_KEY_VLAN_ID 331:320
116#define FLOW_KEY_MAC_DA 379:332
117#define FLOW_KEY_VLAN_VALID 383:380
118
119#define standard_l2_path0 "0,1,"
120#define standard_l2_path1 "0,2,3,"
121#define standard_l2_path2 "0,2,4,5,"
122#define standard_l2_path3 "0,2,4,6,7,"
123#define standard_l2_path4 "0,2,4,6,8,9,"
124#define standard_l2_path5 "0,2,4,6,8,10,"
125#define standard_l3_path0 "11,"
126#define standard_l3_path1 "12,13,18,19,29,"
127#define standard_l3_path2 "12,13,18,19,30,31,"
128#define standard_l3_path3 "12,13,18,20,21,"
129#define standard_l3_path4 "12,13,18,20,22,23,"
130#define standard_l3_path5 "12,13,18,20,22,24,26,"
131#define standard_l3_path6 "12,13,18,20,22,24,25,27,"
132#define standard_l3_path7 "12,14,15,"
133#define standard_l3_path8 "12,14,16,17,29,"
134#define standard_l3_path9 "12,14,16,17,30,31,"
135#define standard_l3_path10 "12,14,16,18,19,29,"
136#define standard_l3_path11 "12,14,16,18,19,30,31,"
137#define standard_l3_path12 "12,14,16,18,20,21,"
138#define standard_l3_path13 "12,14,16,18,19,20,22,23,"
139#define standard_l3_path14 "12,14,16,18,19,20,22,24,26,"
140#define standard_l3_path15 "12,14,16,18,19,20,22,24,25,27,"
141#define standard_l3_path16 "12,14,16,18,19,20,22,24,25,28,31,"
142
143#endif