Products arrow EE for Altera Nios II
Main Menu
Products
Services
News and Events
Company
Documentation
Downloads
How to buy
Contacts
Job opportunities
Embedded Linux
Embedded Linux
FLEX Boards
FLEX for Microchip dsPIC
Erika Enterprise and RT-Druid
EE and RT-Druid
EE for Altera Nios II
EE for Microchip dsPIC
EE for Atmel AVR
Community
Application notes
Known issues
Forum
Bug reporting
Search
Login Form





Lost Password?
No account yet? Register
Nios II - Altera Nios II

Erika Enterprise and RT-Druid: support for multicore applications

The development trends for next generation embedded devices clearly states that the future lies to multicore devices on the same chip.

The Altera Nios II platform is an example of these multiprocessor platforms.

Thanks to the configurability of FPGAs, developers can design multiprocessors in minutes. Although on one side hardware design is simplified by tools like Altera SOPCBuilder, on the other side application development is made more complex by the fact that the application code have to be spread out among different processors.

 

Download the Erika Enterprise and RT-Druid for Altera NIOS II brochure

 

Features of ERIKA Enterprise and RT-Druid for Altera Nios II

Altera integration features:

  • Integrated as a component in the Altera HAL;
  • Compatible with the Altera HAL peripheral drivers and system libraries;
  • Support for nested interrupts;
  • Support for a RTOS configuration code generator compliant with the OSEK OIL specifications.

Multiprocessor support:

  • Advanced software partitioning support:
    • developers can decide which task goes on which processor;
    • developers can move tasks between processors without changing the source code;
    • Transparent handling of shared resource locks behavior depending on the partitioning of the application;
  • Interprocessor interrupt support;
  • Shared resource support using queuing spin locks on top of the Altera Mutex Peripheral;
  • Automatic cache disabling technique without changes to the user source code (only changes to data definitions);
  • Support for multiprocessor scheduling algorithms with bounded blocking times on multiprocessors.

Partitioning

In particular, partitioning the application among the different CPUs, and implementing an efficient communication mechanism between the CPUs are the first issues to be addressed at the first stages of the development process. Unfortunately these choices are very critical for later development phases, since changes in the partitioning scheme can heavily change application design.

Erika Enterprise and RT-Druid give support to developers to solve the partitioning issues in multiprocessor applications based on Altera Nios II, enabling the developer to perform code partitioning and then easily changin it at later stages in the design.

 

Design and programming

Design and Programming paradigms must exploit the parallelism of these architectures, but programmers are usually not trained for writing code executing in parallel on multiple processors, and designers need to find the best tradeoffs for exploiting computing capabilities without incurring in excessive blockings over shared resources or bacause of synchronization.

With Erika Enterprise, each task can be thought to run on a single processor multithreaded environment. Multiprocessor issues like data cache disabling and mutual exclusion between different CPUs accessing concurrently the same data structures are handled automatically byErika Enterprise and RT-Druid, simplifying the application design and verification.

 

Code placement and resource sharing

The choice of which software has to be placed on which processor is usually called code placement or software binding or partitioning.

The task of the final user is to figure out the right communication pattern(s) / architecture(s) and to implement it. Today's approach used by many development tools is non conclusive, leaving out to the designer the job of chosing the best partitioning and communication scheme for its application, with the risk of making early decisions that may impact heavily on the application code with bad application performance.

Ideally, changing the code placement must not impact on the way people design and program applications. The multiprocessor structure must be hided to the user whenever possible, and source code compatibility between mono and multiprocessor, with automatic mapping of application facilities to the new multiprocessor features. This is exactly what the RT-Druid code generator offers, exploiting the multiprocessor support provided by Erika Enterprise.

However, multiprocessor hiding is sometimes not sufficient alone, because the developer have to know how to partition the various jobs to obtain the maximum performance. For this reason, future versions of RT-Druid will also enable users to perform well-reasoned partitioning choices integrating the results of application timing analysis with the results of schedulability analysis. In this sense, schedulability analysis will help to give a metric that guides the developer when doing the application design choices.

 

Porting of legacy code to new architectures and to multiprocessors

One of the problems that typically arises when adopting multiprocessors is that application rarely start from scratch with a multicore approach. More often, new applications are upgrades to existing (working) systems that are adapted to particular new environment.

Erika Enterprise and RT-Druid helps porting existing legacy code to multiprocessors because:

  • The kernel API is the same for both single and multiprocessor systems.
  • A multicore system can be view as an "extension" of a single core. You can add functionality to a system on a separate CPU, without perturbating too much the application running on the critical part.
  • Application code does not have to be changed when changing the partitioning scheme.

Resource sharing and OS-level mechanisms

When moving from single processor systems to multiprocessor systems, standard programming paradigms used in real-time systems to access shared resources does not work anymore.

In particular, all the solutions used to avoid the Priority Inversion problem, such as the Immediate Priority Ceiling protocol implemented in the OSEK/VDX standard and in other APIs does not scale to multiprocessors like Altera Nios II.

Erika Enterprise and RT-Druid offer an innovative way to automatically provide support for resource sharing among different processors, automatically integrating resource consistency protocols for multiprocessors when a resource is shared among different CPUs.

 
Advertisement
Advertisement
Evidence S.r.l. - PIVA: 01638690501
Viale Rinaldo Piaggio 32 - Pontedera - Pisa - Italy