Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / common / vera / niu_ippktgen / ehp_db.vr
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: ehp_db.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 ============================================
35extern class ehp_fwd_dec_cl;
36
37class ehp_fwd_dec_cl {
38bit multicast = 1'bx;
39bit [2:0] l2_option = 3'bx;
40bit [1:0] l3_version = 2'bx;
41bit [1:0] l4_protocol = 2'bx;
42bit [3:0] l4_hd_length = 4'bx;
43bit push_bit = 1'bx;
44bit [31:0] seq_num = 32'bx;
45bit [15:0] cam_index = 16'bx;
46bit drop_bit = 1'bx;
47bit [1:0] pkt_dest = 2'bx;
48bit [1:0] pkt_mode = 2'bx;
49bit vlan_match = 1'bx;
50bit cfg_def_vlan_ena = 1'bx;
51bit [2:0] pkt_priority = 3'bx;
52bit [7:0] qp_info = 8'bx;
53bit cam_match = 1'bx;
54
55} // end of class ehp_fwd_dec_cl
56
57
58class ehp_db {
59
60//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
61//@ EHP CAM RAM related parameters @
62//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
63bit cam_match; // 1: packet's flow id matches one cam entry
64bit [415:0] exp_cam_data;
65bit [415:0] cam_data[256];
66bit [103:0] cam_mask[256];
67bit [37:0] matched_ram_data;
68bit bypass;
69bit drop;
70bit short;
71bit cfi;
72bit ils;
73bit cksum_err;
74bit vlan_match;
75bit vlan_mmatch;
76bit [7:0] vlan_table_qp_num;
77bit vlan_default_ena;
78bit [7:0] vlan_default_qp;
79
80bit [2:0] ipp_ffl_mac_port;
81bit [7:0] ipp_ffl_mac_index;
82bit [11:0] ipp_ffl_mac_default;
83bit ipp_ffl_data_done;
84bit [22:0] mac_ctrl;
85
86integer ipp_ffl_hdr_cycles;
87integer cam_value, i;
88
89ehp_fwd_dec_cl exp_fwd_dec;
90ehp_fwd_dec_cl col_fwd_dec;
91
92 task new ()
93 {
94 exp_fwd_dec = new;
95 col_fwd_dec = new;
96
97 exp_fwd_dec.multicast = 1'bx;
98 exp_fwd_dec.l2_option = 3'bx;
99 exp_fwd_dec.l3_version = 2'bx;
100 exp_fwd_dec.l4_protocol = 2'bx;
101 exp_fwd_dec.l4_hd_length = 4'bx;
102 exp_fwd_dec.push_bit = 1'bx;
103 exp_fwd_dec.seq_num = 32'bx;
104 exp_fwd_dec.cam_index = 16'bx;
105 exp_fwd_dec.drop_bit = 1'bx;
106 exp_fwd_dec.pkt_dest = 2'bx;
107 exp_fwd_dec.pkt_mode = 2'bx;
108 exp_fwd_dec.vlan_match = 1'bx;
109 exp_fwd_dec.cfg_def_vlan_ena = 1'bx;
110 exp_fwd_dec.qp_info = 8'bx;
111 exp_fwd_dec.cam_match = 1'bx;
112
113 col_fwd_dec.multicast = 1'bx;
114 col_fwd_dec.l2_option = 3'bx;
115 col_fwd_dec.l3_version = 2'bx;
116 col_fwd_dec.l4_protocol = 2'bx;
117 col_fwd_dec.l4_hd_length = 4'bx;
118 col_fwd_dec.push_bit = 1'bx;
119 col_fwd_dec.seq_num = 32'bx;
120 col_fwd_dec.cam_index = 16'bx;
121 col_fwd_dec.drop_bit = 1'bx;
122 col_fwd_dec.pkt_dest = 2'bx;
123 col_fwd_dec.pkt_mode = 2'bx;
124 col_fwd_dec.vlan_match = 1'bx;
125 col_fwd_dec.cfg_def_vlan_ena = 1'bx;
126 col_fwd_dec.qp_info = 8'bx;
127 col_fwd_dec.cam_match = 1'bx;
128
129 bypass = 1'b0;
130 drop = 1'b0;
131 short = 1'b0;
132 cfi = 1'b0;
133 ils = 1'b0;
134 cksum_err = 1'b0;
135 vlan_match = 1'b0;
136 vlan_mmatch = 1'b0;
137 vlan_table_qp_num = 8'h0;
138 vlan_default_ena = 1'h0;
139 vlan_default_qp = 8'h0;
140
141 ipp_ffl_mac_port = 3'h0;
142 ipp_ffl_mac_index = 8'h0;
143 ipp_ffl_mac_default = 12'h0;
144 ipp_ffl_data_done = 1'h0;
145 mac_ctrl = 23'h0;
146
147 for (i = 0; i < 256; i = i +1) {
148 cam_data[i] = 416'hx;
149 cam_mask[i] = 104'hx;
150 }
151
152// cam_data = 416'h0;
153
154 } // end of task new
155
156} // end of class ehp_db
157