Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / sam / cpus / vonk / ss / api / pli / bin / SS_RegCompare.h
/*
* ========== Copyright Header Begin ==========================================
*
* OpenSPARC T2 Processor File: SS_RegCompare.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
*
* The above named program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
*
* The above named 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 work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*
* ========== Copyright Header End ============================================
*/
#ifndef __@-ARCH-@_RegCompare_h__
#define __@-ARCH-@_RegCompare_h__
/************************************************************************
**
** Copyright (C) 2006, Sun Microsystems, Inc.
**
** Sun considers its source code as an unpublished, proprietary
** trade secret and it is available only under strict license provisions.
** This copyright notice is placed here only to protect Sun in the event
** the source is deemed a published work. Disassembly, decompilation,
** or other means of reducing the object code to human readable form
** is prohibited by the license agreement under which this code is
** provided to the user or company in possession of this copy.
**
*************************************************************************/
//
// @-ARCH-@_RegCompare.h is automatically generated from
// ss/api/pli/bin/Bl_RegCompare.h, do not modify @-ARCH-@_RegCompare.h
// make necessary changes in ss/api/pli/bin/Bl_RegCompare.h instead.
//
#include <stdio.h>
#include <string.h>
#include "@-ARCH-VF-@_Strand.h"
#include "SS_RegCompare.h"
class @-ARCH-@_RegCompare : public SS_RegCompare
{
public:
@-ARCH-@_RegCompare( @-ARCH-VF-@_Strand* _strand, SS_PliSocket* _socket );
void initialise();
void compare( uint32_t opc );
void dump_regs();
int name_2_index( std::string name );
private:
@-ARCH-VF-@_Strand* strand;
enum RegId
{
CTR_PC = 32,
CTR_NPC = 33,
CTR_Y = 34,
CTR_CCR = 35,
CTR_FPRS = 36,
CTR_FSR = 37,
CTR_ASI = 38,
CTR_TICK = 39,
CTR_GSR = 40,
CTR_TICK_CMPR = 41,
CTR_STICK_CMPR = 43,
CTR_PSTATE = 44,
CTR_TL = 45,
CTR_PIL = 46,
CTR_TPC1 = 47,
CTR_TPC2 = 48,
CTR_TPC3 = 49,
CTR_TPC4 = 50,
CTR_TPC5 = 51,
CTR_TPC6 = 52,
CTR_TNPC1 = 57,
CTR_TNPC2 = 58,
CTR_TNPC3 = 59,
CTR_TNPC4 = 60,
CTR_TNPC5 = 61,
CTR_TNPC6 = 62,
CTR_TSTATE1 = 67,
CTR_TSTATE2 = 68,
CTR_TSTATE3 = 69,
CTR_TSTATE4 = 70,
CTR_TSTATE5 = 71,
CTR_TSTATE6 = 72,
CTR_TT1 = 77,
CTR_TT2 = 78,
CTR_TT3 = 79,
CTR_TT4 = 80,
CTR_TT5 = 81,
CTR_TT6 = 82,
CTR_TBA = 87,
CTR_HVER = 88,
CTR_CWP = 89,
CTR_CANSAVE = 90,
CTR_CANRESTORE = 91,
CTR_OTHERWIN = 92,
CTR_WSTATE = 93,
CTR_CLEANWIN = 94,
CTR_SOFTINT = 95,
CTR_INTR_RECV = 106,
CTR_GL = 107,
CTR_HPSTATE = 108,
CTR_HTSTATE1 = 109,
CTR_HTSTATE2 = 110,
CTR_HTSTATE3 = 111,
CTR_HTSTATE4 = 112,
CTR_HTSTATE5 = 113,
CTR_HTSTATE6 = 114,
CTR_HTBA = 119,
CTR_HINTP = 120,
CTR_HSTICK_CMPR = 121,
CTR_D_SFAR = 125, // VaddrT getSyncFaultAddress()
CTR_CTXT_PRIM_0 = 126, // 21/8
CTR_CTXT_SEC_0 = 127, // 21/10
CTR_CTXT_PRIM_1 = 128, // 21/108
CTR_CTXT_SEC_1 = 129, // 21/110
CTR_LSU_CONTROL = 130, // 45/0
CTR_I_TAG_ACC = 131, // 50/30
CTR_CTXT_Z_TSB_CFG0 = 132, // 54/10
CTR_CTXT_Z_TSB_CFG1 = 133, // 54/18
CTR_CTXT_Z_TSB_CFG2 = 134, // 54/20
CTR_CTXT_Z_TSB_CFG3 = 135, // 54/28
CTR_CTXT_NZ_TSB_CFG0 = 136, // 54/30
CTR_CTXT_NZ_TSB_CFG1 = 137, // 54/38
CTR_CTXT_NZ_TSB_CFG2 = 138, // 54/40
CTR_CTXT_NZ_TSB_CFG3 = 139, // 54/48
CTR_D_TAG_ACC = 141, // 58/30
CTR_DWATCHPOINT_ADDR = 142, // 58/38
CTR_TOTAL
};
uint64_t ctr[CTR_TOTAL];
static RegId reg_list[];
static const char* reg_name[];
uint64_t get( RegId );
};
#endif