timing_model interface is used to communicate
stall times for memory accesses. It is typically exported by cache
models. The operate() function is then called on every
memory access that misses in the STC, and the return value from the
call is the number of cycles to stall.
The snoop_memory interface has the exact same layout
as the timing_model interface, but its
operate() function is called after the memory access has
been performed. The return value from the operate()
function of a snoop_memory interface is ignored.
The operate function is invoked via the timing_model attribute of the memory-space where the STC miss happens.
See the Model Builder User's Guide for more information on how to use these interfaces.
SIM_INTERFACE(timing_model) {
cycles_t (*operate)(conf_object_t *NOTNULL mem_hier,
conf_object_t *NOTNULL space,
map_list_t *map_list,
generic_transaction_t *NOTNULL mem_op);
};
#define TIMING_MODEL_INTERFACE "timing_model"
SIM_INTERFACE(snoop_memory) {
cycles_t (*operate)(conf_object_t *NOTNULL mem_hier,
conf_object_t *NOTNULL space,
map_list_t *map_list,
generic_transaction_t *NOTNULL mem_op);
};
#define SNOOP_MEMORY_INTERFACE "snoop_memory"