Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / sam / cpus / vonk / ss / api / memsync / src / MemoryAccessHistoryItem.cc
CommitLineData
920dae64
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: MemoryAccessHistoryItem.cc
4// Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
5// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
6//
7// The above named program is free software; you can redistribute it and/or
8// modify it under the terms of the GNU General Public
9// License version 2 as published by the Free Software Foundation.
10//
11// The above named program is distributed in the hope that it will be
12// useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// General Public License for more details.
15//
16// You should have received a copy of the GNU General Public
17// License along with this work; if not, write to the Free Software
18// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19//
20// ========== Copyright Header End ============================================
21/************************************************************************
22**
23** Copyright (C) 2002, Sun Microsystems, Inc.
24**
25** Sun considers its source code as an unpublished, proprietary
26** trade secret and it is available only under strict license provisions.
27** This copyright notice is placed here only to protect Sun in the event
28** the source is deemed a published work. Disassembly, decompilation,
29** or other means of reducing the object code to human readable form
30** is prohibited by the license agreement under which this code is
31** provided to the user or company in possession of this copy."
32**
33*************************************************************************/
34#include "MemoryAccessHistoryItem.h"
35#include <sstream>
36
37using namespace std;
38using namespace Tso;
39////////////////////////////////////////////////
40
41MemoryAccessHistoryItem::MemoryAccessHistoryItem()
42{
43
44}
45
46////////////////////////////////////////////////
47
48MemoryAccessHistoryItem::MemoryAccessHistoryItem( const MemoryAccessHistoryItem & orig )
49{
50 addr_ = orig.addr_;
51 data_ = orig.data_;
52 stNodeList_ = orig.stNodeList_;
53 ldNodeList_ = orig.ldNodeList_;
54}
55
56////////////////////////////////////////////////
57
58MemoryAccessHistoryItem::~MemoryAccessHistoryItem()
59{
60}
61
62////////////////////////////////////////////////
63
64const MemoryAccessHistoryItem &
65MemoryAccessHistoryItem::operator=( const MemoryAccessHistoryItem & rhs )
66{
67
68 return *this;
69}
70
71////////////////////////////////////////////////
72
73bool
74MemoryAccessHistoryItem::operator==( const MemoryAccessHistoryItem & rhs ) const
75{
76
77 return false;
78}
79
80////////////////////////////////////////////////
81
82string
83MemoryAccessHistoryItem::toString() const
84{
85 list<TsoNode*>::const_iterator ii;
86
87 ostringstream os;
88
89 os << "MAHI (";
90 os << "a=0x" << hex << addr_;
91 os << " d=0x" << hex << (int) data_;
92 os << ")" << endl;
93
94 os << " StNodeList: (size=" << dec << stNodeList_.size() << ")" << endl;
95 for (ii = stNodeList_.begin(); ii != stNodeList_.end(); ii++) {
96 os << " " << (*ii)->toString();
97 }
98
99 os << " LdNodeList: (size=" << dec << ldNodeList_.size() << ")" << endl;
100 for (ii = ldNodeList_.begin(); ii != ldNodeList_.end(); ii++) {
101 os << " " << (*ii)->toString();
102 }
103
104 return os.str();
105}
106