5.13.3 Examples

To step an instance, a client first calls step_setup() on it to set the remaining steps counter to N steps. This function does not execute any steps and does not start or resume the progress of simulation time.

To execute N steps of a specific instance, the progress of simulation time needs to be resumed explicitly, for example with the following function calls:

step_setup(instId=<instId>, steps=<N>, unit="instruction"); 
simulationTime_run();

Stepping only one core instance, or a subset of core instances is achieved by combining stepping with per-instance execution control, see 5.14 Per-instance execution control API. The following example progresses one specific core in a system that contains multiple cores, by N steps, using per-instance execution control:

step_setup(instId=<instId>, steps=<N>, unit="instruction");
perInstanceExecution_setStateAll(instanceSet=[<instId>], enable = True);
simulationTime_run();

Note:

The order of step_setup() and perInstanceExecution_setStateAll() does not matter, because they only set state.

If the simulation stops for any reason before the specified number of steps have been executed, for example because a breakpoint is hit or simulationTime_stop() was called, the remaining steps count is cleared and resuming the simulation time does not resume the stepping operation, instead it freely runs the simulation.

Non-ConfidentialPDF file icon PDF version101196_0100_03_en
Copyright © 2018, 2019 Arm Limited or its affiliates. All rights reserved.