40 Instrumentation 42 Inspecting and Controlling the Virtual System
Model Builder User's Guide  /  VII Extending Simics  / 

41 Probes API

Simics probes framework defines a set of interfaces that could be used to implement probes. All interfaces are described in the the simics/simulator-iface/probe-interface.h header file, and also documented as part of the API reference manual. For simple probes, it is sufficient to just implement the probe, probe_index or probe_array interfaces, while probe_subscribe is an optional interface.

Simics' probes framework will automatically create probes when detecting objects implementing certain interfaces. This mechanism does not yet have a programming interface though.

To programmatically access and read the probes, there are two choices. Either call the probe interfaces implemented directly in the object, or make use of the probes Python package API.

Simics' Python probe package offers:

The Python probe API is documented in the API reference manual or can be accessed via Python in Simics:

simics> @import probes
simics> @help(probes)

Remember that probes are expected to be read out in global-context, that is, if you read out probes while Simics is executing, you must ensure that any executions threads stands still, for example with the SIM_run_alone() function.

40 Instrumentation 42 Inspecting and Controlling the Virtual System