7.7.1 Scheduler API - about

This API makes modeling components and systems accessible in different environments, with or without a built-in scheduler. Examples are a SystemC environment or a standalone simulator.

The Fast Models Scheduler API is a C++ interface consisting of a set of abstract base classes. The header file that defines these classes is $PVLIB_HOME/include/fmruntime/sg/SGSchedulerInterfaceForComponents.h. This header file depends on other header files under $PVLIB_HOME/include.

All Scheduler API constructs are in the namespace sg.

The interface decouples the modeling components from the scheduler implementation. The parts of the Scheduler API that the modeling components use are for the scheduler or scheduler adapter to implement. The parts that the scheduler or scheduler adapter use are for the modeling components to implement.

class SchedulerInterfaceForComponents
The scheduler (or an adapter to the scheduler) must implement an instance of this interface class for Fast Models components to work. Fast Models components use this interface to talk to the scheduler, for example, to create threads and timers. This class is the main part of the interface.
class SchedulerThread
An abstract Fast Models thread class, which createThread() creates instances of. For example, CT core models use this class. The scheduler implements it. Threads have co-routine semantics.
class SchedulerRunnable
The counterpart of the SchedulerThread class. The modeling components, which contain the thread functionality, implement it.
class ThreadSignal
A class of event that threads can wait on. It has wait() and notify() but no timing functions. The scheduler implements it.
class Timer
An abstract interface for one-shot or continuous timed events, which createTimer() creates instances of. The scheduler implements it.
class TimerCallback
The counterpart of the Timer class. The modeling components, which contain the functionality for the timer callback, implement it. Arm deprecates this class.
class SchedulerCallback
A callback function class. The modeling components, which use addCallback() (asynchronous callbacks), implement it.
class FrequencySource
An abstract interface class that provides a frequency in Hz. The modeling components implement it. The scheduler uses it to determine the time intervals for timed events. Arm deprecates this class.
class FrequencyObserver
An abstract interface class for observing a FrequencySource and changes to the frequency value. The scheduler implements it for objects that have access to a FrequencySource (Timer and SchedulerThread). Arm deprecates this class.
class SchedulerObject
The base class for all scheduler interface objects, which provides getName().
Non-ConfidentialPDF file icon PDF version100965_1180_00_en
Copyright © 2014–2019 Arm Limited or its affiliates. All rights reserved.