An interface implemented by a Simics bank. More...
#include <bank-interface.h>
Public Member Functions | |
| virtual | ~BankInterface ()=default |
| virtual std::string_view | name () const =0 |
| Get the name of the bank without level delimiters. | |
| virtual MappableConfObject * | dev_obj () const =0 |
| Get the device object. | |
| virtual const std::string & | description () const =0 |
| Get the description of the bank. | |
| virtual void | set_description (std::string_view desc)=0 |
| Set the description for the bank. | |
| virtual void | add_register (const register_t ®)=0 |
| Parse a register name and add register to the bank. | |
| virtual void | add_register (std::string_view name, std::string_view desc, Offset offset, ByteSize number_of_bytes, InitValue init_value, const std::vector< field_t > &fields)=0 |
| Add a register to the bank. | |
| virtual unsigned | number_of_registers () const =0 |
| Get the number of registers in the bank. | |
| virtual std::pair< size_t, RegisterInterface * > | register_at_index (unsigned index) const =0 |
| Get the register at a specific index. | |
| virtual const std::map< size_t, RegisterInterface * > & | mapped_registers () const =0 |
| Get all mapped registers on the bank ordered by offset. | |
| virtual void | set_callbacks (BankIssueCallbacksInterface *callbacks)=0 |
| Set the callbacks for bank issues. | |
| virtual ByteOrder | get_byte_order () const =0 |
| Get the byte order of the bank. | |
| virtual void | set_miss_pattern (uint8_t miss_pattern)=0 |
| Set the miss pattern for the bank. | |
| virtual exception_type_t | transaction_access (transaction_t *t, uint64_t offset)=0 |
| Entry point for a memory access from the transaction interface. | |
An interface implemented by a Simics bank.
This interface defines the operations and properties of a Simics bank, which is a container for registers and associated metadata.
|
virtualdefault |
|
pure virtual |
Parse a register name and add register to the bank.
| reg | The register data to be added to the bank. |
Implemented in simics::Bank.
|
pure virtual |
Add a register to the bank.
| name | The name of the register. |
| desc | The description of the register. |
| offset | The offset of the register within the bank. |
| number_of_bytes | The size of the register in bytes. |
| init_value | The initial value of the register. |
| fields | A vector of fields associated with the register. |
Implemented in simics::Bank.
|
pure virtual |
Get the description of the bank.
Implemented in simics::Bank.
|
pure virtual |
|
pure virtual |
Get the byte order of the bank.
Implemented in simics::Bank.
|
pure virtual |
Get all mapped registers on the bank ordered by offset.
Implemented in simics::Bank.
|
pure virtual |
Get the name of the bank without level delimiters.
Implemented in simics::Bank.
|
pure virtual |
Get the number of registers in the bank.
Implemented in simics::Bank.
|
pure virtual |
Get the register at a specific index.
| index | The index of the register. |
Implemented in simics::Bank.
|
pure virtual |
Set the callbacks for bank issues.
Implemented in simics::Bank.
|
pure virtual |
Set the description for the bank.
| desc | A string view containing the new description for the bank. |
Implemented in simics::Bank.
|
pure virtual |
Set the miss pattern for the bank.
Implemented in simics::Bank.
|
pure virtual |
Entry point for a memory access from the transaction interface.
This function handles memory access requests by extracting the necessary information from the transaction object, invoking the appropriate access methods (read or write), and updating the transaction object accordingly.
| offset | The memory offset relative to the bank. |
Implemented in simics::Bank.