Class simtix::mem::BankedMemory
ClassList > simtix > mem > BankedMemory
A banked memory implementation.
#include <mem.h>
Inherits the following classes: simtix::mem::MemoryInterface
Classes
Type | Name |
---|---|
class | Impl |
struct | Param |
Public Types inherited from simtix::mem::MemoryInterface
See simtix::mem::MemoryInterface
Type | Name |
---|---|
typedef std::function< bool(RespStatus)> | OnResp |
enum uint8_t | RespStatus |
Public Static Attributes
Type | Name |
---|---|
const Param | kDefaultParam = /* multi line expression */ |
Public Functions
Type | Name |
---|---|
BankedMemory (const std::string & name, const Param & param=kDefaultParam) Constructor of BankedMemory . |
|
BankedMemory (const BankedMemory & s) = delete |
|
virtual bool | Read (Payload payload, OnResp on_resp) override Enqueue a read request to the request queue. |
virtual bool | Write (Payload payload, OnResp on_resp) override Enqueue a write request to the request queue. |
BankedMemory | operator= (const BankedMemory & s) = delete |
virtual uint8_t & | operator[] (const uint64_t addr) override The operator[] is used by the simulator to read or modify memory directly. |
const stat::Group * | stat () const |
~BankedMemory () |
Public Functions inherited from simtix::mem::MemoryInterface
See simtix::mem::MemoryInterface
Type | Name |
---|---|
MemoryInterface (const std::string & name, sim::TickPri pri=sim::kMemTickPri) |
|
virtual bool | Read (Payload payload, OnResp on_resp) Enqueue a read request to the request queue. |
virtual bool | Write (Payload payload, OnResp on_resp) Enqueue a write request to the request queue. |
virtual uint8_t & | operator[] (const uint64_t addr) = 0 The operator[] is used by the simulator to read or modify memory directly. |
virtual | ~MemoryInterface () = default |
Public Functions inherited from simtix::sim::Clocked
Type | Name |
---|---|
Clocked (const std::string & name, TickPri pri=kDefaultPri) Constructor for clocled. |
|
const std::string & | name () const Get the name of the clocked object. |
virtual | ~Clocked () |
Protected Attributes
Type | Name |
---|---|
std::unique_ptr< Impl > | impl_ |
Protected Attributes inherited from simtix::sim::Clocked
Type | Name |
---|---|
std::string | name_ |
TickPri | pri_ |
Protected Static Attributes inherited from simtix::sim::Clocked
Type | Name |
---|---|
bool | busy_ = true |
std::map< TickPri, std::vector< Clocked * > > | clocked_objs_map_ |
uint64_t | cur_tick_ = 0 |
Protected Functions
Type | Name |
---|---|
virtual bool | HasPendingTasks () override Check if BankedMemory have pending tasks at the current tick. |
virtual void | Tick () override Perform memory operation cycle. |
Protected Functions inherited from simtix::sim::Clocked
Type | Name |
---|---|
virtual bool | HasPendingTasks () = 0 Checks if any registered clocked objects have pending tasks at the current tick. |
virtual void | Tick () = 0 Global tick function that advances the simulation by one cycle. |
Protected Static Functions inherited from simtix::sim::Clocked
Type | Name |
---|---|
void | Register (Clocked * c) Register a clocked object to participate in tick-driven simulation. |
void | Unregister (Clocked * c) Unregister a clocked object from tick-driven simulation. |
Public Static Attributes Documentation
variable kDefaultParam
Public Functions Documentation
function BankedMemory [1/2]
Constructor of BankedMemory .
explicit simtix::mem::BankedMemory::BankedMemory (
const std::string & name,
const Param & param=kDefaultParam
)
Parameters:
name
Name of the banked memory.param
Memory configuration parameters.
function BankedMemory [2/2]
function Read
Enqueue a read request to the request queue.
Parameters:
payload
Payload for the read operation.on_resp
Callback for the response.
Returns:
True if enqueued successfully.
Implements simtix::mem::MemoryInterface::Read
function Write
Enqueue a write request to the request queue.
Parameters:
payload
Payload for the write operation.on_resp
Callback for the response.
Returns:
True if enqueued successfully.
Implements simtix::mem::MemoryInterface::Write
function operator=
function operator[]
The operator[] is used by the simulator to read or modify memory directly.
Implements simtix::mem::MemoryInterface::operator[]
function stat
function ~BankedMemory
Protected Attributes Documentation
variable impl_
Protected Functions Documentation
function HasPendingTasks
Check if BankedMemory have pending tasks at the current tick.
Returns:
True if there are pending tasks, false otherwise.
Implements simtix::sim::Clocked::HasPendingTasks
function Tick
Perform memory operation cycle.
Implements simtix::sim::Clocked::Tick
The documentation for this class was generated from the following file projects/simtix/include/simtix/mem.h