Inquiries about the different time frame configurations available

40 views
Skip to first unread message

Ugo Levi

unread,
May 21, 2021, 6:06:33 AM5/21/21
to F´ Community Group

Hello,
I am currently trying to understand the notion of time framing on F Prime.

1. I understood how a cycle was defined and that some objects were called only every n cycles as defined in the Topology.cpp file with the variable rgDivs.

"static NATIVE_INT_TYPE rgDivs[Svc::RateGroupDriverImpl::DIVIDER_SIZE] = {1,2,4};"

But I did not find the information to understand which index of the rgDivs array affects which type of object.

2. I also tried to figure out where the time to send the updated Telemetry Database (TlmDb) to the GDS is set but I could not find it.

3. Is it possible to specify a certain amount of execution cycle for component A and another amount for component B? This in order to get closer to a time-division architecture and have a deterministic/sequential behavior of the components.

-Ugo

Ugo Levi

unread,
May 25, 2021, 6:36:17 AM5/25/21
to Michael Starch, F´ Community Group
Hello,

First of all, thank you very much for answering my questions.

After reading again my second question I realized that I had not been
very clear.

I was not talking about the timestamp associated with the telemetry
but more about the timing of sending the telemetry.

The telemetry is sent to the GDS every N seconds but can this interval
be modified?

I received your answer by email but it is not displayed on the google
group F Prime community, is this normal?

-Ugo

Timothy Canham

unread,
May 25, 2021, 10:43:09 AM5/25/21
to F´ Community Group

Ugo:

How often the telemetry is sent is dependent on how often the "Run" input port is called. That port is typically connected to an ActiveRateGroup component instance.

To answer your first question (it's related), the RateGroupDriver takes as input (CycleIn) some sort of periodic timing signal. In the Ref example, the RateGroupDriver is driven by the notional driver "blockDrv", which has a 1Hz input (See Ref/Top/Topology.cpp). Projects can use their own signal like a hardware interrupt to supply a timing signal. The table you mention for RateGroupDriver takes that input and divides down that primary input signal by the factor in entry in the table, and calls the corresponding output port at the new rate. For the Ref example, the first port would be called at 1Hz/1 = 1Hz, the second at 1Hz/2 = 0.5Hz, and the third at 1Hz/4 = 0.25Hz. That gives us the 3 rate groups in the example. Looking at Ref/Top/RefTopologyAppAi.xml where all the connections are specified, the telemetry component is connected to the 1Hz rate group:


This is how telemetry ends up being sent once per second. If a higher rate is desired, then it can be connected to a faster rate group.

Michael Starch

unread,
May 27, 2021, 11:32:37 AM5/27/21
to Ugo Levi, F´ Community Group
Hi,

#1:

The rate group driver has N output ports attached to ActiveRateGroups.  These active rate groups drive their each child.   How often these rate groups drive their children is based on the divisor.  The first divisor divides the clock for the first active rate group, the second for the second, and so on.  Typically the lower divisors are "first" as they run more quickly and are usually higher priority.

#2:
Time is stamped on telemetry items when the telemetry output port is called from the originating component.  These components use the "getTime" port to acquire time from a time component and use that to stamp telemetry before it leaves the original component. For linux we have the LinuxTime component to supply time.  For other systems, projects typically need to implement their own time to pull time data from hardware, or another clock source.

#3:
This kind of time partitioning is usually handled at the operating system layer and fprime doesn't have direct access to these features.  We use the above rate groups to handle deadlines and detect slips such that timing can be adjusted by the system engineer if it isn't set up properly.

Hope these answers offer some guidance.

-Michael



--
You received this message because you are subscribed to the Google Groups "F´ Community Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fprime-communi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fprime-community/4280fe4c-4562-410a-8234-645fc4c1433en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages