Timing with ADTF-FEP

FEP Timing in a nutshell

With FEP every participant has a clock which determines the current simulation time of the participant. Initially the simulation times of different participants are completely independent. That's why FEP offers some mechanisms for synchronizing the different clocks of different participants to the time of one participant, which is the so called timing master. In general there are two different timing modes.

Discrete With discrete timing the simulation time of the slaves will only progress if the master sends events to update the time. The master will wait until all slaves have processed the event. This mode is used if deterministic behavior is required. The simulation can run faster or slower than wall clock time.

Continuous With continuous timing each participant will run an independent clock. These clocks will cyclically be synchronized to the time of the timing master (e.g. using the Cristian's algorithm ). The mode is used within realtime environments like vehicle prototypes or other distributed systems.

Another component called the FEP Scheduler will use the local time of a participant to trigger the execution unit of a participant, the so called FEP Job.

How FEP Timing integrates with ADTF

To integrate ADTF with FEP timing the ADTF component FEP Timing Service is used. The service will connect ADTF and FEP timing by providing and registering clocks at ADTF and FEP, which are responsible for the synchronization.

To execute parts of an ADTF Graph as a FEP Job the FEP Job Runner is used. The job will be triggered based on the synchronized time provided by the FEP Participant.

Running a simple example using time synchronization

The following sequence demonstrates how to operate the two example ADTF sessions fep_sink and fep_source in a FEP System using discrete synchronization with the fep_sink session providing the simulation time for the whole system. The FEP System will be launched, timing will be configured and the system will be started and stopped. During simulation the timing master fep_sink will constantly send time update events to the slave fep_source.

  1. Start the timing master 'fep_sink'
  2. Start the timing slave 'fep_source'
  3. Configure and control the FEP System 'default_adtf_system'
  4. Pause and get stream time of participants

Similarly the two sessions fep_sink.adtfsession and fep_source.adtfsession can be operated with time synchronization. The only difference is that the command fep_configuretimingcontinuous or fep_configuretimingdiscrete needs to be used to configure the FEP System.

How to configure different FEP Systems

Depending on the nature of the timing master and the timing synchronization you want to use, the following adtf_control commands need to be used to configure the timing for a FEP System.

Scenario Command Time source
ADTF session is timing master (containing Playback Service) fep_configuretimingplayer <master_participant_name> providing ADTF Clock as timing for FEP (see ADTF Participant using Playback Service is timing master)
ADTF session is discrete timing master (without Playback Service) fep_configuretimingdiscrete <master_participant_name> consuming FEP internal clock mechanism
ADTF session is continuous timing master (without Playback Service) fep_configuretimingcontinuous <master_participant_name> consuming FEP internal clock mechanism
Non ADTF session is discrete timing master fep_configuretimingdiscrete <master_participant_name> consuming FEP internal clock mechanism
Non ADTF session is continuous timing master fep_configuretimingcontinuous <master_participant_name> --master_clock local_system_realtime consuming FEP internal clock mechanism

ADTF Participant using Playback Service is timing master

An ADTF session can act as FEP timing master and provide time updates to configured FEP timing clients. To configure the FEP System accordingly either use the ADTF Control tool's fep_configuretimingplayer function or set the ADTF Participant's main clock property to adtf_stream_clock_master and the timing client main clock properties to slave_master_on_demand_discrete using e.g. FEP tooling. The FEP custom clock adtf_stream_clock_master will participate in the ADTF Time Barrier scheduling mechanism and distribute time updates to FEP timine clients according to it's time update period (configured via the FEP Timing Service's property 'synchronization_interval_us'). The Playback Service may, among other ADTF components, define the boundaries of the simulation clock. ADTFDAT File Player, Timer Runner and other ADTF components behave as expected. Period steps in between samples are interpolated. The default period is 100 ms.

Where to go next?

More details how to configure a FEP System.