// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: MemoryAccessEntry.cc
// 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 ============================================
/************************************************************************
** Copyright (C) 2002, 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."
*************************************************************************/
#include "MemoryAccessEntry.h"
////////////////////////////////////////////////
uint64_t MemoryAccessEntry::maeid
= 0;
MemoryAccessEntry::MemoryAccessEntry() :
id_
= MemoryAccessEntry::maeid
++;
MemoryAccessEntry::MemoryAccessEntry(LoadStoreCmd
& cmd
) :
cacheL1_
= cmd
.isCacheL1();
srcBank_
= cmd
.getSrcBank();
switchData_
= cmd
.isSwitchData();
id_
= MemoryAccessEntry::maeid
++;
////////////////////////////////////////////////
MemoryAccessEntry::MemoryAccessEntry( const MemoryAccessEntry
& orig
)
srcBank_
= orig
.srcBank_
;
cacheL1_
= orig
.cacheL1_
;
executed_
= orig
.executed_
;
dsrcMid_
= orig
.dsrcMid_
;
switchData_
= orig
.switchData_
;
origData_
= orig
.origData_
;
origVbyte_
= orig
.origVbyte_
;
dmaStore
= orig
.dmaStore
;
writeBack
= orig
.writeBack
;
////////////////////////////////////////////////
MemoryAccessEntry::~MemoryAccessEntry()
////////////////////////////////////////////////
const MemoryAccessEntry
&
MemoryAccessEntry::operator=( const MemoryAccessEntry
& rhs
)
// Replace the following line with your function body.
// RIESLING_THROW_DOMAIN_ERROR( "Unimplemented function." );
////////////////////////////////////////////////
MemoryAccessEntry::operator==( const MemoryAccessEntry
& rhs
) const
// Replace the following line with your function body.
// RIESLING_THROW_DOMAIN_ERROR( "Unimplemented function." );
////////////////////////////////////////////////
MemoryAccessEntry::toString() const
os
<< "id=" << dec
<< id_
;
os
<< " v=" << (int) valid_
;
os
<< " e=" << mmcmd
[etype_
];
os
<< " i=" << mmitype
[itype_
];
os
<< " dsrc=" << mmdsrc
[dsrc_
];
os
<< " cid=" << dec
<< cid_
;
os
<< " tid=" << dec
<< tid_
;
os
<< " inv=0x" << hex
<< inv_
;
os
<< " cinv=0x" << hex
<< cinv_
;
os
<< " bank=" << dec
<< srcBank_
;
os
<< " s=" << dec
<< set_
;
os
<< " w=" << dec
<< way_
;
os
<< " ack=" << (int) acked_
;
os
<< " a=0x" << hex
<< addr_
;
os
<< " d=0x" << hex
<< data_
;
os
<< " vb=0x" << hex
<< (int) vbyte_
;
os
<< " cas=" << dec
<< (int) switchData_
;
os
<< " exe=" << dec
<< (int) executed_
;
os
<< " $=" << dec
<< (int) cacheL1_
;
os
<< " ds=" << dec
<< dsrcMid_
;
os
<< " di=" << dec
<< global_
;
os
<< " iseq=" << dec
<< iseq_
;
os
<< " pop=" << dec
<< (int) popped_
;
os
<< " dmaSt=" << dmaStore
;
os
<< " invSet=" << invSet
;
os
<< " tsize=" << dec
<< tsize
;
// os << " l:id=" << dec << link_->getId();
// os << " l:e=" << mmcmd[link_->getEntryType()];
// os << " l:tid=" << link_->getThrdId();
// os << " l:a=0x" << hex << link_->getAddr();
// os << " l:d=0x" << hex << link_->getData();
os
<< " cycle=" << dec
<< cycle_
;