bank_before_read bank_instrumentation_subscribe
API Reference Manual  /  5 Model-to-Simulator Interfaces  / 

bank_before_write

Description
The bank_before_write interface is used to monitor and modify the state of write accesses from the before_write_callback_t callback.

SIM_INTERFACE(bank_before_write) {
        physical_address_t (*offset)(bank_access_t *handle);
        physical_address_t (*size)(bank_access_t *handle);
        uint64 (*value)(bank_access_t *handle);

        void (*suppress)(bank_access_t *handle);
        void (*set_offset)(bank_access_t *handle, physical_address_t offset);
        void (*set_value)(bank_access_t *handle, uint64 value);
        conf_object_t *(*initiator)(bank_access_t *handle);
};
#define BANK_BEFORE_WRITE_INTERFACE "bank_before_write"

offset retrieves the address of the access.

size gets the size of the access.

value provides the write value.

suppress may be used to prevent the write. Subsequent and corresponding after_write callbacks are invoked regardless.

set_offset can be used to redirect the write to an another address.

set_value can change the write value.

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_write_callback_t callback with a valid handle of type bank_access_t.

bank_before_read bank_instrumentation_subscribe