41#ifndef __MEM_RUBY_STRUCTURES_TBETABLE_HH__
42#define __MEM_RUBY_STRUCTURES_TBETABLE_HH__
45#include <unordered_map>
77 void print(std::ostream& out)
const;
85 std::unordered_map<Addr, ENTRY>
m_map;
105 assert(m_map.size() <= m_number_of_TBEs);
106 return !!m_map.count(address);
113 assert(!isPresent(address));
114 assert(m_map.size() < m_number_of_TBEs);
115 m_map[address] = ENTRY();
122 assert(isPresent(address));
123 assert(m_map.size() > 0);
124 m_map.erase(address);
139 if (m_map.find(address) != m_map.end())
return &(m_map.find(address)->second);
std::unordered_map< Addr, ENTRY > m_map
TBETable(const TBETable &obj)
bool areNSlotsAvailable(int n, Tick current_time) const
bool isPresent(Addr address) const
TBETable(int number_of_TBEs)
ENTRY * lookup(Addr address)
void print(std::ostream &out) const
void allocate(Addr address)
void deallocate(Addr address)
TBETable & operator=(const TBETable &obj)
Addr makeLineAddress(Addr addr)
std::ostream & operator<<(std::ostream &os, const BoolVec &myvector)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.