#include <tlb.hpp>
class TLBDefined in include/tlb.hpp:30
RISC-V Translation Lookaside Buffer.
| Name | Kind | Owner |
|---|---|---|
TLB |
function |
Declared here |
~TLB |
function |
Declared here |
lookup |
function |
Declared here |
insert |
function |
Declared here |
flush_all |
function |
Declared here |
flush_addr |
function |
Declared here |
flush_asid |
function |
Declared here |
flush_addr_asid |
function |
Declared here |
| Return | Name | Description |
|---|---|---|
TLB inline |
TLB Constructor. | |
~TLB inline |
TLB Destructor. | |
bool |
lookup |
Looks up in cache for TLB entry. |
void |
insert |
Inserts new TLB entry in cache. |
void |
flush_all inline |
Flushes all TLB entries. |
void |
flush_addr inline |
Flushes all TLB entries by address. |
void |
flush_asid inline |
Flushes all TLB entries by ASID. |
void |
flush_addr_asid inline |
Flushes all TLB entries by address and ASID. |
inline
inline TLB()Defined in include/tlb.hpp:36
TLB Constructor.
inline
inline ~TLB()Defined in include/tlb.hpp:40
TLB Destructor.
bool lookup(uint64_t va, AccessType type, uint16_t asid, int mode, bool mxr, bool sum, uint64_t * pa)Defined in include/tlb.hpp:76
Looks up in cache for TLB entry.
See also: MMU
See also: Hart
Is success?
| Parameter | Type | Description |
|---|---|---|
va |
uint64_t |
Virtual Address |
type |
AccessType |
Access type |
asid |
uint16_t |
ASID |
mode |
int |
Privilage Mode casted to integer |
mxr |
bool |
Hart Status MXR bit |
sum |
bool |
Hart Status SUM bit |
pa |
uint64_t * |
Physical Address pointer |
void insert(uint64_t va, uint64_t pa, uint8_t page_bits, uint8_t perm, uint16_t asid, bool global)Defined in include/tlb.hpp:87
Inserts new TLB entry in cache.
See also: MMU
| Parameter | Type | Description |
|---|---|---|
va |
uint64_t |
Virtual Address |
page_bits |
uint8_t |
Size of PPN page bits |
perm |
uint8_t |
Permissions bit set |
asid |
uint16_t |
Entry ASID |
global |
bool |
Entry G bit |
inline
inline void flush_all()Defined in include/tlb.hpp:92
Flushes all TLB entries.
inline
inline void flush_addr(uint64_t)Defined in include/tlb.hpp:98
Flushes all TLB entries by address.
Note
Currently does nothing; calls flush_all
inline
inline void flush_asid(uint16_t)Defined in include/tlb.hpp:103
Flushes all TLB entries by ASID.
Note
Currently does nothing; calls flush_all
inline
inline void flush_addr_asid(uint64_t, uint16_t)Defined in include/tlb.hpp:108
Flushes all TLB entries by address and ASID.
Note
Currently does nothing; calls flush_all