// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: niu_rxtoken.vr
// Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
// 4150 Network Circle, Santa Clara, California 95054, U.S.A.
// * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// For the avoidance of doubt, and except that if any non-GPL license
// choice is available it will apply instead, Sun elects to use only
// the General Public License version 2 (GPLv2) at this time for any
// software where a choice of GPL license versions is made
// available with the language indicating that GPLv2 or any later version
// may be used, or where a choice of which version of the GPL is applied is
// otherwise unspecified.
// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
// CA 95054 USA or visit www.sun.com if you need additional information or
// ========== Copyright Header End ============================================
#include <vera_defines.vrh>
#include <ListMacros.vrh>
#include "pcg_defines.vri"
#include "flow_db_tasks.vrh"
#include "niu_rxtoken.vri"
#include "niu_errclass.vrh"
task new((integer i = 0)) {
// Members for Network Errors
// Members for Internal Errors
// Members for Host Errors
error_code =0; // no error
class CRxToken { // This should be extended from the main token ..
integer pkt_type; // To indicate if this packetis to be dropped by rdmc or not
CRxTestClass rx_test_class;
// byte array for 18B control header information
integer jumbo_pkt; // To be used for descriptor sche
bit [63:0] packet_start_address[3];
bit [63:0] packet_virtaddress[3];
bit [63:0] packet_end_address[3];
integer bytesperchunk[3];
task new(integer i = -1) {
printf(" TOKEN DEBUG id - %d port_num - %d dma_num - %d \n",id,port_num,dma_num);
function integer getPktClass() {
// Encoding based upon RDMC completion ring entry
frame_class = pgToken.pack_db.frame.frame_class;
getPktClass = frame_class;
function integer getErrorCode() {
getErrorCode = error_info.error_code;