Sie sind auf Seite 1von 3

An eye on design:

Effective embedded system software

G
ood software design is ass impor-
tant in the development of a
product as a strong foundation in Sachin P. Kamat
the construction of an edifice.
This is particularly important in the devel-
opment of an embedded system where
resources like memory, power, and pro-
cessing capabilities are limited. Continu-
ous innovation, fast-changing consumer
needs, and the drive to remain ahead of
competitors in terms of market share and
product profile has drastically reduced the
time to market a product and its develop-
ment life cycle. The cost of defect correction
increases with the development lifecycle
stage. Post-release defect fixing is the most
costly. Thus, it is important to have good
software design and a process in place so
that stringent deadlines can be met and
rework activities minimized.
Good software design should effec-
tively utilize all the hardware capabilities
provided by the system-on-chip (SOC).
Present day SOCs can contain over 30 dif-
ferent intellectual properties with single-
or multicore processors and several
hardware accelerators for multimedia and
graphics data processing. Some SOCs also
contain a dedicated digital signal proces-
sor (DSP) for performing specialized
tasks. A system-level block diagram of a
typical SOC used for general application
purposes in consumer and entertainment
electronic products like personal digital
assistants (PDA), smart phones, portable
media players, gaming consoles, car navi-
gation systems, and DVD players is shown
in Fig. 1.
An engineer entrusted with the devel-
opment of a specific module or a sub-
system should start by studying and ana-
lyzing the SOC architecture as a whole
and then move toward the analysis of the
particular module under consideration. A
top-down design approach helps in tak-
ing into consideration the interdepen-
dencies between various modules, and
thus resource sharing and interface de-
sign can be done in an effective manner.
A post-processor, for example, is one

Digital Object Identifier 10.1109/MPOT.2010.937052


©INGRAM PUBLISHING & COMSTOCK

SEPTEMBER/OCTOBER 2010 0278-6648/10/$26.00 © 2010 IEEE 33


Memory is an important and sparse
Multimedia resource in any embedded system, and
System Peripherals Acceleration it should be used very conservatively.
Timers Camera I/F Only the required size of memory
PLL Video Engine should be allocated at the required
time, and it should be freed immedi-
DMA CPU Image Engine
ately upon completion of the operation.
Keypad 2D/3D Graphics The holding up of memory unneces-
Touch Screen TV Out sarily when it is not required deprives
other applications from utilizing it,
and hence, they might fail to load.
High Speed Bus Wherever possible, memory should be
Connectivity shared between modules that operate
on the same data. This conserves
Audio I/F Memory Interfaces memory and improves the performance
Serial I/F of the system by reducing the number
Infrared I/F of memory transfer operations. A
shared memory system requires well-
Modem I/F LCD designed memory protection and a
USB I/F Controller
synchronization mechanism to avoid
simultaneous read and write operations
and to avoid overflow and underflow
Fig. 1 Block diagram of a typical general purpose application processor SOC. conditions. Care should also be taken
to avoid possible race conditions.
such module present in a multimedia sible without architectural redesign. Engineers involved in the develop-
device that is utilized by many other SOCs designed for multimedia applica- ment of device drivers should give
modules like the camera and video and tions generally have multiformat codecs special consideration to the usage of
image decoders for doing color space (MFC) implemented in hardware. MFC cache memory, direct memory access
conversion (YUV to RGB and vice can support simultaneous encoding and (DMA), and interrupt handling mecha-
versa), image scaling, and cropping or decoding of multiple streams of multi- nism. Making a memory cacheable
rotating operations. It is essential to media data of different formats like improves the performance of the sys-
design this module in such a way that MPEG-4, H.263, and H.264. The design tem. At the same time, it also adds a lot
multiple modules can access it in an should take into consideration the use of overhead if there are too many
optimal and nonconflicting way. Fig. 2 cache misses. Direct memory access
illustrates the use of a post processor helps in faster transfer of bulk data
by multiple peripherals in a multimedia without the intervention of the pro-
embedded system. cessing unit. Similarly, interrupt driven
Hardware architecture analysis mechanism is more efficient than poll-
should immediately be followed by ing as it frees the processing unit from
software requirement analysis to under- constant monitoring. It also improves
stand the software requirements and the responsiveness of the system. Inter-
map it to hardware capabilities. The rupt handling mechanism should be
hardware might provide several ad- designed in such a way that it does not
vanced features that may not be possi- case scenarios where these features hamper the real-time performance of
ble to implement in software all at once may be used and other advanced the system.
for various reasons. However, the software application features that may An SOC contains several clock sources.
design should be accommodative become essential in the near future. The main clock, or processor clock,
enough for possible feature addi- which runs at the highest frequency
tion and expansion at a later date. is primarily responsible for the
For example, the SOC might sup- overall system performance and
Video Image power consumption. The periph-
port dual external camera inter- Camera
Decoder Decoder
faces. But it may be required to erals are connected by a peripheral
attach only one camera for a par- YUV YUV YUV clock and the bus may be clocked
ticular model of a product built Post by the hardware clock. All three
using this SOC. The software Processor clocks are in some definite propor-
design should be such that it pro- RGB tion with the main clock (e.g., 4:2:1
vides provision for connecting or 2:1:1). These clocks can further
and using a second external be gated or subdivided using clock
LCD Display TV Out
camera for a different model of dividers to lower the frequency as
the product using the same SOC. per the requirements. Care should
Similarly, upgrading to multiple Fig. 2 A block diagram, which illustrates the usage of a be taken not to affect the operation
memory cards or a higher resolu- post-processor module by multiple peripherals for color of other peripherals during the
tion of LCD should also be pos- space conversion. clock alteration.

