* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: global.h
* 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
* 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 "/import/vcs-release/vcs7.1R13/include/vcsuser.h"
#include "/import/vcs-release/vcs7.1R13/include/acc_user.h"
#define KeyType unsigned long long
typedef struct event_record
{
typedef struct list_node
{
//head node for this list.
typedef struct list_head_node
{
list_node_ptr head_ptr
, tail_ptr
;
// define avl tree data structure for memory model
typedef struct l2warm_avl_node
{
struct l2warm_avl_node
*leftPtr
;
struct l2warm_avl_node
*rightPtr
;
typedef struct l2warm_variables
{
char *tag_avalPtr
[TAG
*MAX_BANK
];
int tag_num
;//hold the size of memory for each index.
char *vuad_avalPtr
[VUAD
*MAX_BANK
];
char *data_avalPtr
[DDATA
*MAX_BANK
];
int bank_type
;//number of bank
int bank
, tag
, l2_index
, way
;
long long low_bound
, up_bound
;
int turn_on_valid
, valid_bit
, dirty_bit
;
int round_robin
[MAX_BANK
];
bool blackboard
[MAX_BANK
][L2WAY
][16];
int turn_on_dirty
, turn_off_dirty
;
int err_enjection
, replace
, uncorrect_err
;
int rcheck_range
, l2run_percent
;
long long mask_addr
, rlow_bound
, rup_bound
;
int tag_pend
, tag_pidx
[4], tag_pos
[4], tag_way
[4];
int tag_pend_now
, tag_pidx_now
[4], tag_pos_now
[4], tag_way_now
[4];
int data_pend
, data_pidx
[4], data_pos
[4], data_way
[4];
int data_pend_now
, data_pidx_now
[4], data_pos_now
[4], data_way_now
[4];
int taken_d
, taken_t
, not_taken_d
, not_taken_t
;
l2warm_avl_node_ptr avl_ptr
;
typedef struct l1warm_variables
{
long long low_ibound
, up_ibound
,
int bank
, row
, pair
, tag
, itag
, dtag
, check_irange
, check_drange
,
panel
, col
, way
, cpu
, entry
, cache
;
int cpu_ptr
[MAX_CORE
], cpu_chose
[MAX_CORE
];
char *dir_iarray
[8 * MAX_BANK
];
long long dir_ivalid
[8 * MAX_BANK
];
long long dir_iparity
[8* MAX_BANK
];
long long dir_iaddr4
[8 * MAX_BANK
];
char *dir_darray
[8 * MAX_BANK
];
long long dir_dvalid
[8 * MAX_BANK
];
long long dir_dparity
[8 * MAX_BANK
];
long long dir_daddr4
[8 * MAX_BANK
];
int dcache_num
, dtag_num
, dvalid_num
;
char *dcache_w
[MAX_CORE
][4];
char *dcache_tag
[MAX_CORE
][4];
int dcache_vld
[MAX_CORE
];
int icache_num
, itag_num
, ivalid_num
;
char *icache_data
[MAX_CORE
][16];
char *icache_tag
[MAX_CORE
][8];
int icache_vld
[MAX_CORE
];
int l2mask
,l2bank_type
, l2way
;
//static struct l2warm_variables l2warm_vars;