36class MappableConfObject;
70 std::string_view
name()
const override {
86 const std::vector<field_t> &fields)
override;
89 unsigned index)
const override;
90 const std::map<size_t,
93 callbacks_ = callbacks;
97 miss_pattern_ = miss_pattern;
100 uint64_t offset)
override;
104 virtual std::vector<uint8_t>
read(
105 uint64_t offset,
size_t size,
108 virtual void write(uint64_t offset,
const std::vector<uint8_t> &value,
122 std::vector<uint8_t> &bytes)
const;
124 std::vector<uint8_t> &bytes)
const;
127 bool has_range_overlap(uint64_t offset,
size_t size)
const;
136 std::optional<uint8_t> miss_pattern_;
139 std::map<size_t, RegisterInterface *> regs_;
142 std::vector<std::unique_ptr<RegisterInterface>> newd_regs_;
An interface implemented by a Simics bank.
Definition: bank-interface.h:47
Definition: bank-issue-callbacks-interface.h:25
Base class to represent a Simics register bank.
Definition: bank.h:51
void set_miss_pattern(uint8_t miss_pattern) override
Set the miss pattern for the bank.
Definition: bank.h:96
Bank(MappableConfObject *dev_obj, const std::string &name, ByteOrder byte_order)
virtual std::vector< uint8_t > read(uint64_t offset, size_t size, Inquiry inquiry=Inquiry::NonInquiry) const
void allocate_bank_memory(std::string_view name)
Allocate memory for this bank by name.
std::string_view name() const override
Get the name of the bank without level delimiters.
Definition: bank.h:70
Bank & operator=(const Bank &)=delete
exception_type_t transaction_access(transaction_t *t, uint64_t offset) override
Entry point for a memory access from the transaction interface.
Bank(MappableConfObject *dev_obj, const std::string &name)
MappableConfObject * dev_obj() const override
Get the device object.
Definition: bank.h:73
void add_register(const register_t ®) override
Parse a register name and add register to the bank.
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) override
Add a register to the bank.
virtual void unmapped_read(size_t offset, size_t size) const
unsigned number_of_registers() const override
Get the number of registers in the bank.
void set_callbacks(BankIssueCallbacksInterface *callbacks) override
Set the callbacks for bank issues.
Definition: bank.h:92
Bank & operator=(Bank &&rhs)
ByteOrder get_byte_order() const override
Get the byte order of the bank.
Definition: bank.h:95
virtual void unmapped_write(size_t offset, size_t size) const
Bank(const Bank &)=delete
void set_description(std::string_view desc) override
Set the description for the bank.
Definition: bank.h:79
const std::string & description() const override
Get the description of the bank.
Definition: bank.h:76
std::pair< size_t, RegisterInterface * > register_at_index(unsigned index) const override
Get the register at a specific index.
const std::map< size_t, RegisterInterface * > & mapped_registers() const override
Get all mapped registers on the bank ordered by offset.
virtual void write(uint64_t offset, const std::vector< uint8_t > &value, size_t size, Inquiry inquiry=Inquiry::NonInquiry) const
Base class for Bank, Register, and Field classes.
Definition: hierarchical-object.h:44
std::string_view name() const override
const std::string & description() const override
void set_description(std::string_view desc) override
MappableConfObject * dev_obj() const override
Definition: mappable-conf-object.h:134
Definition: register-interface.h:37
Literal type that extends size_t type.
Definition: common-types.h:30
Definition: after-bank.h:33
std::unordered_map< Offset, uint8_t > bank_memory_t
Definition: bank-type.h:52
ByteOrder
Definition: bank-interface.h:33
std::tuple< Name, Description, Offset, ByteSize, InitValue, std::vector< field_t > > register_t
Definition: register-type.h:45
Inquiry
Definition: bank.h:38
Definition: bank-access.h:42