Skip to content

Specifying start time #2592

@edwardalee

Description

@edwardalee

A TSN network (and other industrial real-time networks) enable creating dedicated time slots for high criticality traffic. To make most effective use of such networks, it would be ideal if, when starting an LF program, you could specify the desired start time for the program. This could be an absolute time or, probably more usefully, a phase alignment specification. A phase alignment specification would say something like:

Please start the program a logical time t = nP + B for some arbitrary integer n, where P is the period of the network schedule and B is a base time, the time at which the periodic cycles begin.

Using this, assuming the LF program is using the same PTP clock as the network, its timers will be closely aligned to the network, and hence it could make very effective use of the network by launching messages into it when the appropriate time slot is open.

The default values for B and P should both be zero, which means to start as soon as possible.

However, for federated execution, there is currently an offset of an arbitrary one second in order to allow all federates to start nearly simultaneously. This offset could be an additional parameter, so that the actual start time is t = nP + B + O. The startup algorithm will be to find the least n such that nP + B > T, where T is the current physical time, then to add O and call that the start time.

Metadata

Metadata

Assignees

Labels

enhancementEnhancement of existing feature

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions