Simulator Translation Caches Time and Events
API Reference Manual  /  Simulator API  /  Simulator API Functions  / 

Stalling

SIM_stall_count

Name

SIM_stall_count — get number of cycles a processor has been stalled

Synopsis

C and DML

#include <simics/device-api.h> // in C
// always available in DML

cycles_t
SIM_stall_count(conf_object_t *NOTNULL obj);

Python

import simics

simics.SIM_stall_count(...)

Description

SIM_stall_count returns the total number of cycles the processor associated to obj has been stalled.

Return Value

Returns the total number of cycles the processor associated with obj has been stalled.

Execution Context

Cell Context

SIM_stall_cycle, SIM_stall

Name

SIM_stall_cycle, SIM_stall — stall execution a specified number of cycles

Synopsis

C and DML

#include <simics/device-api.h> // in C
// always available in DML

void
SIM_stall_cycle(conf_object_t *NOTNULL obj, cycles_t cycles);

void
SIM_stall(conf_object_t *NOTNULL obj, double seconds);

Python

import simics

simics.SIM_stall_cycle(...)
simics.SIM_stall(...)

Description

SIM_stall_cycle and SIM_stall set the stall duration of the processor obj. The stall duration is given in clock cycles or seconds and is how long obj will stall before resuming its normal activity. If obj was already stalling, the time remaining is changed. A zero stall duration is a request to cease stalling immediately.

The specified duration is interpreted as relative the local time of obj.

obj must implement the stall and cycle interfaces.

Execution Context

Cell Context

Exceptions

SimExc_General Thrown if cycles or seconds is negative.

See Also

SIM_stalled_until, SIM_stall_count

SIM_stalled_until

Name

SIM_stalled_until — query how many cycles that remains of stall

Synopsis

C and DML

#include <simics/device-api.h> // in C
// always available in DML

cycles_t
SIM_stalled_until(conf_object_t *NOTNULL obj);

Python

import simics

simics.SIM_stalled_until(...)

Description

SIM_stalled_until returns how many more cycles the processor will stall before the associated processor starts to execute instructions again.

Execution Context

Cell Context

Simulator Translation Caches Time and Events