Introducing the Activity Sequencer: Boosting Data Flow Execution in ADAS and Autonomous Driving Applications

The Activity Sequencer, our latest feature, is now available in our MotionWise Schedule and MotionWise Safety Middleware software products. Engineered to deliver flexibility, safety, and optimization to data flow-driven execution, the Activity Sequencer is a game-changer for ADAS/AD applications.

Activity Sequencer Blog Article

Why is Data Flow Driven Execution needed?

Our Activity Sequencer stands as the solution for orchestrating execution based on the data flow, a critical component for ADAS/AD applications. These applications are characterized by:

  • Distributed Functions: ADAS/AD functionalities are spread across various applications.
  • Intricate Execution Ties: There are sophisticated execution dependencies interlinking these functions.
  • Data Flow Driven Activation: The initiation of these functions is governed by data flow through the system.
  • Optimized Response Times: The system is designed to respond within a fraction of a second, typically in the range of hundreds of milliseconds.
  • Real-time properties at larger scale: Worst-case execution times have large variability; sporadic violations on individual task level are acceptable because response time of the holistic functionality is critical.

What is a Data Flow Driven Execution?

Data flow driven execution refers to a system that facilitates the processing of elements within a Directed Acyclic Graph (DAG). Within a DAG, each point, or node, signifies a unit of execution, and the arrows connecting the nodes indicate dependencies related to data and the order of execution.

In the realm of ADAS/AD systems, DAGs serve as an essential framework for algorithm representation. They map out various processes and their interconnections in an orderly and predictable fashion. Key components of ADAS/AD systems, such as the perception or sensor fusion layers, are effectively modeled as DAGs, delineating the flow and interplay of tasks and information. An example of DAG is depicted in the image below:

DAG_Activity Sequencer

Activity Sequencer in all Development Stages

The Activity Sequencer is engineered to guarantee that the components of the data flow are activated in their proper order, while significantly reducing the latency from start to finish. This framework was crafted with input from experts in perception and sensor fusion, with a focus on the developer’s needs. It allows a natural transition from the beginning of development to deployment in the SOP phase, as it enables incremental, fast refinements as well as the required predictability and stability.

Characterizing timing behavior of ADAS/AD algorithms can be challenging at the initial stages, even though it is essential to meet timing requirements in safety-critical systems. To overcome this challenge, the Activity Sequencer is designed to evolve alongside the application development, starting with a graph that is flexible in terms of timing, fostering an environment conducive to smooth development and debugging. As the development progresses, developers can impose stricter timing constraints on each activity, gradually transitioning to a fully deterministic data flow graph that adheres to time constraints.

The development journey with the Activity Sequencer unfolds as follows:

  • Early Development: Activities may operate without any timeouts, providing developers the freedom to add or remove components and modify communication links as needed.
  • Development: This phase introduces timeouts to activities, allowing for a partial solidification of the configuration and execution sequence.
  • Close to Series development: In the final stages of development, all activities are assigned timeouts, paving the way for an optimized runtime that ensures consistent end-to-end performance.

Development journey_Activity Sequencer

Efficiency Boost

As CPU capabilities continue to grow, the most powerful System on Chips (SoCs) in the automotive sector are still being pushed to their limits. The pursuit of optimized runtime performance has never been more critical. End-to-end latencies of ADAS/AD algorithms become an essential problem due to the growing amount of software involved in those vehicle functions. The Activity Sequencer plays a pivotal role in enhancing runtime performance through several key features:

  • Streamlined Execution: The Activity Sequencer eradicates unnecessary context switches, refining the execution process for greater efficiency.
  • Direct Activity Communication: Leveraging a zero-copy, shared memory approach, it facilitates efficient communication between activities without data copying.
  • Maximized CPU Performance: The Activity Sequencer’s sophisticated dispatching algorithm allows for performance levels that would typically need four cores to be achieved, with just two cores. 
    In the example below we execute the same graph on 1, 2, 3 and 4 CPU cores. In each case we execute with and without optimized dispatching as well we measure the execution time of the entire graph from the first activity until the last.

As the following diagrams show, the optimal execution time can already be achieved for the use case with two cores, meaning the response time for this DAG is achieved with less hardware resources using the Activity Sequencer. 

Activity Sequencer_1 core

Activity Sequencer (optimized) vs other scheduling policies = 0,06% 

2 cores

Activity Sequencer (optimized) vs other scheduling policies = 18,7 %

3 cores

Activity Sequencer (optimized) vs other scheduling policies = 13,07%

4 cores

Activity Sequencer (optimized) vs other scheduling policies = 0,08%

Benefits for everyone involved in an ADAS/AD Design

In the realm of ADAS/AD programs, different roles have different requirements and needs, which often appear contradictory at first glance. Application developers prioritize flexibility, while integrators seek stability and predictability. The MotionWise platform harmonizes these divergent needs by embedding the Activity Sequencer within the global schedule that bases on time-triggered, periodic repetition. This scheduler upholds system integrity and ensures that system-level properties remain consistent, irrespective of application-level modifications.

  • Streamlined Integration: The Activity Sequencer empowers integrators to focus on the broad system design without being affected by alterations in data flow diagrams.
  • Effortless Application Development: Developers are liberated from the complexity of middleware thanks to the Activity Sequencer’s ability to manage these details.
  • Efficient SW updates: With Activity Sequencer, new versions of applications can be released easily without an additional effort for adapting, testing and releasing the rest of the software. The relevant part of the dispatcher is in the scope of the user process, with data dependencies defined by the application developer.

Conclusion

The Activity Sequencer streamlines integration of ADAS/AD applications, ensuring optimized and safe execution. Developers can now concentrate on building robust applications while relying on this powerful feature. If you want to know more about the Activity Sequencer, we invite you to watch the presentation from ROSCon 2023.

ROSCon23