summaryrefslogtreecommitdiff
path: root/src/cpu/rubytest/Check.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-03-29 20:39:02 -0400
committerNathan Binkert <nate@binkert.org>2010-03-29 20:39:02 -0400
commit60ae1d2b10002bb73b420fce91c4b74397c55457 (patch)
treef986a920f3d8702f93f8aefa8a64007495144ae6 /src/cpu/rubytest/Check.hh
parent1c98bc5a567599f9fdc7d9940dbfe907091cb3b4 (diff)
downloadgem5-60ae1d2b10002bb73b420fce91c4b74397c55457.tar.xz
style: cleanup the Ruby Tester
Diffstat (limited to 'src/cpu/rubytest/Check.hh')
-rw-r--r--src/cpu/rubytest/Check.hh98
1 files changed, 40 insertions, 58 deletions
diff --git a/src/cpu/rubytest/Check.hh b/src/cpu/rubytest/Check.hh
index ce42ed376..5f621a018 100644
--- a/src/cpu/rubytest/Check.hh
+++ b/src/cpu/rubytest/Check.hh
@@ -1,4 +1,3 @@
-
/*
* Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
* Copyright (c) 2009 Advanced Micro Devices, Inc.
@@ -28,78 +27,61 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef CHECK_H
-#define CHECK_H
+#ifndef __CPU_RUBYTEST_CHECK_HH__
+#define __CPU_RUBYTEST_CHECK_HH__
-#include "mem/ruby/common/Global.hh"
+#include "cpu/rubytest/RubyTester.hh"
+#include "mem/protocol/AccessModeType.hh"
+#include "mem/protocol/TesterStatus.hh"
#include "mem/ruby/common/Address.hh"
+#include "mem/ruby/common/Global.hh"
#include "mem/ruby/system/NodeID.hh"
-#include "mem/protocol/TesterStatus.hh"
-#include "mem/protocol/AccessModeType.hh"
-#include "cpu/rubytest/RubyTester.hh"
+
class SubBlock;
const int CHECK_SIZE_BITS = 2;
-const int CHECK_SIZE = (1<<CHECK_SIZE_BITS);
+const int CHECK_SIZE = (1 << CHECK_SIZE_BITS);
-class Check {
-public:
- // Constructors
- Check(const Address& address,
- const Address& pc,
- int _num_cpu_sequencer,
- RubyTester* _tester);
+class Check
+{
+ public:
+ Check(const Address& address, const Address& pc, int _num_cpu_sequencer,
+ RubyTester* _tester);
- // Default Destructor
- //~Check();
-
- // Public Methods
+ void initiate(); // Does Action or Check or nether
+ void performCallback(NodeID proc, SubBlock* data);
+ const Address& getAddress() { return m_address; }
+ void changeAddress(const Address& address);
- void initiate(); // Does Action or Check or nether
- void performCallback(NodeID proc, SubBlock* data);
- const Address& getAddress() { return m_address; }
- void changeAddress(const Address& address);
+ void print(ostream& out) const;
- void print(ostream& out) const;
-private:
- // Private Methods
- void initiatePrefetch();
- void initiateAction();
- void initiateCheck();
+ private:
+ void initiatePrefetch();
+ void initiateAction();
+ void initiateCheck();
- void pickValue();
- void pickInitiatingNode();
+ void pickValue();
+ void pickInitiatingNode();
- void debugPrint();
+ void debugPrint();
- // Using default copy constructor and assignment operator
- // Check(const Check& obj);
- // Check& operator=(const Check& obj);
-
- // Data Members (m_ prefix)
- TesterStatus m_status;
- uint8 m_value;
- int m_store_count;
- NodeID m_initiatingNode;
- Address m_address;
- Address m_pc;
- AccessModeType m_access_mode;
- int m_num_cpu_sequencers;
- RubyTester* m_tester_ptr;
+ TesterStatus m_status;
+ uint8 m_value;
+ int m_store_count;
+ NodeID m_initiatingNode;
+ Address m_address;
+ Address m_pc;
+ AccessModeType m_access_mode;
+ int m_num_cpu_sequencers;
+ RubyTester* m_tester_ptr;
};
-// Output operator declaration
-ostream& operator<<(ostream& out, const Check& obj);
-
-// ******************* Definitions *******************
-
-// Output operator definition
-extern inline
-ostream& operator<<(ostream& out, const Check& obj)
+inline ostream&
+operator<<(ostream& out, const Check& obj)
{
- obj.print(out);
- out << flush;
- return out;
+ obj.print(out);
+ out << flush;
+ return out;
}
-#endif //CHECK_H
+#endif // __CPU_RUBYTEST_CHECK_HH__