30.12.2012 Views

30°C Power On 12 to 36 watts - for fanless sealed system design ...

30°C Power On 12 to 36 watts - for fanless sealed system design ...

30°C Power On 12 to 36 watts - for fanless sealed system design ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ESE Magazine Jan/Feb 06 <br />

40<br />

The fourth RTOS<br />

Kevin Pope, Quadros Inc. <br />

Cores combining MCU and DSP architectures require a different kind of RTOS.<br />

THE EMBEDDED software market has<br />

his<strong>to</strong>rically developed two fundamentally<br />

different RTOS architectures, each <strong>design</strong>ed<br />

<strong>to</strong> serve the needs of the underlying processor<br />

architectures; specifically MCU’s (CISC/RISC)<br />

and DSP's. Most commercial RTOS vendors have<br />

developed solutions adapted and optimized <strong>to</strong> one<br />

or other of these <strong>design</strong>s and their (traditionally<br />

somewhat different) applications.<br />

A third RTOS <strong>design</strong>, multiprocessor, is<br />

required <strong>to</strong> support multiple processor architectures,<br />

completing the “traditional” RTOS space.<br />

In recent years, however, the pressure <strong>to</strong><br />

reduce both cost and power consumption in volume<br />

applications such as consumer hand-held<br />

multimedia electronics has increased dramatically.<br />

Consumers are driving their objects of desire<br />

smaller and smarter. There are many issues <strong>for</strong><br />

the manufacturer, but the essential question has<br />

<strong>to</strong> be – how <strong>to</strong> fit more features and functions<br />

in<strong>to</strong> an ever decreasing physical space. Inside<br />

the glossy exterior, there is a struggle <strong>for</strong> space<br />

on a PCB already overcrowded with connec<strong>to</strong>rs<br />

<strong>for</strong> USB, antenna(s), power, flash, etc.<br />

Convergent processors<br />

These market pressures have led <strong>to</strong> the emergence<br />

of a new type of single core hybrid, or convergent<br />

processor, combining both MCU and DSP<br />

architectures. Such ‘convergent’ processors can<br />

be <strong>design</strong>ed as DSP's with MCU capabilities (e.g.<br />

Freescale’s DSP56800E) or MCU’s with DSP<br />

extensions (e.g. Freescale's ColdFire) or completely<br />

new cores <strong>design</strong>ed from the ground up <strong>to</strong><br />

serve both architectural needs (e.g. StarCore, or<br />

ADI's Blackfin). These single core <strong>design</strong>s enable<br />

hardware engineers <strong>to</strong> reduce chip count and<br />

reduce the overall size of the device, leading <strong>to</strong> a<br />

reduction in <strong>system</strong> cost and power consumption.<br />

But this creates a challenge <strong>for</strong> the <strong>design</strong> of<br />

the supporting RTOS architecture: should it be<br />

Table 1: Single stack advantages<br />

Multitasking Architecture<br />

<strong>for</strong> Control Plane Processing<br />

optimized <strong>for</strong> the interrupt-driven control environment<br />

of the MCU, or <strong>for</strong> the data-flow environment<br />

of DSP? In the same way that silicon<br />

has been <strong>for</strong>ced <strong>to</strong> converge, a fourth RTOS<br />

type, optimized <strong>for</strong> the convergent environment<br />

is also needed.<br />

Quadros Inc have recognized this trend by<br />

developing a 4-way RTOS <strong>design</strong>, RTXC<br />

Quadros, with a version <strong>design</strong>ed and optimized<br />

<strong>for</strong> each of the four architectural types; MCU,<br />

DSP, Multiprocessing, and ‘Convergent’. The<br />

approach taken <strong>to</strong> provide a convergent software<br />

solution is <strong>to</strong> use a “dual mode” RTOS<br />

<strong>design</strong>, with each part of the application running<br />

in an environment optimized either <strong>for</strong> DSP or<br />

MCU execution.<br />

Context overhead<br />

The main drawback of a multi-tasking MCU type<br />

RTOS <strong>for</strong> a DSP engineer is the necessity <strong>for</strong><br />

each task <strong>to</strong> retain what is known as a context.<br />

This s<strong>to</strong>ring and res<strong>to</strong>ring of data consumes<br />

vital processor instruction cycles and delays processing<br />

of the interrupt. When the interrupts are<br />

frequent and constant, as in streaming media,<br />

the context switch becomes a heavy overhead in<br />

the <strong>system</strong>. In the worst case, the control application<br />

may never get any processor time <strong>to</strong> complete<br />

its necessary processing or the interrupts<br />

may be lost because the ISRs cannot keep up<br />

with the demand from external events.<br />

With a convergent processor, these two<br />

roles must be balanced efficiently within a single<br />

resource. The obvious way <strong>to</strong> assist this situation<br />

is <strong>to</strong> reduce overheads and the biggest<br />

Multithreaded Architecture<br />

<strong>for</strong> Data Plane Processing<br />

<strong>On</strong>e stack per task All threads use single stack<br />

Multiple priorities Multiple priority levels<br />

Preemption between priorities Preemption between levels<br />

Context saved and res<strong>to</strong>red as needed No context saved or res<strong>to</strong>red except on preemption<br />

Can wait <strong>for</strong> an event Cannot wait <strong>for</strong> an event<br />

Lower priority than threads Run <strong>to</strong> completion within a level<br />

The question is how <strong>to</strong> fit more features and<br />

functions in<strong>to</strong> an ever decreasing physical space<br />

overhead in a <strong>system</strong> with many interrupts is the<br />

context switch.<br />

The dual-mode <strong>design</strong> of RTXC/dm combines<br />

a traditional task-based kernel architecture <strong>for</strong><br />

real-time control processing with a specialized<br />

executive <strong>for</strong> DSP and dataflow operations. The<br />

control application code will execute in the<br />

familiar environment of a pre-emptive priority<br />

based scheduler, typically used <strong>for</strong> such tasks as<br />

user interface, communication paths and peripherals.<br />

Meanwhile, the signal processing application<br />

code will execute in a highly efficient single-stack<br />

environment. (See Table 1).<br />

Fast switching<br />

DSP processes, handled by lightweight code<br />

entities called threads, run at a priority higher<br />

than control tasks, ensuring they get access <strong>to</strong><br />

the CPU and can meet their real-time requirements.<br />

Thread-<strong>to</strong>-thread switching is very fast<br />

because threads carry no context. Control operations<br />

are supported by a multitasking processing<br />

model with a rich set of static and dynamic<br />

kernel objects and inter task synchronization<br />

options. As a further advantage, all this takes<br />

place in a single development environment, so<br />

both DSP and MCU-based development <strong>to</strong>ols<br />

can communicate easily between the domains<br />

using the object classes and related services of<br />

the operating <strong>system</strong>.<br />

Thus the use of a dual mode RTOS architecture<br />

ensures that the developer of such<br />

demanding applications can fully leverage the<br />

low cost, low power advantages of the new<br />

convergent processor <strong>design</strong>s emerging in the<br />

market <strong>to</strong>day. <br />

www.quadros.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!