cpu_cached_instruction cpu_cached_stream
API Reference Manual  /  5 Model-to-Simulator Interfaces  / 

cpu_cached_instruction_once

Description
This interface extends the cpu_cached_instruction interface and allows callbacks to be installed that trigger only once, i.e., after the first time they have been invoked they are automatically removed. Otherwise they are identical to the corresponding methods in the cpu_cached_instruction interface.

SIM_INTERFACE(cpu_cached_instruction_once) {
        void (*register_instruction_before_once_cb)(
                conf_object_t *cpu,
                cached_instruction_handle_t *ci_handle,
                cpu_instruction_cb_t cb,
                lang_void *user_data,
                cpu_callback_free_user_data_cb_t free_cb);
        void (*register_instruction_after_once_cb)(
                conf_object_t *cpu,
                cached_instruction_handle_t *ci_handle,
                cpu_instruction_cb_t cb,
                lang_void *user_data,
                cpu_callback_free_user_data_cb_t free_cb);
};

#define CPU_CACHED_INSTRUCTION_ONCE_INTERFACE "cpu_cached_instruction_once"

Execution Context
Threaded Context for all methods, but must be called from a callback registered by the register_cached_instruction_cb method in the cpu_instrumentation_subscribe interface.

cpu_cached_instruction cpu_cached_stream