Vector MICROSAR Support

Vector supports manufacturers and suppliers of the automotive industry and related industries with a professional platform of tools, software components and services for developing embedded systems. MICROSAR is Vector's embedded software for AUTOSAR ECUs. It consists of the runtime environment MICROSAR RTE and MICROSAR basic software modules (BSW). Vector and iSYSTEM collaborate in customer and research projects to support the interface between MICROSAR and winIDEA. Are you planning to use our tools together with Vector DaVinci Configurator to analyze the timing behavior of your MICROSAR application? Are you interested in thread states or Runnable timing information? Get in touch with us and we will help you set it all up!

Document Description
Automatic Timing Simulation and Execution Time Measurement with AUTOSARThis Vector-iSYSTEM Case Study describes how to automate and combine timing modeling with on-target execution time measurement to ensure the performance of real-time multi-core systems
Vector Microsar Profiling

This application note describes how to use the iSYSTEM winIDEA Analyzer for the timing analysis of the Vector MICROSAR operating system

Vector MICROSAR OS Debug and Tracing

Vector DaVinci Configurator creates an AUTOSAR ORTI file which tells the debugger how to get information about OS objects such as Tasks, ISRs, and Alarms. The information from the ORTI file can be used to display OS information while debugging, or to provide dynamic information via on-chip trace techniques. Additionally, an iSYSTEM proprietary XML file provides support for advanced trace use-cases such as thread state profiling or VFB tracing.

OS objects debugging based on AUTOASAR ORTI File

A snap shot of the status of all OS objects described in the ORTI file can be displayed via the OS Objects view. This view is accessible in winIDEA via the View, Operating Systems, Objects menu. For multi-core applications a multi-core ORTI file can be generated in Vector DaVinci Configurator by selection ORTI Debug Support ORTI_23.

Figure 1: Sample OS objects view for a Vector MICROSAR multi-core application.


Task/ISR Profiling based on AUTOSAR ORTI File

Standard ORTI Running Task and Running ISR2 tracing can be achieved by importing the ORTI file generated by Vector DaVinci Configurator into winIDEA. There is no need for code instrumentation as all required run-time information can be obtained by monitoring OS internal data objects by means of on-chip hardware trace mechanisms.

Figure 2: Example running Task and ISR2 Profiling for a Vector MICROSAR multi-core application.


Thread State Profiling utilizing the Vector Timing-Hooks

In certain use-cases, for example calculating the response time of a task, profiling the running task is not sufficient. For those use-cases a complete thread state trace of a MICROSAR application can be recorded.
A thread state trace contains information about preempt, resume, wait, and terminate events in addition to the running thread information. A thread state trace can be recorded by utilizing the Vector Timing Hooks. These are dedicated hooks which can be used to signal relevant thread state information to the profiler. iSYSTEM provides working code for different hardware architectures and compilers that can be added to the application. A dedicated iSYSTEM Profiler XML file is used to inform the profiler about the signaling. With this approach a complete thread state trace including the waiting (a task is waiting for an event or semaphore) and new (a task has been activated but not started yet) states can be recorded as shown on the following screenshot.

Figure 3: Thread state trace of a Vector MICROSAR Multi-Core Application. In addition to the currently running thread a thread state trace also contains the information about when a thread is activated, preempted/resumed, and terminated as indicated by the NEW, READY/WAITING, and TERMINATED states.


Vector MICROSAR RTE Virtual Function Bus (VFB) Tracing

A standard feature of the RTE is Virtual Functional Bus (VFB) trace. Individual Runnables can be selected by the user for VFB trace. The RTE generator automatically generates empty Trace Hook functions, Runnable Start and Return Hook. These hook functions can be filled by suitable trace instrumentation code to support Runnable profiling by means of hardware data trace. iSYSTEM can support customers in implementing those hooks in a convenient way.

Figure 4: OS thread and Runnable trace created by means of VFB Trace Hook Instrumentation.

Vector MICROSAR Timing-Analysis

Based on the profiling data recorded via hardware tracing the timing behavior of a Vector MICROSAR application can be analyzed. By default, the winIDEA Profiler provides a standard set of timing metrics. For advanced use-case iSYSTEM Inspectors can be used to cover arbitrary timing-scenarios like AUTOSAR event-chains. Compatibility with the leading timing-analysis tool vendors is guaranteed by supporting the standardized BTF trace format.

Profiler Standard Metrics

The winIDEA profiler comes with a set of standard timing-metrics to analyze the runtime performance of a Vector MICROSAR application. Those metrics are calculated for all profiler objects such as threads (tasks and ISRs), Runnables, and functions. The metrics include net execution time, gross execution time, inactivate time, number of occurrences, and period.

Figure 5: The winIDEA Profiler comes with a set of standard metrics such as occurrence count, net execution time, and period.


Timing-Extensions and Event-Chain Analysis using iSYSTEM Inspectors

The iSYSTEM profiler features so-called profiler Inspectors. These inspectors allow a user-defined post-analysis of the profiler timeline. They can be used for sophisticated, user-specific event-chain analysis of trace recordings, presented by the profiler. An inspector allows the creation of a new profiler object, derived from the analysis of already existing profiler objects. As shown in the following figure, such inspectors can, for instance, be used to derive standard AUTOSAR Timing Metrics (according to AUTOSAR_TR_TimingAnalysis).

Figure 6: AUTOSAR Timing Metrics (orange) calculated by means of iSYSTEM Inspectors based on the OS thread states (blue).


BTF Export for Timing-Analysis in Third-Partying Tools

Profiling OS Task States and Runnable allows the iSYSTEM Profiler to export the profiler timeline into the Best Trace Format (BTF). BTF is a standardized trace format used in the automotive industry. This allows a seamless import into various Timing Analysis tools (INCHRON chronSIM, Luxoft SymTA/S, Vector Informatik TA Inspector).