ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
|
#include <TLB.h>
Public Member Functions | |
TLB () | |
uint32_t | AddPTE (uint64_t vfn, uint64_t pte_val) |
Add an PTE entry in TLB with a pte value. More... | |
uint32_t | AddPTE (uint64_t vfn, const PTE &pte_entry) |
Add an PTE entry in TLB from the given PTE. More... | |
uint32_t | Lookup (uint64_t vfn, PTE *pte_buf) |
Look up the TLB for the given given virtual page number. More... | |
void | Flush () |
Flush the TLB. More... | |
uint32_t | UpdatePTE (uint64_t vfn, uint64_t pte_val) |
Update the PTE entry. More... | |
uint32_t | EvictPTE (uint64_t vfn) |
Evict the PTE entry. More... | |
bool | IsFull () const |
void | DumpEntry (uint64_t vfn) |
Dump the PTE details according to the given VPN. More... | |
void | Dump () |
Dump all PTEs in TLB and TLB details. More... | |
Private Types | |
typedef std::map< uint64_t, PTE > | TLBMap |
Private Attributes | |
TLBMap | tlb_map_ |
uint32_t | max_entry_ |
uint32_t | current_entry_num_ |
bool | is_full_ |
bool | infinite_tlb_entries_ |
|
private |
|
inlineexplicit |
Definition at line 75 of file TLB.h.
References etiss::mm::TLB< EntryNum >::infinite_tlb_entries_, etiss::mm::TLB< EntryNum >::max_entry_, and unlikely.
|
inline |
Add an PTE entry in TLB from the given PTE.
Definition at line 106 of file TLB.h.
References etiss::mm::TLB< EntryNum >::current_entry_num_, etiss::mm::TLB< EntryNum >::is_full_, etiss::mm::NOERROR, etiss::mm::PTEOVERLAP, etiss::mm::TLB< EntryNum >::tlb_map_, etiss::mm::TLBISFULL, and unlikely.
|
inline |
Add an PTE entry in TLB with a pte value.
Definition at line 88 of file TLB.h.
References etiss::mm::TLB< EntryNum >::current_entry_num_, etiss::mm::TLB< EntryNum >::is_full_, etiss::mm::NOERROR, etiss::mm::PTEOVERLAP, etiss::mm::TLB< EntryNum >::tlb_map_, etiss::mm::TLBISFULL, and unlikely.
|
inline |
Dump all PTEs in TLB and TLB details.
Definition at line 198 of file TLB.h.
References etiss::mm::TLB< EntryNum >::current_entry_num_, etiss::mm::TLB< EntryNum >::DumpEntry(), etiss::mm::TLB< EntryNum >::infinite_tlb_entries_, etiss::mm::TLB< EntryNum >::is_full_, etiss::mm::TLB< EntryNum >::max_entry_, and etiss::mm::TLB< EntryNum >::tlb_map_.
|
inline |
Dump the PTE details according to the given VPN.
Definition at line 180 of file TLB.h.
References etiss::ERROR, etiss::log(), etiss::mm::TLB< EntryNum >::tlb_map_, and unlikely.
Referenced by etiss::mm::TLB< EntryNum >::Dump().
|
inline |
Evict the PTE entry.
Definition at line 163 of file TLB.h.
References etiss::mm::TLB< EntryNum >::current_entry_num_, etiss::mm::TLB< EntryNum >::is_full_, etiss::mm::NOERROR, etiss::mm::PTENOTEXISTED, etiss::mm::TLB< EntryNum >::tlb_map_, and unlikely.
|
inline |
Flush the TLB.
Definition at line 138 of file TLB.h.
References etiss::mm::TLB< EntryNum >::current_entry_num_, etiss::mm::TLB< EntryNum >::is_full_, and etiss::mm::TLB< EntryNum >::tlb_map_.
|
inline |
Definition at line 174 of file TLB.h.
References etiss::mm::TLB< EntryNum >::is_full_.
|
inline |
Look up the TLB for the given given virtual page number.
Definition at line 124 of file TLB.h.
References etiss::mm::NOERROR, etiss::mm::TLB< EntryNum >::tlb_map_, and etiss::mm::TLBMISS.
|
inline |
Update the PTE entry.
Definition at line 150 of file TLB.h.
References etiss::mm::NOERROR, etiss::mm::PTENOTEXISTED, etiss::mm::TLB< EntryNum >::tlb_map_, and unlikely.
|
private |
Definition at line 217 of file TLB.h.
Referenced by etiss::mm::TLB< EntryNum >::AddPTE(), etiss::mm::TLB< EntryNum >::Dump(), etiss::mm::TLB< EntryNum >::EvictPTE(), and etiss::mm::TLB< EntryNum >::Flush().
|
private |
Definition at line 219 of file TLB.h.
Referenced by etiss::mm::TLB< EntryNum >::Dump(), and etiss::mm::TLB< EntryNum >::TLB().
|
private |
Definition at line 218 of file TLB.h.
Referenced by etiss::mm::TLB< EntryNum >::AddPTE(), etiss::mm::TLB< EntryNum >::Dump(), etiss::mm::TLB< EntryNum >::EvictPTE(), etiss::mm::TLB< EntryNum >::Flush(), and etiss::mm::TLB< EntryNum >::IsFull().
|
private |
Definition at line 216 of file TLB.h.
Referenced by etiss::mm::TLB< EntryNum >::Dump(), and etiss::mm::TLB< EntryNum >::TLB().
|
private |
Definition at line 214 of file TLB.h.
Referenced by etiss::mm::TLB< EntryNum >::AddPTE(), etiss::mm::TLB< EntryNum >::Dump(), etiss::mm::TLB< EntryNum >::DumpEntry(), etiss::mm::TLB< EntryNum >::EvictPTE(), etiss::mm::TLB< EntryNum >::Flush(), etiss::mm::TLB< EntryNum >::Lookup(), and etiss::mm::TLB< EntryNum >::UpdatePTE().