VT_check_async_events — check for asynchronous events
#include <simics/processor-api.h> // in C
import "simics/processor-api.dml"; // in DML
bool
VT_check_async_events();
import simics
simics.VT_check_async_events(...)
Check if any async events are pending and if so, make the current executing object exit in order for them to be handled. Return nonzero if there are pending events.
The Simics platform will check for asynchronous events between invocations of the run method in the execute. If significant time passes between such invocations, which will typically be the case unless there are multiple simulated CPUs that are switched between, then the implementor of execute needs to either call this method or exit pre-maturely from run to allow asynchronous events to be handled. If neither is performed, then interactive performance will suffer as user input would be waiting significant time before being processed.
If only the async event state is requested, the faster VT_async_events_pending should be used instead.
Cell Context
VT_clock_frequency_about_to_change — inform before clock frequency change
#include <simics/processor-api.h> // in C
import "simics/processor-api.dml"; // in DML
void
VT_clock_frequency_about_to_change(conf_object_t *obj);
import simics
simics.VT_clock_frequency_about_to_change(...)
To be called by a clock prior to a clock frequency change, with events and cycles reflecting the frequency before the change.
Cell Context
VT_clock_frequency_change — inform after clock frequency change
#include <simics/processor-api.h> // in C
import "simics/processor-api.dml"; // in DML
void
VT_clock_frequency_change(conf_object_t *obj, uint64 cycles_per_second);
import simics
simics.VT_clock_frequency_change(...)
To be called by a clock when the clock frequency has changed, with events and cycles reflecting the frequency after the change.
Cell Context
VT_new_code_block — inform platform of new code block
#include <simics/processor-api.h> // in C
import "simics/processor-api.dml"; // in DML
void
VT_new_code_block(void *start, size_t len);
This function informs the Simics platform that there is a len bytes block at start that can be executed from. The call should be made before the passed code area is executed from. This information is used by Simics to communicate with systems like Pin or Valgrind that do not automatically detect run-time generated code. If modifications are done to a block, then a new call to this function is needed to inform the platform of that.
Cell Context
VT_set_object_clock — set clock association for object
#include <simics/device-api.h> // in C
// always available in DML
void
VT_set_object_clock(conf_object_t *NOTNULL obj, conf_object_t *clock);
import simics
simics.VT_set_object_clock(...)
The simulation infrastructure keeps track of clock associations for every object. For most objects, this is initialized through the queue attribute.
An object that is itself a clock needs to call this function to initialize the clock coupling to itself. The call to initialize the coupling should be made from the init method registered for the class in its class_info_t (or init_object if registered using class_data_t).
Global Context
VT_stop_event_processing — stop event processing
#include <simics/processor-api.h> // in C
import "simics/processor-api.dml"; // in DML
void
VT_stop_event_processing(conf_object_t *clock);
import simics
simics.VT_stop_event_processing(...)
This method is to be called by a clock when it has received a stop request through the execute interface and the clock is about to return from the run method in the execute interface.
In the future, the simulation framework may keep track of this thus relieving the clock from the duty of having to call this method.
Cell Context