41 #ifndef __MEM_RUBY_STRUCTURES_TBETABLE_HH__ 42 #define __MEM_RUBY_STRUCTURES_TBETABLE_HH__ 45 #include <unordered_map> 71 void print(std::ostream& out)
const;
79 std::unordered_map<Addr, ENTRY>
m_map;
87 operator<<(std::ostream& out, const TBETable<ENTRY>& obj)
100 return !!
m_map.count(address);
103 template<
class ENTRY>
109 m_map[address] = ENTRY();
112 template<
class ENTRY>
117 assert(
m_map.size() > 0);
118 m_map.erase(address);
121 template<
class ENTRY>
129 template<
class ENTRY>
133 if (
m_map.find(address) !=
m_map.end())
return &(
m_map.find(address)->second);
138 template<
class ENTRY>
144 #endif // __MEM_RUBY_STRUCTURES_TBETABLE_HH__ 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
bool isPresent(Addr address) const
TBETable & operator=(const TBETable &obj)
std::unordered_map< Addr, ENTRY > m_map
TBETable(int number_of_TBEs)