CheckTable.hh (10920:58fbfddff18d) | CheckTable.hh (11025:4872dbdea907) |
---|---|
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 --- 32 unchanged lines hidden (view full) --- 41 42class CheckTable 43{ 44 public: 45 CheckTable(int _num_writers, int _num_readers, RubyTester* _tester); 46 ~CheckTable(); 47 48 Check* getRandomCheck(); | 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 --- 32 unchanged lines hidden (view full) --- 41 42class CheckTable 43{ 44 public: 45 CheckTable(int _num_writers, int _num_readers, RubyTester* _tester); 46 ~CheckTable(); 47 48 Check* getRandomCheck(); |
49 Check* getCheck(const Address& address); | 49 Check* getCheck(Addr address); |
50 51 // bool isPresent(const Address& address) const; 52 // void removeCheckFromTable(const Address& address); 53 // bool isTableFull() const; 54 // Need a method to select a check or retrieve a check 55 56 void print(std::ostream& out) const; 57 58 private: | 50 51 // bool isPresent(const Address& address) const; 52 // void removeCheckFromTable(const Address& address); 53 // bool isTableFull() const; 54 // Need a method to select a check or retrieve a check 55 56 void print(std::ostream& out) const; 57 58 private: |
59 void addCheck(const Address& address); | 59 void addCheck(Addr address); |
60 61 // Private copy constructor and assignment operator 62 CheckTable(const CheckTable& obj); 63 CheckTable& operator=(const CheckTable& obj); 64 65 std::vector<Check*> m_check_vector; | 60 61 // Private copy constructor and assignment operator 62 CheckTable(const CheckTable& obj); 63 CheckTable& operator=(const CheckTable& obj); 64 65 std::vector<Check*> m_check_vector; |
66 m5::hash_map<Address, Check*> m_lookup_map; | 66 m5::hash_map |
67 68 int m_num_writers; 69 int m_num_readers; 70 RubyTester* m_tester_ptr; 71}; 72 73inline std::ostream& 74operator<<(std::ostream& out, const CheckTable& obj) 75{ 76 obj.print(out); 77 out << std::flush; 78 return out; 79} 80 81#endif // __CPU_RUBYTEST_CHECKTABLE_HH__ | 67 68 int m_num_writers; 69 int m_num_readers; 70 RubyTester* m_tester_ptr; 71}; 72 73inline std::ostream& 74operator<<(std::ostream& out, const CheckTable& obj) 75{ 76 obj.print(out); 77 out << std::flush; 78 return out; 79} 80 81#endif // __CPU_RUBYTEST_CHECKTABLE_HH__ |