Skip to content

Class simtix::mem::CacheImpl

ClassList > simtix > mem > CacheImpl

Inherited by the following classes: simtix::mem::Cache::Impl

Classes

Type Name
struct CoreRequest
struct DataArrayRequest
struct MemResponse
struct WriteBufferEntry

Public Types

Type Name
typedef MemoryInterface::OnResp OnResp
typedef MemoryInterface::Payload Payload
typedef MemoryInterface::RespStatus RespStatus

Public Functions

Type Name
CacheImpl (const std::string & name, MemoryInterface * next_level, const Cache::Param & param)
uint64_t ToLineAddr (uint64_t addr)
uint8_t & operator[] (const uint64_t addr)
~CacheImpl ()

Protected Attributes

Type Name
sim::SizedQueue< CoreRequest > core_req_queue_
sim::SizedQueue< CoreRequest > core_resp_queue_
std::unique_ptr< DataArray > data_array_
sim::SizedQueue< DataArrayRequest > data_array_req_queue_
OnResp flush_on_resp_
uint64_t flush_tag_arr_index_
sim::SizedQueue< uint32_t > free_write_buffers_
bool has_pending_flush_
const uint32_t kBanks
const size_t kBlockSizeBytes
const size_t kSizeBytes
const uint8_t kWays
const Cache::Param::WriteHitPolicies kWriteHitPolicy
const Cache::Param::WriteMissPolicies kWriteMissPolicy
sim::SizedQueue< MemResponse > mem_resp_queue_
std::unique_ptr< MshrFile > mshr_file_
std::string name_
MemoryInterface * next_level_
sim::SizedQueue< CoreRequest > non_cacheable_mem_req_queue_
const std::vector< Cache::Param::NonCacheableEntry > non_cacheable_regions_
sim::SizedQueue< uint32_t > pending_write_req_queue_
std::shared_ptr< Stat > stat_
std::unique_ptr< TagArray > tag_array_
std::vector< WriteBufferEntry > write_buffers_

Protected Functions

Type Name
bool AcceptCoreRequest (const Payload & payload, OnResp on_esp, bool is_write, bool is_flush)
bool AcceptMemResponse (MemResponse resp)
void AccessDataArray ()
void AccessTagArray ()
bool CanServeMshrReqFirst ()
void HandleCoreResponse ()
void HandleMemRequest ()
bool IsNonCacheablePayload (const Payload & payload)
void ResetStat ()
Reset the stats.
void UpdateStat (bool is_write, int way, uint32_t core_req_wid, uint32_t line_wid)

Public Types Documentation

typedef OnResp

using simtix::mem::CacheImpl::OnResp =  MemoryInterface::OnResp;

typedef Payload

using simtix::mem::CacheImpl::Payload =  MemoryInterface::Payload;

typedef RespStatus

using simtix::mem::CacheImpl::RespStatus =  MemoryInterface::RespStatus;

Public Functions Documentation

function CacheImpl

simtix::mem::CacheImpl::CacheImpl (
    const std::string & name,
    MemoryInterface * next_level,
    const Cache::Param & param
) 

function ToLineAddr

inline uint64_t simtix::mem::CacheImpl::ToLineAddr (
    uint64_t addr
) 

function operator[]

uint8_t & simtix::mem::CacheImpl::operator[] (
    const uint64_t addr
) 

function ~CacheImpl

simtix::mem::CacheImpl::~CacheImpl () 

Protected Attributes Documentation

variable core_req_queue_

sim::SizedQueue<CoreRequest> simtix::mem::CacheImpl::core_req_queue_;

variable core_resp_queue_

sim::SizedQueue<CoreRequest> simtix::mem::CacheImpl::core_resp_queue_;

variable data_array_

std::unique_ptr<DataArray> simtix::mem::CacheImpl::data_array_;

variable data_array_req_queue_

sim::SizedQueue<DataArrayRequest> simtix::mem::CacheImpl::data_array_req_queue_;

variable flush_on_resp_

OnResp simtix::mem::CacheImpl::flush_on_resp_;

variable flush_tag_arr_index_

uint64_t simtix::mem::CacheImpl::flush_tag_arr_index_;

variable free_write_buffers_

sim::SizedQueue<uint32_t> simtix::mem::CacheImpl::free_write_buffers_;

variable has_pending_flush_

bool simtix::mem::CacheImpl::has_pending_flush_;

variable kBanks

const uint32_t simtix::mem::CacheImpl::kBanks;

variable kBlockSizeBytes

const size_t simtix::mem::CacheImpl::kBlockSizeBytes;

variable kSizeBytes

const size_t simtix::mem::CacheImpl::kSizeBytes;

variable kWays

const uint8_t simtix::mem::CacheImpl::kWays;

variable kWriteHitPolicy

const Cache::Param::WriteHitPolicies simtix::mem::CacheImpl::kWriteHitPolicy;

variable kWriteMissPolicy

const Cache::Param::WriteMissPolicies simtix::mem::CacheImpl::kWriteMissPolicy;

variable mem_resp_queue_

sim::SizedQueue<MemResponse> simtix::mem::CacheImpl::mem_resp_queue_;

variable mshr_file_

std::unique_ptr<MshrFile> simtix::mem::CacheImpl::mshr_file_;

variable name_

std::string simtix::mem::CacheImpl::name_;

variable next_level_

MemoryInterface* simtix::mem::CacheImpl::next_level_;

variable non_cacheable_mem_req_queue_

sim::SizedQueue<CoreRequest> simtix::mem::CacheImpl::non_cacheable_mem_req_queue_;

variable non_cacheable_regions_

const std::vector<Cache::Param::NonCacheableEntry> simtix::mem::CacheImpl::non_cacheable_regions_;

variable pending_write_req_queue_

sim::SizedQueue<uint32_t> simtix::mem::CacheImpl::pending_write_req_queue_;

variable stat_

std::shared_ptr<Stat> simtix::mem::CacheImpl::stat_;

variable tag_array_

std::unique_ptr<TagArray> simtix::mem::CacheImpl::tag_array_;

variable write_buffers_

std::vector<WriteBufferEntry> simtix::mem::CacheImpl::write_buffers_;

Protected Functions Documentation

function AcceptCoreRequest

bool simtix::mem::CacheImpl::AcceptCoreRequest (
    const Payload & payload,
    OnResp on_esp,
    bool is_write,
    bool is_flush
) 

function AcceptMemResponse

bool simtix::mem::CacheImpl::AcceptMemResponse (
    MemResponse resp
) 

function AccessDataArray

void simtix::mem::CacheImpl::AccessDataArray () 

function AccessTagArray

void simtix::mem::CacheImpl::AccessTagArray () 

function CanServeMshrReqFirst

bool simtix::mem::CacheImpl::CanServeMshrReqFirst () 

function HandleCoreResponse

void simtix::mem::CacheImpl::HandleCoreResponse () 

function HandleMemRequest

void simtix::mem::CacheImpl::HandleMemRequest () 

function IsNonCacheablePayload

bool simtix::mem::CacheImpl::IsNonCacheablePayload (
    const Payload & payload
) 

function ResetStat

Reset the stats.

inline void simtix::mem::CacheImpl::ResetStat () 

Create a new stat group and point the current stat pointer to it.


function UpdateStat

inline void simtix::mem::CacheImpl::UpdateStat (
    bool is_write,
    int way,
    uint32_t core_req_wid,
    uint32_t line_wid
) 


The documentation for this class was generated from the following file projects/simtix/src/simtix/mem/cache/cache.h