trick/trick_source/sim_services/RealtimeSync/docs/design.dox_in
Alex Lin 19025d77ad Standardize directory names
Reorganized.  Created a new top level include directory that will hold all of Trick's header files. Moved all of the Trick headers to this directory.  Created a libexec directory that holds all of the executables that users don't need to execute directly.  Changed all of the executables remaining in bin to start with "trick-".  In the sim_services directories changed all source files to find the Trick headers in their new location.  Since all of the include files are gone in sim_services, removed the src directories as well, moving all of the source files up a level.  Moved the makefiles, docs, man, and other architecture independent files into a top level share directory.  Renamed lib_${TRICK_HOST_CPU} to lib64 or lib depending on the platform we're currently on.

refs #63
2015-06-09 08:44:42 -05:00

101 lines
4.0 KiB
Plaintext

/**
@page LEVEL2 Real-Time Synchronization Design
A simulation is "real-time" when it can consistently and repetitively execute
its scheduled math models to completion within some predetermined interval
time frame for an indefinite period of time. This predetermined interval
time frame is referred to as the real-time frame. In this design the real-time
frame is set equal to the simulation software frame. Real-time is achieved
by periodically pausing simulation execution at the end of each real-time
frame. If simulation execution has not finished by the end of each real-time
frame then this is an overrun. The real-time synchronization capability has
several user settable options when a simulation overruns. If simulation
execution finishes before the real-time frame expires, this is an underrun. If
the simuation is underruning, the real-time synchronization capability allows
the simulation to "sleep" while waiting for the real-time frame to expire.
Real-time synchronization defaults off when initializing the simulation.
To enable real-time synchronization users or models may call enable() at any
time during the simulation. To exit real-time synchronization users or
models may call disable() at any time during the simulation. The actual
entering or exiting real-time happens at the end of the frame.
Listed below are the various modes of operation in a simulation and the
responsibilities of the real-time synchronization class in each.
@section LEVEL3 Pre-Initialization
During pre-initialization the user may specify the behavior of the real-time
synchronization class during overruns and underruns.
- Set real-time synchronization enabled or disabled.
- Set real-time sleep timer enabled or disabled.
- Set the maximum number of consecutive overruns allowed. (default 100,000,000)
- Set the maximum time allowed for single overruns (default 1e37 seconds)
- Set action taken when maximum overruns achieved to freeze/terminate or
terminate immediately (default terminate immediately)
@section LEVEL3 Initialization and Restart
The real-time initialization and restart jobs are designed to be the last
jobs run before exiting initialization or restart mode.
Initialize the underlying hardware.
@copydetails Trick::RealtimeSync::initialize(long long , long long )
Trick::RealtimeSync::initialize(long long , long long )
@section LEVEL3 Start Real-Time
@copydetails Trick::RealtimeSync::initialize(long long , long long )
Trick::RealtimeSync::initialize(long long , long long )
@section LEVEL3 End of Frame
At the end of the real-time frame (also the software frame) the
real-time synchronization class will determine if the simulation is
underruning or overrunning and take actions to keep simulation time
and real-time in sync.
@copydetails Trick::RealtimeSync::rt_monitor( long long )
Trick::RealtimeSync::rt_monitor( long long )
@section LEVEL3 Freeze Mode
@section LEVEL4 Freeze Initialization
During freeze initialization the real-time synchronization class resets the real-time
frame to the freeze frame and restarts the real-time clock and timer.
@copydetails Trick::RealtimeSync::freeze_init( long long )
Trick::RealtimeSync::freeze_init( long long )
@section LEVEL4 Freeze Loop
During freeze loop processing the real-time synchronization pauses the freeze loop.
The pause is released when real-time equals the freeze loop period. No checks are
done for overrunning or underruning a freeze period.
@copydetails Trick::RealtimeSync::freeze_pause( long long )
Trick::RealtimeSync::freeze_pause( long long )
@section LEVEL4 UnFreeze
During unfreeze the real-time synchronization class resets the real-time
frame to the software frame and restarts the real-time clock and timer.
@copydetails Trick::RealtimeSync::unfreeze( long long , long long )
Trick::RealtimeSync::unfreeze( long long , long long )
@section LEVEL3 Shutdown Mode
During shutdow, the real-time synchronization class stops the clock and sleep
timer hardware.
@copydetails Trick::RealtimeSync::shutdown()
Trick::RealtimeSync::shutdown()
*/