RubyTester.hh (11061:25b53a7195f7) RubyTester.hh (11266:452e10b868ea)
1/*
2 * Copyright (c) 2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

55
56class RubyTester : public MemObject
57{
58 public:
59 class CpuPort : public MasterPort
60 {
61 private:
62 RubyTester *tester;
1/*
2 * Copyright (c) 2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

55
56class RubyTester : public MemObject
57{
58 public:
59 class CpuPort : public MasterPort
60 {
61 private:
62 RubyTester *tester;
63 // index for m_last_progress_vector and hitCallback
64 PortID globalIdx;
63
64 public:
65 //
66 // Currently, each instatiation of the RubyTester::CpuPort supports
67 // only instruction or data requests, not both. However, for those
68 // RubyPorts that support both types of requests, separate InstOnly
69 // and DataOnly CpuPorts will map to that RubyPort
70
65
66 public:
67 //
68 // Currently, each instatiation of the RubyTester::CpuPort supports
69 // only instruction or data requests, not both. However, for those
70 // RubyPorts that support both types of requests, separate InstOnly
71 // and DataOnly CpuPorts will map to that RubyPort
72
71 CpuPort(const std::string &_name, RubyTester *_tester, PortID _id)
72 : MasterPort(_name, _tester, _id), tester(_tester)
73 CpuPort(const std::string &_name, RubyTester *_tester, PortID _id,
74 PortID _index)
75 : MasterPort(_name, _tester, _id), tester(_tester),
76 globalIdx(_index)
73 {}
74
75 protected:
76 virtual bool recvTimingResp(PacketPtr pkt);
77 virtual void recvReqRetry()
78 { panic("%s does not expect a retry\n", name()); }
79 };
80

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

88
89 typedef RubyTesterParams Params;
90 RubyTester(const Params *p);
91 ~RubyTester();
92
93 virtual BaseMasterPort &getMasterPort(const std::string &if_name,
94 PortID idx = InvalidPortID);
95
77 {}
78
79 protected:
80 virtual bool recvTimingResp(PacketPtr pkt);
81 virtual void recvReqRetry()
82 { panic("%s does not expect a retry\n", name()); }
83 };
84

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

92
93 typedef RubyTesterParams Params;
94 RubyTester(const Params *p);
95 ~RubyTester();
96
97 virtual BaseMasterPort &getMasterPort(const std::string &if_name,
98 PortID idx = InvalidPortID);
99
96 bool isInstReadableCpuPort(int idx);
100 bool isInstOnlyCpuPort(int idx);
101 bool isInstDataCpuPort(int idx);
97
98 MasterPort* getReadableCpuPort(int idx);
99 MasterPort* getWritableCpuPort(int idx);
100
101 virtual void init();
102
103 void wakeup();
104

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

147 std::vector<MasterPort*> writePorts;
148 std::vector<MasterPort*> readPorts;
149 uint64_t m_checks_to_complete;
150 int m_deadlock_threshold;
151 int m_num_writers;
152 int m_num_readers;
153 int m_wakeup_frequency;
154 bool m_check_flush;
102
103 MasterPort* getReadableCpuPort(int idx);
104 MasterPort* getWritableCpuPort(int idx);
105
106 virtual void init();
107
108 void wakeup();
109

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

152 std::vector<MasterPort*> writePorts;
153 std::vector<MasterPort*> readPorts;
154 uint64_t m_checks_to_complete;
155 int m_deadlock_threshold;
156 int m_num_writers;
157 int m_num_readers;
158 int m_wakeup_frequency;
159 bool m_check_flush;
155 int m_num_inst_ports;
160 int m_num_inst_only_ports;
161 int m_num_inst_data_ports;
156};
157
158inline std::ostream&
159operator<<(std::ostream& out, const RubyTester& obj)
160{
161 obj.print(out);
162 out << std::flush;
163 return out;
164}
165
166#endif // __CPU_RUBYTEST_RUBYTESTER_HH__
162};
163
164inline std::ostream&
165operator<<(std::ostream& out, const RubyTester& obj)
166{
167 obj.print(out);
168 out << std::flush;
169 return out;
170}
171
172#endif // __CPU_RUBYTEST_RUBYTESTER_HH__