Time Requirements#

Time Synchronization#

Vehicle Time synchronization
status: valid
security: NO
safety: QM
reqtype: Functional
valid_from: v1.0.0
version: 1
satisfied by: feat__time

The score::time feature shall synchronize the local clock with an external Grand Master using the gPTP protocol (IEEE 802.1AS).

Vehicle Time synchronization precision
status: valid
security: NO
safety: QM
reqtype: Functional
valid_from: v1.0.0
version: 1
satisfied by: feat__time

The score::time feature shall synchronize the local time base with the Grand Master within a defined precision, based on the system setup (see Vehicle Time synchronization (feat_req__time__vehicle_time_sync)).

Note:

  • the particular target precision depends on the system setup

  • for AVB nodes the maximum difference in the synchronized time between two AVB ports/ECUs while

    both are in state SYNC, and could be 1 usec

  • for non-AVB node the precision is relaxed, and could be 200-500 usec

Vehicle Time base API
status: valid
security: NO
safety: ASIL_B
reqtype: Functional
valid_from: v1.0.0
version: 1

The score::time feature shall provide an API to access the synchronized Vehicle Time.

Note: the ASIL-B level applies to the interface/module; the delivered value integrity is reflected by the time point qualifier (see Vehicle Time base time poin... (feat_req__time__vehicle_time_time_pt_qual)).

Vehicle Time base accuracy qualifier
status: valid
security: NO
safety: ASIL_B
reqtype: Functional
valid_from: v1.0.0
version: 1

The score::time feature shall provide an API to read the accuracy qualifier of the local synchronized time base.

Note: qualifier shall reflect the accuracy of the local time base, e.g.

  • if it is synchronized to an external time source or not,

  • are there any instabilities, like time jumps to the past or to the future

  • does the time increase in a monotonic manner.

Vehicle Time base time point qualifier
status: valid
security: NO
safety: ASIL_B
reqtype: Functional
valid_from: v1.0.0
version: 1

The score::time feature shall provide an API to read the time point qualifier of the local synchronized time base.

Note: the qualifier tells the consumer whether the time point may currently be treated as ASIL-B data or only as QM data. This verdict comes from the integrity check established for the vehicle time (see Vehicle time value integrity (aou_req__feature_time__veh_time_integrity)); if no such check exists, the qualifier is QM. If that integrity check is integrated into score::time as an extension, the extension delivers its verdict through this qualifier (see Vehicle time integrity resu... (aou_req__feature_time__veh_time_qual_reflect)).

Vehicle Time control flow
status: valid
security: NO
safety: ASIL_B
reqtype: Non-Functional
valid_from: v1.0.0
version: 1

The score::time feature shall provide an access its data via specified APIs in a fast and very efficient manner, avoiding, if possible, kernel calls, resource manager involvement and so on.

For APIs see:

Use case: frequent access to the current synchronized time and its metadata by multiple clients within one ECU.

Vehicle Time synchronization logging
status: valid
security: NO
safety: QM
reqtype: Functional
valid_from: v1.0.0
version: 1

The score::time feature shall provide a mechanism to log the internal state of the synchronization process, to be able to debug and diagnose the synchronization process.

Use case: Debugging and diagnostics of the time synchronization process.

HW clock synchronization to Vehicle Time
status: valid
security: NO
safety: QM
reqtype: Functional
valid_from: v1.0.0
version: 1
satisfied by: feat__time

The score::time feature shall synchronize the local HW clock (e.g. NIC PHC) to Vehicle Time, enabling hardware timestamping of ingress and egress network frames.

Note: the ownership of the HW clock discipline (score::time vs. the network/gPTP stack) is a system design choice.

Time Synchronization to absolute external sources#

score::time external synchronization
status: valid
security: YES
safety: QM
reqtype: Functional
valid_from: v1.0.0
version: 1
satisfied by: feat__time

The score::time feature shall support synchronization with external time sources, such as UTC time from GPS.

Absolute Time base API
status: valid
security: YES
safety: ASIL_B
reqtype: Functional
valid_from: v1.0.0
version: 1

The score::time feature shall provide an API to read the Absolute Time base, synchronized to external time sources.

Note: the ASIL-B level applies to the interface/module; the delivered absolute time value integrity remains QM.

Absolute Time base accuracy qualifier
status: valid
security: YES
safety: QM
reqtype: Functional
valid_from: v1.0.0
version: 1

The score::time feature shall provide an API to read accuracy qualifier of the Absolute Time base, synchronized to external time sources.

Note: the inaccuracy could be indicated in the following manner

  • Inaccuracy higher than 24h

  • Inaccuracy less than 24h

  • Inaccuracy less than 1h

  • Inaccuracy less than 15min

  • Inaccuracy less than 60s

  • Inaccuracy less than 10s

  • Inaccuracy less than 1s

  • Inaccuracy less than 500ms

  • Inaccuracy less than 100ms

  • Inaccuracy less than 50ms

  • Inaccuracy less than 10ms

  • Inaccuracy not available

Absolute Time base security qualifier
status: valid
security: YES
safety: QM
reqtype: Functional
valid_from: v1.0.0
version: 1

The score::time feature shall provide an API to read security qualifier of the Absolute Time base, synchronized to external time sources.

Note: the security level might be indicated in the following steps

  • No time available

  • Time not trustworthy

  • Time trustworthy

  • Time very trustworthy

Absolute Time synchronization status log
status: valid
security: NO
safety: QM
reqtype: Functional
valid_from: v1.0.0
version: 1

The score::time feature shall provide a mechanism to log the internal state of the Absolute Time synchronization process, to be able to debug and diagnose the synchronization process.

Local Clock#

High resolution clock API
status: valid
security: NO
safety: ASIL_B
reqtype: Functional
valid_from: v1.0.0
version: 1

The score::time feature shall provide an API to read the High-Resolution Steady Clock in nanoseconds resolution.

Note: to which clock the high resolution clock is mapped, depends on the system design.

Use case: such clocks might be used for time-critical applications, such as audio/video streaming, event logging, and diagnostics.

Monotonic clock API
status: valid
security: NO
safety: ASIL_B
reqtype: Functional
valid_from: v1.0.0
version: 1

The score::time feature shall provide an API to read monotonic, not adjustable clock value.

Testability#

score::time mocking APIs implementation
status: valid
security: NO
safety: QM
reqtype: Functional
valid_from: v1.0.0
version: 1

The score::time feature shall provide support for mocking its public interfaces, enabling unit, component and integration testing of applications.