diff options
author | Korey Sewell <ksewell@umich.edu> | 2010-03-23 00:29:10 -0400 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2010-03-23 00:29:10 -0400 |
commit | d484e1b334c6fd3f2721a2a4628c2324ed14fd08 (patch) | |
tree | c95594df5ecae29b11262967f3f8b99fca82ca5d /src/mem/ruby/system/MemoryNode.hh | |
parent | 70308bc835035b940efb36d7f335643dfaa39851 (diff) | |
parent | a0651b8f6127c8b7994a165b525e93d87c470d20 (diff) | |
download | gem5-d484e1b334c6fd3f2721a2a4628c2324ed14fd08.tar.xz |
m5merge(2): another merge of regression stats
Diffstat (limited to 'src/mem/ruby/system/MemoryNode.hh')
-rw-r--r-- | src/mem/ruby/system/MemoryNode.hh | 99 |
1 files changed, 45 insertions, 54 deletions
diff --git a/src/mem/ruby/system/MemoryNode.hh b/src/mem/ruby/system/MemoryNode.hh index 2c2b987ae..10648b715 100644 --- a/src/mem/ruby/system/MemoryNode.hh +++ b/src/mem/ruby/system/MemoryNode.hh @@ -35,68 +35,59 @@ * message is enqueued to be sent back to the directory. */ -#ifndef MEMORYNODE_H -#define MEMORYNODE_H +#ifndef __MEM_RUBY_SYSTEM_MEMORYNODE_HH__ +#define __MEM_RUBY_SYSTEM_MEMORYNODE_HH__ #include <iostream> +#include "mem/protocol/MemoryRequestType.hh" #include "mem/ruby/common/Global.hh" #include "mem/ruby/slicc_interface/Message.hh" -#include "mem/protocol/MemoryRequestType.hh" - -class MemoryNode { - -public: - // Constructors - -// old one: - MemoryNode(const Time& time, int counter, const MsgPtr& msgptr, const physical_address_t addr, const bool is_mem_read) { - m_time = time; - m_msg_counter = counter; - m_msgptr = msgptr; - m_addr = addr; - m_is_mem_read = is_mem_read; - m_is_dirty_wb = !is_mem_read; - } - -// new one: - MemoryNode(const Time& time, const MsgPtr& msgptr, const physical_address_t addr, const bool is_mem_read, const bool is_dirty_wb) { - m_time = time; - m_msg_counter = 0; - m_msgptr = msgptr; - m_addr = addr; - m_is_mem_read = is_mem_read; - m_is_dirty_wb = is_dirty_wb; - } - // Destructor - ~MemoryNode() {}; - - // Public Methods - void print(std::ostream& out) const; - - // Data Members (m_ prefix) (all public -- this is really more a struct) - - Time m_time; - int m_msg_counter; - MsgPtr m_msgptr; - physical_address_t m_addr; - bool m_is_mem_read; - bool m_is_dirty_wb; +class MemoryNode +{ + public: + // old constructor + MemoryNode(const Time& time, int counter, const MsgPtr& msgptr, + const physical_address_t addr, const bool is_mem_read) + { + m_time = time; + m_msg_counter = counter; + m_msgptr = msgptr; + m_addr = addr; + m_is_mem_read = is_mem_read; + m_is_dirty_wb = !is_mem_read; + } + + // new constructor + MemoryNode(const Time& time, const MsgPtr& msgptr, + const physical_address_t addr, const bool is_mem_read, + const bool is_dirty_wb) + { + m_time = time; + m_msg_counter = 0; + m_msgptr = msgptr; + m_addr = addr; + m_is_mem_read = is_mem_read; + m_is_dirty_wb = is_dirty_wb; + } + + void print(std::ostream& out) const; + + Time m_time; + int m_msg_counter; + MsgPtr m_msgptr; + physical_address_t m_addr; + bool m_is_mem_read; + bool m_is_dirty_wb; }; -// Output operator declaration -std::ostream& operator<<(std::ostream& out, const MemoryNode& obj); - -// ******************* Definitions ******************* - -// Output operator definition -extern inline -std::ostream& operator<<(std::ostream& out, const MemoryNode& obj) +inline std::ostream& +operator<<(std::ostream& out, const MemoryNode& obj) { - obj.print(out); - out << std::flush; - return out; + obj.print(out); + out << std::flush; + return out; } -#endif //MEMORYNODE_H +#endif // __MEM_RUBY_SYSTEM_MEMORYNODE_HH__ |