1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * Copyright (c) 2009 Advanced Micro Devices, Inc. 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 --- 42 unchanged lines hidden (view full) --- 51 RubyTester *tester; 52 53 public: 54 // 55 // Currently, each instatiation of the RubyTester::CpuPort supports 56 // only instruction or data requests, not both. However, for those 57 // RubyPorts that support both types of requests, separate InstOnly 58 // and DataOnly CpuPorts will map to that RubyPort |
59 |
60 CpuPort(const std::string &_name, RubyTester *_tester, int _idx) 61 : MasterPort(_name, _tester), tester(_tester), idx(_idx) |
62 {} 63 64 int idx; |
65 66 protected: 67 virtual bool recvTiming(PacketPtr pkt); 68 virtual void recvRetry() 69 { panic("%s does not expect a retry\n", name()); } 70 }; 71 72 struct SenderState : public Packet::SenderState --- 16 unchanged lines hidden (view full) --- 89 90 typedef RubyTesterParams Params; 91 RubyTester(const Params *p); 92 ~RubyTester(); 93 94 virtual MasterPort &getMasterPort(const std::string &if_name, 95 int idx = -1); 96 |
97 bool isInstReadableCpuPort(int idx); 98 |
99 MasterPort* getReadableCpuPort(int idx); 100 MasterPort* getWritableCpuPort(int idx); 101 102 virtual void init(); 103 104 void wakeup(); 105 106 void incrementCheckCompletions() { m_checks_completed++; } --- 33 unchanged lines hidden (view full) --- 140 RubyTester(const RubyTester& obj); 141 RubyTester& operator=(const RubyTester& obj); 142 143 CheckTable* m_checkTable_ptr; 144 std::vector<Time> m_last_progress_vector; 145 146 int m_num_cpus; 147 uint64 m_checks_completed; |
148 std::vector<MasterPort*> writePorts; 149 std::vector<MasterPort*> readPorts; |
150 uint64 m_checks_to_complete; 151 int m_deadlock_threshold; 152 int m_num_writers; 153 int m_num_readers; 154 int m_wakeup_frequency; 155 bool m_check_flush; 156 int m_num_inst_ports; 157}; 158 159inline std::ostream& 160operator<<(std::ostream& out, const RubyTester& obj) 161{ 162 obj.print(out); 163 out << std::flush; 164 return out; 165} 166 167#endif // __CPU_RUBYTEST_RUBYTESTER_HH__ |