5.13.4 Stepping functions

Describes the following functions:

step_getRemainingSteps()

Queries the current remaining steps counter value of an instance. A value of zero means that the instance is not stepping, but is running freely.

Arguments

instId

Type: NumberU64

Opaque number uniquely identifying the target instance.

unit

Type: String

Unit of the return value. See unit argument of step_setup().

Return value

NumberU64

Number of remaining steps to execute before stopping the simulation time. If zero, this instance is currently not stepping in this unit.

Errors

  • E_unknown_instance_id.
  • E_unit_not_supported.

step_getStepCounterValue()

Queries the current step counter value of an instance in the specified units.

This can be used to query and monitor the current instruction count or cycle count of an instance. The step counter is a 64-bit unsigned value that is always increasing and silently wrapping around, so it must always be assumed to have an unknown offset. It can still be used to measure relative step counts.

Arguments

instId

Type: NumberU64

Opaque number uniquely identifying the target instance.

unit

Type: String

Unit of the return value. See unit argument of step_setup().

Return value

NumberU64

Number of total elapsed steps in this instance so far. This wraps around and so always has an unknown offset. It is still useful to get relative readings.

Errors

  • E_unknown_instance_id.
  • E_unit_not_supported.

step_setup()

Sets the remaining steps counter to N steps for a specified instance. Steps are measured in the specified units.

Arguments

instId

Type: NumberU64

Opaque number uniquely identifying the target instance.

steps

Type: NumberU64

Number of steps to perform before stopping the simulation time. This overwrites the previous remaining steps counter of the instance. A value of zero cancels a currently running stepping operation.

Note:

To run the simulation time, simulationTime_run() must be called after calling this function.
unit

Type: String

Unit for steps. Must be one of:

instruction
A step is one executed instruction. Typically, all core models support this unit.
cycle
A step is one cycle. Not all core models support this unit.

Return value

Function has no return value.

Errors

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