Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / sam / cpus / vonk / ss / api / sam / src / SS_SamTracer.h
/*
* ========== Copyright Header Begin ==========================================
*
* OpenSPARC T2 Processor File: SS_SamTracer.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 __SS_SamTracer_h__
#define __SS_SamTracer_h__
#include "SS_Tracer.h"
namespace Sam {
#include "vtracer.h"
}
class SS_VirtualStrand;
class SS_SamTracer : public SS_Tracer
{
public:
SS_SamTracer(SS_VirtualStrand *_strand);
private:
static void ss_sam_exe_instr ( SS_Tracer* trc, SS_Vaddr pc, SS_Tte* tte, SS_Instr* i );
static void ss_sam_reg_value ( SS_Tracer* trc, SS_Registers::Index index, uint64_t value );
static void ss_sam_trap ( SS_Tracer* trc, SS_Trap::Type tt, TrapMode mode, SS_Vaddr ea );
static void ss_sam_end_instr ( SS_Tracer* trc );
static void ss_sam_tlb_update( SS_Tracer* trc, bool insert, SS_Tlb* tlb, uint_t index, SS_Tte* tte );
static void ss_sam_mem_acc ( SS_Tracer* trc, MemAccess type, SS_Vaddr va, SS_Tte* tte, uint_t size, uint64_t* val);
static void ss_sam_asi_acc ( SS_Tracer* trc, MemAccess type, uint8_t asi, SS_Vaddr va, uint64_t* val);
static void ss_sam_hwop ( SS_Tracer* trc, MemAccess type, SS_Paddr addr, uint_t size, uint64_t *value );
SS_VirtualStrand* vcpu;
Sam::VCPU_Instruction irec; // instruction record
Sam::VCPU_Trap trec; // trap record
Sam::VCPU_Trap atrec; // async trap record
};
#endif