bank_after_write bank_before_write
API Reference Manual  /  5 Model-to-Simulator Interfaces  / 

bank_before_read

Description
The bank_before_read interface is used to monitor and modify the state of read accesses from the before_read_callback_t callback.

SIM_INTERFACE(bank_before_read) {
        physical_address_t (*offset)(bank_access_t *handle);
        physical_address_t (*size)(bank_access_t *handle);

        void (*set_offset)(bank_access_t *handle, physical_address_t offset);
        void (*inquire)(bank_access_t *handle);
        conf_object_t *(*initiator)(bank_access_t *handle);
};
#define BANK_BEFORE_READ_INTERFACE "bank_before_read"

offset retrieves the address of the access.

size gets the size of the access.

set_offset can be used to redirect the access to another address.

inquire can turn the access into an inquiry access. Subsequent and corresponding after_read callbacks are invoked regardless.

initiator returns the initiator of the access. This method may be NULL, although this is deprecated. If the interface was implemented by a DML/C/C++ bank, then the method may only be accessed if the bank was compiled with Simics Base 6.0.129 or newer.

Execution Context
Cell Context for all methods, but must be called from a before_read_callback_t callback with a valid handle of type bank_access_t.

bank_after_write bank_before_write