Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / common / vera / niu_ippktgen / ibtp_db.vr
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: ibtp_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 ============================================
35class ibtp_db
36{
37 //===== Test generation (IPP interface) =====
38 bit dest_port_type; // 0: IBtP, 1: HRP
39 bit src_port_type; // 0: IPP, 1: HTP
40 bit [7:0] qpn_or_mcix; // QPN_bypass when use_mc_index = 0,
41 // mc_index when use_mc_index = 1.
42 bit [12:0] first_bkt_ptr;
43 bit [12:0] last_bkt_ptr;
44 bit [7:0] bkt_cnt;
45 bit [11:0] vid;
46 bit vid_compare;
47 bit discard_pkt;
48 bit big_pkt;
49 //===== First Control Word (not declared before) =====
50 bit [15:0] pkt_len;
51 bit [3:0] tcp_chksum_fields; //{bad_crc,ip_chksum_ok,tcp_fullchksum,tcp_fullchksum_ok}
52 //===== Second Control Word (not declared before) =====
53 bit [1:0] net_rcv_mode_bits;// 00:Bypass, 01:TCP_rsmbly, 10:TOE, 11: ENCAP
54 bit [7:0] hdr_len;
55 bit use_mc_index; // 1: multicast
56 bit [15:0] cb_index; // CB_index
57 bit [31:0] tcp_seq_no;
58 bit [15:0] tcp_segment_len;
59 bit push_bit; //= |pack_db[ip_token].flow.fl_state.tcp_flags;
60 bit toe_wb_notif; // Used in TOE mode (write back notif)
61 bit cam_match;
62 //===== Checker update (LLTx interface) =====
63 bit [12:0] lltx_free_ptr[];//Free LLTx pointers received by IPP for each packet
64 //[0]=first_bkt_ptr, [bkt_cnt-1]=last_bkt_ptr (for TCP page crossing)
65 //===== Checker update (SQM, PC interface) =====
66 //This may be used by downstream checkers.
67 bit [7:0] qpn_local; // Translated QPN to SQM
68 bit [4:0] ibtp_opcode;
69 bit [15:0] data_len; // rdma_len in TCP_rsmbly or TOE mode,
70 // pkt_len in Bypass mode
71 bit [10:0] info_ram_ptr;
72 bit [63:0] rdma_vaddr;
73 bit [31:0] r_key;
74
75 //===== Extra =====
76 bit no_pio_intr_chk; //Default - on the fly check, otherwise PIO access check
77 bit err_chk;
78 bit [4:0] err_type; //Following the bit order of interrupt status register
79 //5'd1-wqram_perr, 5'd2-iram_ecc_err, 5'd3-ififo_perr, 5'd4-bmc_err
80 bit reset_en; //For reset check
81 integer rec_ipflow_time;
82 integer first_ipflow_time;
83
84 #ifndef VEGA_CHIP_LEVEL
85 bit [127:0] ipp_first_ctrl_word; //Double check data reading back from BMC
86 bit [127:0] ipp_second_ctrl_word;
87 #endif
88
89 task new()
90 {
91 dest_port_type = 1'b0;
92 src_port_type = 1'b0;
93 qpn_or_mcix = 8'b0;
94 first_bkt_ptr = 13'b0;
95 last_bkt_ptr = 13'b0;
96 bkt_cnt = 8'b0;
97 vid = 12'b0;
98 vid_compare = 1'b0;
99 discard_pkt = 1'b0;
100 big_pkt = 1'b0;
101 pkt_len = 16'b0;
102 tcp_chksum_fields = 4'b0;
103 net_rcv_mode_bits = 2'b00;
104 hdr_len = 8'b0;
105 use_mc_index = 1'b0;
106 cb_index = 16'b0;
107 toe_wb_notif = 1'b0;
108 tcp_seq_no = 32'b0;
109 tcp_segment_len = 16'b0;
110 push_bit = 1'b0;
111 cam_match = 1'b1;
112
113 qpn_local = 8'b0;
114 ibtp_opcode = 5'b0;
115 data_len = 16'b0;
116 info_ram_ptr = 11'b0;
117 rdma_vaddr = 64'b0;
118 r_key = 32'b0;
119
120 no_pio_intr_chk = 1'b1;
121 err_chk = 1'b0;
122 err_type = 5'b0;
123 reset_en = 1'b0;
124 rec_ipflow_time = 0;
125 first_ipflow_time = 0;
126
127 #ifndef VEGA_CHIP_LEVEL
128 ipp_first_ctrl_word = 128'b0;
129 ipp_second_ctrl_word = 128'b0;
130 #endif
131 }
132}