4.10.3 Examples

To step an instance, a client calls step_setup() on it to set the remaining steps counter to N steps. This function does not execute any steps and also 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 4.11 Per-instance execution control. The following sequence progresses one specific core in a system that contains multiple cores, by N steps. This sequence uses 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 steps have been executed, for example because a breakpoint is hit or simulationTime_stop() is 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_00_en
Copyright © 2018 Arm Limited or its affiliates. All rights reserved.