From 173a7869219534de5053889a84e1006281ec7645 Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Mon, 20 Jul 2015 09:15:18 -0500 Subject: ruby: more flexible ruby tester support This patch allows the ruby random tester to use ruby ports that may only support instr or data requests. This patch is similar to a previous changeset (8932:1b2c17565ac8) that was unfortunately broken by subsequent changesets. This current patch implements the support in a more straight-forward way. Since retries are now tested when running the ruby random tester, this patch splits up the retry and drain check behavior so that RubyPort children, such as the GPUCoalescer, can perform those operations correctly without having to duplicate code. Finally, the patch also includes better DPRINTFs for debugging the tester. --- src/cpu/testers/rubytest/RubyTester.hh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/cpu/testers/rubytest/RubyTester.hh') diff --git a/src/cpu/testers/rubytest/RubyTester.hh b/src/cpu/testers/rubytest/RubyTester.hh index 94a982e32..39e6d78a3 100644 --- a/src/cpu/testers/rubytest/RubyTester.hh +++ b/src/cpu/testers/rubytest/RubyTester.hh @@ -60,6 +60,8 @@ class RubyTester : public MemObject { private: RubyTester *tester; + // index for m_last_progress_vector and hitCallback + PortID globalIdx; public: // @@ -68,8 +70,10 @@ class RubyTester : public MemObject // RubyPorts that support both types of requests, separate InstOnly // and DataOnly CpuPorts will map to that RubyPort - CpuPort(const std::string &_name, RubyTester *_tester, PortID _id) - : MasterPort(_name, _tester, _id), tester(_tester) + CpuPort(const std::string &_name, RubyTester *_tester, PortID _id, + PortID _index) + : MasterPort(_name, _tester, _id), tester(_tester), + globalIdx(_index) {} protected: @@ -93,7 +97,8 @@ class RubyTester : public MemObject virtual BaseMasterPort &getMasterPort(const std::string &if_name, PortID idx = InvalidPortID); - bool isInstReadableCpuPort(int idx); + bool isInstOnlyCpuPort(int idx); + bool isInstDataCpuPort(int idx); MasterPort* getReadableCpuPort(int idx); MasterPort* getWritableCpuPort(int idx); @@ -152,7 +157,8 @@ class RubyTester : public MemObject int m_num_readers; int m_wakeup_frequency; bool m_check_flush; - int m_num_inst_ports; + int m_num_inst_only_ports; + int m_num_inst_data_ports; }; inline std::ostream& -- cgit v1.2.3