AbstractCacheEntry.hh (6882:898047a3672c) AbstractCacheEntry.hh (7039:bc0b6ea676b5)
1
2/*
3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer;

--- 13 unchanged lines hidden (view full) ---

23 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30/*
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 13 unchanged lines hidden (view full) ---

22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/*
31 * $Id$
32 *
33 * Description: Common base class for a machine node.
34 *
30 * Common base class for a machine node.
35 */
36
31 */
32
37#ifndef AbstractCacheEntry_H
38#define AbstractCacheEntry_H
33#ifndef __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCACHEENTRY_HH__
34#define __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCACHEENTRY_HH__
39
35
40#include "mem/ruby/common/Global.hh"
41#include "mem/ruby/common/Address.hh"
42#include "mem/protocol/AccessPermission.hh"
36#include "mem/protocol/AccessPermission.hh"
37#include "mem/ruby/common/Address.hh"
38#include "mem/ruby/common/Global.hh"
43#include "mem/ruby/slicc_interface/AbstractEntry.hh"
44
45class DataBlock;
46
39#include "mem/ruby/slicc_interface/AbstractEntry.hh"
40
41class DataBlock;
42
47class AbstractCacheEntry : public AbstractEntry {
48public:
49 // Constructors
50 AbstractCacheEntry();
43class AbstractCacheEntry : public AbstractEntry
44{
45 public:
46 AbstractCacheEntry();
47 virtual ~AbstractCacheEntry() = 0;
51
48
52 // Destructor, prevent it from instantiation
53 virtual ~AbstractCacheEntry() = 0;
54
55 // Data Members (m_ prefix)
56 Address m_Address; // Address of this block, required by CacheMemory
57 Time m_LastRef; // Last time this block was referenced, required by CacheMemory
58 AccessPermission m_Permission; // Access permission for this block, required by CacheMemory
49 Address m_Address; // Address of this block, required by CacheMemory
50 Time m_LastRef; // Last time this block was referenced, required
51 // by CacheMemory
52 AccessPermission m_Permission; // Access permission for this
53 // block, required by CacheMemory
59};
60
54};
55
61// Output operator declaration
62ostream& operator<<(ostream& out, const AbstractCacheEntry& obj);
63
64// ******************* Definitions *******************
65
66// Output operator definition
67extern inline
68ostream& operator<<(ostream& out, const AbstractCacheEntry& obj)
56inline ostream&
57operator<<(ostream& out, const AbstractCacheEntry& obj)
69{
58{
70 obj.print(out);
71 out << flush;
72 return out;
59 obj.print(out);
60 out << flush;
61 return out;
73}
74
62}
63
75#endif //AbstractCacheEntry_H
64#endif // __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCACHEENTRY_HH__
76
65