ram_tracer_connection recorder
Simics Reference Manual  /  5 Classes  / 

realtime

Description

In some cases simulated time may run faster than real time; this can happen if the OS is in a tight idle loop or an instruction halts execution waiting for an interrupt, or if the host machine is simply sufficiently fast. This can cause problems for programs that interact with the real world (for example the user), since time-outs may expire really fast. A realtime object will, when enabled, periodically check the simulation speed and wait for a while if it is too high.

Interfaces Implemented

conf_object, log_object

Notifiers

cell-change
Notifier that is triggered after the object's cell was changed.
object-delete
Notifier that is triggered just before Simics object is deleted.
queue-change
Notifier that is triggered after the object's clock was changed. New clock can be obtained with the SIM_object_clock function.

Commands for this class

Attributes

clock_object
Required attribute; read/write access; type: o
The object used to measure simulated time. This can be any processor in the system.
speed
Pseudo attribute; read/write access; type: f
How fast the simulated time runs compared to real time. The default is 1, which means that simulated time runs at the same speed as real time. Note that Simics may be unable to run as fast as requested if the host is not fast enough.
check_interval
Pseudo attribute; read/write access; type: i
How frequently elapsed simulated time should be compared to elapsed real time. Specified in milliseconds of simulated time; the default is 100. The actual time between comparisons may be less than this. It will never be less than set-time-quantum, so check that setting if you need very fine-grained realtime behavior.
enabled
Pseudo attribute; read/write access; type: b
Whether the real-time behavior is enabled or not. Defaults to false.
drift_compensate
Pseudo attribute; read/write access; type: f
The speed attribute says how fast the simulation should run, but the actual speed will always deviate a little from that value even if the host is fast enough. To keep these errors from accumulating, the simulation speed has to be adjusted; drift_compensate regulates how much it may be adjusted. If set to (for example) 0.25, simulation speed may be increased or decreased by up to 25% if necessary to make up for any accumulated drift with respect to real time. If set to zero (the default), the simulation speed may not be changed at all from its set value.
rtc_freq
Pseudo attribute; read-only access; type: i
Frequency of the realtime clock, in Hz.
max_oversleep
Pseudo attribute; read/write access; type: i
The sleep system call will usually sleep somewhat longer than requested. To compensate for this, Simics will ask for a shorter sleep, and busy-wait the rest of the time. This parameter determines how much shorter, in microseconds. (This will only help against delays imposed by the sleep implementation, not against delays caused by other processes on the system.)

Provided By

realtime
ram_tracer_connection recorder