Developer Guide

  • 2021.2
  • 06/11/2021
  • Public
Contents

Samples

Sample applications are examples of working code that you can run and repurpose for your applications. Samples demonstrate how to use libraries, APIs, and tools.
After installing the Intel® TCC Tools package, you can find sample sources and binaries in the following directories:
Target system:
  • Sample sources:
    /usr/share/tcc_tools/samples
  • Sample binaries:
    /usr/bin
Host system:
  • Sample sources:
    ${TCC_ROOT}/samples/

Samples Documentation

You can find samples documentation in the following locations:
  • This guide:
    • Complete description of the sample
    • How to run the sample (steps for all examples and complete descriptions)
    • Output examples
    • Command-line options
  • API Reference:
    • Copy of the sample source
    • Functions in the sample source are linked to function descriptions in the API Reference
  • README file in each sample directory on the target system:
    • Short description of the sample
    • How to run the sample (steps for primary examples)
    • Output examples
    • Command-line options

Samples List

The following table lists all samples with links to documentation in this guide.
Sample
Description
Language
Demonstrates the basic flow of the cache allocation library. Offers command-line options and latency measurements to show the before-and-after benefit of the library. Copy and modify source code to add the APIs to your real-time application.
C
Sample input files for the data streams optimizer, including a synthetic real-time application and validation script. The application measures MMIO read-latency performance. Use the files to learn how the tool works and see improvements in latency reduction. Copy and modify for your real-time application.
C for real-time application, Python* programming language for validation script
Demonstrates how to use the measurement library to instrument one part of an application, such as the entire real-time cycle. Run the sample to see library capabilities, such as collecting execution time (min, max, average, and jitter) and deadline monitoring. Copy and modify source code to add the APIs to your real-time application.
C
Demonstrates how to use the measurement library to instrument multiple parts of an application, such as the entire cycle and various parts of it to pinpoint latency sources more precisely. Demonstrates a lighter weight application that does not print or analyze its own data. Intended to be run with the measurement analysis sample for data collection and visualization. Copy and modify source code to add the APIs to your real-time application.
C
Monitors measurements generated by the single measurement sample, which serves as a proxy real-time application. Demonstrates “stream monitoring”, where the monitoring sample runs at the same time as the single measurement sample and prints latency measurements and deadline violations as they occur. Intended for those who want to integrate such monitoring with other parts of their environment such as validation applications or scripts, where the C programming language is preferable as a common denominator that can be added everywhere. Copy and modify source code to tailor the monitoring sample to your real-time application.
C
Universal tool, written in Python* programming language, that collects and analyzes data from any application instrumented with the appropriate measurement library APIs. Performs two types of analysis: “post-process analysis” (after the application closes), such as creation of histograms, and “stream monitoring” (while the application is running). Source code is provided for possible adaptation.
Python* programming language
Demonstrates how to start working with TGPIO. Run the info sample to get a report of the TGPIO capabilities of the target system. Run the input and output samples to compare the enhanced precision of hardware-assisted time synchronization versus normal software-controlled GPIO. Copy and modify source code for your real-time application.
C
Demonstrates more advanced TGPIO input and output scenarios with a logic analyzer, such as input jitter, period jitter, and two-signal synchronization. Run the samples to compare the enhanced precision of hardware-assisted time synchronization versus normal software-controlled GPIO. Copy and modify source code to add hardware-assisted time synchronization to your real-time application.
C
Demonstrates how to use TGPIO to achieve a desired frequency. Run the sample with a logic analyzer to see how phase error is kept close to zero. Copy and modify source code for your real-time application.
C
Demonstrates the accuracy of hardware-assisted cross-timestamping between the system clock (CLOCK_REALTIME) and a Precision Time Protocol Hardware Clock (PHC). Copy and modify source code for your real-time application.
C
Demonstrates the benefit of combining the Cache Allocation Library with Time-Sensitive Networking (TSN) provided by Intel. Copy and modify source code for your real-time application.
C

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.