29 #ifndef __MEM_RUBY_STRUCTURES_TBETABLE_HH__
30 #define __MEM_RUBY_STRUCTURES_TBETABLE_HH__
33 #include <unordered_map>
58 void print(std::ostream& out)
const;
66 std::unordered_map<Addr, ENTRY>
m_map;
74 operator<<(std::ostream& out, const TBETable<ENTRY>& obj)
86 assert(m_map.size() <= m_number_of_TBEs);
87 return !!m_map.count(address);
94 assert(!isPresent(address));
95 assert(m_map.size() < m_number_of_TBEs);
96 m_map[address] = ENTRY();
103 assert(isPresent(address));
104 assert(m_map.size() > 0);
105 m_map.erase(address);
109 template<
class ENTRY>
113 if (m_map.find(address) != m_map.end())
return &(m_map.find(address)->second);
118 template<
class ENTRY>
124 #endif // __MEM_RUBY_STRUCTURES_TBETABLE_HH__
bool isPresent(Addr address) const
void deallocate(Addr address)
bool areNSlotsAvailable(int n, Tick current_time) const
uint64_t Tick
Tick count type.
void allocate(Addr address)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
ENTRY * lookup(Addr address)
Addr makeLineAddress(Addr addr)
void print(std::ostream &out) const
TBETable & operator=(const TBETable &obj)
std::unordered_map< Addr, ENTRY > m_map
TBETable(int number_of_TBEs)