Novos FB

Novos FB: Foreground/Background Operating Environment

The “Super Loop” is a classic model for embedded systems and is still quite commonly used in spite of its reputation for inefficiencies in performance and responsiveness and, sometimes, maintenance difficulties over time. We believe the Super Loop is much maligned and have developed the Novos FB Operating Environment to retain the simplicity of the Super Loop yet improve its utility in RAM–constrained processors.

With it, you get an efficient set of highly flexible services to support orderly Foreground management of interrupt-driven devices and response to high priority events plus Background handling of external or internal events and data movement. And it only requires one stack, conserving precious RAM.

fb-sample-thumb2-01fb-srg-sample-thumbs2-01samples-invite2-01

Why use the Foreground/Background model?

The classic Super Loop model is not generally used for meeting real-time deadlines. Its different functions execute in ways that are usually variable in their execution times, which leads to inconsistent timing from one loop to the next. With the Novos FB Operating Environment, you have many organizational choices to improve timing, including some that can get real-time performance.

You can use Foreground entities such as Deferred Interrupt Handlers or Event Action Routines in response to interrupts, timed requests or system events. The resultant timing can achieve performance closer to real-time than the classic Super Loop because those Foreground operations take place at a higher priority than the Super Loop running in the Background. It’s just one way the Novos FB Operating Environment helps you meet your application’s requirement.

The Novos FB Environment makes it easy to get the job done quickly and efficiently by:

  • Providing a standard model for interrupt servicing that simplifies device driver design
  • Recognizing and synchronizing application code with external or internal events
  • Passing data between the application code entities, including interrupt service routine
  • Handling time-based operations
  • Requiring only one stack for both Foreground and Super Loop operations

For those who consider the “do-it-yourself” option, developing the same capabilities of the Novos FB Operating Environment can produce a solution that works but often at an unacceptable cost in time, reliability and product maintainability. The Novos FB Operating Environment can help cut those costs, improve the application development schedule and help make a more maintainable product. And reduce your risk.

And our Novos FB source code is FREE. Two volumes of related and separately available documentation are also available for a small charge. A User Guide explains the Novos FB design, its classes and how to use it. A Services Reference Guide gives a complete description of each Novos FB API. They will get you off on the right foot on your next application.

Servicing Interrupts

Most embedded applications need to service peripheral devices from time to time. Polling the devices is one way but a costly one in terms of cycles, power and performance. Interrupts are usually a better solution and the Novos FB Environment is especially well suited to the job of servicing them rapidly and predictably.

The Novos FB Operating Environment uses two-level interrupt service model that is common to all Novos operating environments, providing a robust design and ease of handling interrupts. The highest level services the immediate needs of the interrupting device and schedules the second level handler, the Deferred Interrupt Handler (DIH). As a high priority Foreground execution entity, the DIH has full access to the Novos FB API set, allowing it to communicate with other DIHs or the Super Loop about the device’s state or its input or output data.

Synchronizing with Events

It is a common requirement in almost all embedded systems that the various execution entities know when an event takes place in order to synchronize with it. The traditional Super Loop design can lead to variable amount of jitter when responding to an event. The Novos FB Environment supports Event Action Routines (EARs) for specific class-related events to respond to events in a timely, predictable manner with minimal jitter.

Novos FB Entities and Classes of Services

The Novos FB Environment embodies a set of 31 services that support six classes, including:

A Deferred Interrupt Handler (DIH) is a Foreground execution entity that runs as the result of an interrupt. A DIH can invoke Novos FB services that pass data between the DIH and other entities. Events caused by those services can schedule Event Action Routines.

An Event Action Routine (EAR) is a micro-task that executes when a Novos service invoked from any execution entity detects an event for which there is an associated EAR. The scheduled EAR always runs as a Foreground entity, meaning that it will pre-empt any Super Loop operation. The association between an object, the event conditions and an Event Action Routine is user-defined. An EAR can invoke all services available to any Foreground execution entity.

The Alarm and Counter classes provide services to handle time-based operations in all execution entities, including the Super Loop. A single system time-base can support any number of application-defined alarms, which can be either one-shot or cyclic in nature.

The Event Group class services provide execution entities ways to use groups of bit-level flags to set and detect one or more events in a simple and efficient way with AND/OR Boolean logic.

The Queue class provides services to move data to/from the execution entities, including the Super Loop, DIH and EAR entities. Support exists for both First-In-First-Out (FIFO) and Last-In-First-Out (LIFO) queueing.