// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: TsoNode.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."
*************************************************************************/
////////////////////////////////////////////////
////////////////////////////////////////////////
TsoNode::TsoNode( const TsoNode
& orig
)
strcpy(nodeName_
, orig
.nodeName_
);
lastLoad_
= orig
.lastLoad_
;
lastStore_
= orig
.lastStore_
;
////////////////////////////////////////////////
TsoNode::TsoNode( const TsoCheckerCmd
& cmd
)
sprintf (nodeName_
, "t%0d_%0lld", tid_
, iseq_
);
////////////////////////////////////////////////
////////////////////////////////////////////////
TsoNode::operator=( const TsoNode
& rhs
)
strcpy(nodeName_
, rhs
.nodeName_
);
lastLoad_
= rhs
.lastLoad_
;
lastStore_
= rhs
.lastStore_
;
////////////////////////////////////////////////
TsoNode::operator==( const TsoNode
& rhs
) const
////////////////////////////////////////////////
TsoNode::toString() const
os
<< " i=" << mmitype
[itype_
];
os
<< " e=" << mmcmd
[cmd_
];
os
<< " a=0x" << hex
<< addr_
;
os
<< " d=0x" << hex
<< data_
;
os
<< " vb=0x" << hex
<< (int) sizeV_
;
os
<< " o=0x" << hex
<< (int) old_
;
os
<< " dsrc=" << mmdsrc
[dsrc_
];
os
<< " ncnt=" << dec
<< ncnt_
;
os
<< " ma=" << dec
<< commit_
;
os
<< " gl=" << dec
<< gobs_
;
os
<< " ll=" << (int) lastLoad_
;
os
<< " ls=" << (int) lastStore_
;
list
<TsoEdge
*>::iterator ei
, ei2
;
if (inSize() == 0) return;
for (ei
= inBegin(); ei
!= inEnd(); ei
++) {
for (ei2
= np
->outBegin(); ei2
!= np
->outEnd(); ei2
++) {
MS_ERROR("Remove edges in source node out_ list unsuccessful");
TsoNode::removeOutEdges()
list
<TsoEdge
*>::iterator ei
, ei2
;
if (outSize() == 0) return;
for (ei
= outBegin(); ei
!= outEnd(); ei
++) {
for (ei2
= np
->inBegin(); ei2
!= np
->inEnd(); ei2
++) {
MS_ERROR("Remove edges in destination node in_ list unsuccessful");
TsoNode::allEntriesArrive() {
// return (ncnt_ == 8); // when add membar implementation, block load/store should be one node
return (ncnt_
== 1); // current implementation, they have 8 nodes per instruction