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 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Why use an RTOS?<br />
Tomoyuki Uda, Managing Direc<strong>to</strong>r, eSOL, Inc <br />
An RTOS provides a great deal <strong>for</strong> the FPGA developer.<br />
What should you consider when choosing one?<br />
THE FLEXIBLE Nios II processor<br />
extends Altera’s FPGAs in<strong>to</strong> new and<br />
varied application possibilities. With a<br />
microprocessor in the FPGA, developers<br />
can <strong>design</strong> more efficient and powerful<br />
embedded <strong>system</strong>s. With this expanded capability,<br />
developers <strong>for</strong> FPGA-based <strong>system</strong>s may<br />
be facing the decision of whether <strong>to</strong> use a Real<br />
Time Operating System (RTOS) <strong>for</strong> the first<br />
time.<br />
What features does<br />
an RTOS provide?<br />
An RTOS provides the foundation <strong>for</strong> building<br />
your embedded application. The most basic<br />
definition of an RTOS is that it provides multiple<br />
threads of execution, and a scheduler <strong>to</strong><br />
switch between those threads. Multiple<br />
threads allow you <strong>to</strong> break up your application<br />
in<strong>to</strong> its basic parts, separated by purpose and<br />
priority.<br />
Most RTOS kernels provide the following set<br />
of features:<br />
Multiple threads<br />
An RTOS allows multiple threads of execution,<br />
implemented as tasks or processes, depending<br />
on the nature of the RTOS.<br />
Preemptive, priority-based scheduling<br />
A preemptive scheduler allows interrupts and<br />
higher priority tasks <strong>to</strong> interrupt the currently<br />
running task.<br />
Synchronization services<br />
Multitasking kernel allow tasks <strong>to</strong> wait <strong>for</strong><br />
other tasks <strong>to</strong> complete work, or wait <strong>for</strong> an<br />
event <strong>to</strong> occur. These services typically<br />
include mutual exclusion mechanisms (mutex<br />
and/or semaphores), event flags, data queues,<br />
etc.<br />
Interrupt and exception support<br />
The RTOS kernel provides a way <strong>to</strong> handle hardware<br />
interrupts and exceptions through<br />
installing interrupt and exception handlers.<br />
Predictable interrupt<br />
latency and task switch time<br />
RTOS kernels have predictable overhead <strong>for</strong><br />
handling interrupts and switching tasks.<br />
When <strong>to</strong> use an RTOS<br />
An RTOS is useful in complex <strong>system</strong>s <strong>to</strong><br />
streamline application development. Polling<br />
loops work well <strong>for</strong> dedicated, simple <strong>design</strong>s,<br />
but quickly get complex when the <strong>design</strong> grows.<br />
For example, running multiple network servers<br />
can work from a polling loop, however the application<br />
<strong>design</strong> becomes much simpler and more<br />
modular if each network server is run in its own<br />
task.<br />
Using an RTOS is also beneficial when an<br />
application needs <strong>to</strong> run on multiple CPUs –<br />
using an RTOS abstracts the hardwaredependence<br />
so porting the application <strong>to</strong> a different<br />
target is easier. Using an RTOS<br />
abstracts that dependency so the application<br />
concentrates only on the operations required<br />
<strong>to</strong> per<strong>for</strong>m its functions, and the RTOS handles<br />
the hardware interface. Most commercial<br />
RTOSes support many CPUs and specific<br />
boards.<br />
An RTOS incorporates useful services that<br />
you would otherwise need <strong>to</strong> implement, debug,<br />
and maintain yourself in your own code library.<br />
Applications using an RTOS can dynamically<br />
allocate resources when they are required.<br />
Sharing resources reduces the overall memory<br />
requirements <strong>for</strong> the application.<br />
Choosing an RTOS<br />
When you consider how <strong>to</strong> <strong>design</strong> your application<br />
on the Nios II, you can choose <strong>to</strong> not use an<br />
RTOS at all, <strong>to</strong> use a free RTOS, or <strong>to</strong> use a commercial<br />
RTOS. If you do choose <strong>to</strong> use an RTOS,<br />
there are freely available solutions and commercial<br />
solutions.<br />
The following fac<strong>to</strong>rs should be considered<br />
when choosing an RTOS:<br />
Cost<br />
Developers often adopt open-source solutions<br />
because they are free. While the licensing<br />
cost is free, it’s important <strong>to</strong> add up the complete<br />
cost <strong>for</strong> using any RTOS. Technical support<br />
is only offered in online <strong>for</strong>ums. In a critical<br />
project, you may need additional technical<br />
support or cus<strong>to</strong>m services. The extra support<br />
and services are not free, and the associated<br />
fees are often more expensive than the<br />
license cost of a commercial RTOS. When<br />
considering license cost, consider the risk <strong>to</strong><br />
your project vs. the cost of the license, support,<br />
and services.<br />
Licensing<br />
When you use an open-source operating <strong>system</strong><br />
in your product, you assume the risk and liability<br />
<strong>for</strong> using that code. Commercial RTOS vendors<br />
assume the risk <strong>for</strong> their own OS implementation.<br />
Technical support and maintenance<br />
Receiving technical support from the same engineers<br />
who wrote and maintain the operating<br />
An RTOS incorporates useful services that you would otherwise<br />
need <strong>to</strong> implement, debug, and maintain yourself<br />
<strong>system</strong> shortens the support and development<br />
cycle.<br />
PrKERNELv4<br />
PrKERNELv4, from sCOS, is the base of a full<br />
RTOS suite called eParts that provides a real<br />
time kernel, TCP/IP connectivity with<br />
PrCONNECT2, an embedded file <strong>system</strong> with<br />
PrFILE2, integration with a graphical user interface<br />
library, and more. The entire eParts product<br />
suite is fully integrated in<strong>to</strong> Altera’s development<br />
environment <strong>for</strong> Nios II. Support is also<br />
integrated with several Altera third party partners’<br />
software and <strong>to</strong>ols, such as Lauterbach’s<br />
Trace32, the MorethanIP 10/100/1000 MAC-<br />
NET Core and the SLS USB Core<br />
Conclusion<br />
Choosing an RTOS doesn’t need <strong>to</strong> be complex.<br />
When choosing an RTOS, consider the features<br />
you need as well as associated development<br />
costs <strong>for</strong> porting, support, and software<br />
licensing. <br />
www.esolglobal.com<br />
ESE Magazine Jan/Feb 06 <br />
45