34 IEEE POTENTIALS
Sometimes it is not possible for a par- good software design is one that is a bal-
ticular peripheral or a piece of software anced tradeoff between high perfor-
code to handle and process all possible mance, low memory usage, and low
cases of input data. A stable software power consumption.
design should have a mechanism to
handle unsupported and corrupted data Read more about it
gracefully. Wherever possible, a soft- • T. A. Henzinger and J. Sifakis,
ware workaround and fallback mecha- “The discipline of embedded systems
nism should be provided to handle these design,” Computer, vol. 40, no. 10, pp.
kind of invalid data. 32–40, Oct. 2007.
Power is another important and scarce • V. Narayanan and Y. Xie, “Reli-
resource in battery powered devices. The ability concerns in embedded system
design should take into account power Wherever there is a possibility of designs,” Computer, vol. 39, no. 1, pp.
management aspects to enhance the bat- implementing a design in multiple ways, 118–120, Jan. 2006.
tery life and reduce the heat dissipation the engineer should analyze and assess
of the chip. Power management features each method and choose the one that is About the author
are provided by the hardware chip as most optimal. Good software design Sachin P. Kamat (sachin.kamat@ieee.
well as by the operating system running should exploit all the features provided org) received his bachelor’s degree in ele-
on it. Dynamic voltage and frequency by the hardware and give provisions for ctrical and electronics engineering from
scaling (DVFS) is a popular power man- developing scalable, portable, modular, the National Institute of Technology,
agement technique employed in embed- and highly efficient software in terms of Karnataka, India, in 2003. Currently he is
ded systems. The software design should power consumption, memory usage, working as development lead with Sam-
encompass these features and utilize the and performance. Since a high perfor- sung India Software Operations, Banga-
hooks provided by the hardware and mance output generally requires more lore, India, handling the software design
software platforms. memory and consumes more power, of high-end multimedia phones.

YO U K N O W YO U R S T U D E N T S N E E D I E E E I N F O R M AT I O N .
N O W T H E Y C A N H AV E I T . A N D Y O U C A N A F F O R D I T .

IEEE RECOGNIZES THE SPECIAL NEEDS OF SMALLER COLLEGES,

and wants students to have access to the information that will


put them on the path to career success. Now, smaller colleges can
subscribe to the same IEEE collections that large universities
receive, but at a lower price, based on your full-time enrollment
and degree programs.
Find out more–visit www.ieee.org/learning

SEPTEMBER/OCTOBER 2010 35

Das könnte Ihnen auch gefallen