16#ifndef SIMICS_BANK_INTERFACE_H
17#define SIMICS_BANK_INTERFACE_H
19#include <simics/base/memory.h>
20#include <simics/base/transaction.h>
37class MappableConfObject;
38class RegisterInterface;
39class BankIssueCallbacksInterface;
56 virtual std::string_view
name()
const = 0;
99 const std::vector<field_t> &fields) = 0;
116 unsigned index)
const = 0;
121 virtual const std::map<size_t, RegisterInterface *> &
151 uint64_t offset) = 0;
An interface implemented by a Simics bank.
Definition: bank-interface.h:47
virtual void set_description(std::string_view desc)=0
Set the description for the bank.
virtual std::string_view name() const =0
Get the name of the bank without level delimiters.
virtual unsigned number_of_registers() const =0
Get the number of registers in the bank.
virtual void add_register(const register_t ®)=0
Parse a register name and add register to the bank.
virtual void set_callbacks(BankIssueCallbacksInterface *callbacks)=0
Set the callbacks for bank issues.
virtual MappableConfObject * dev_obj() const =0
Get the device object.
virtual ~BankInterface()=default
virtual const std::map< size_t, RegisterInterface * > & mapped_registers() const =0
Get all mapped registers on the bank ordered by offset.
virtual exception_type_t transaction_access(transaction_t *t, uint64_t offset)=0
Entry point for a memory access from the transaction interface.
virtual std::pair< size_t, RegisterInterface * > register_at_index(unsigned index) const =0
Get the register at a specific index.
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 const std::string & description() const =0
Get the description of the bank.
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.
Definition: bank-issue-callbacks-interface.h:25
Definition: mappable-conf-object.h:134
Literal type that extends size_t type.
Definition: common-types.h:30
Definition: after-bank.h:33
ByteOrder
Definition: bank-interface.h:33
std::tuple< Name, Description, Offset, ByteSize, InitValue, std::vector< field_t > > register_t
Definition: register-type.h:45