|
The Xilinx® Embedded Development Kit
(EDK) enables you to create powerful
embedded processor systems, as well as the
complex applications running on them.
These applications may need to perform
numerous tasks and access a wide range of
peripherals, such as memory controllers,
display interfaces, and network interface
cards. It is difficult, expensive, and inefficient
to design such large applications from
scratch, especially when existing software
modules are capable of meeting some or all
of your system’s goals.
Integrating these modules with your
application, however, can sometimes prove
to be more difficult than writing equivalent
modules yourself. Luckily, Xilinx Platform
Studio (XPS) provides a standard interface,
known as the microprocessor library definition
(MLD) interface, to facilitate adding
such modules to your projects. Operating
systems and other software modules adhering
to this interface can conveniently be
configured for your application from within
XPS. Micrium has adapted many of its
software modules to the MLD interface,
allowing you to quickly and easily add
high-quality, well-documented modules to
your embedded applications.
The MLD Format
Each Micrium software module that can be
configured using XPS has an MLD file
defining that module’s configurable parameters.
Generally, configurable parameters correspond
to features and services that will
comprise the compiled module. These
parameters can also be used to identify the
hardware components that the module will
utilize. For example, the MLD file for a
graphical user interface (GUI) module
might define parameters stipulating the colors
and resolutions supported by the compiled
module, as well as a parameter
indicating the memory-mapped location of
the display controller used by the module.
You would be able to configure these parameters
from the Software Platform Settings
dialog box in XPS, tailoring modules as
needed to create a suitable software platform
for nearly any application.
Once you have configured a software
platform, you can build it with Library
Generator (LibGen), a utility that is automatically
invoked when a project is compiled
in XPS. LibGen is responsible for
building software modules according to the
parameter values set forth in XPS, and it
uses Tool Command Language (Tcl) files
to meet this objective. Tcl files, which are
provided with each Micrium software
module that complies with the MLD interface,
contain functions that are able to
access the parameter values you specify.
These functions are called by LibGen, and
they normally generate source and header
files that allow the module to be built as
per the requirements of the application.
The specific role that Tcl and MLD files
play in the process of configuring and
building software modules can be better
understood by examining one of Micrium’s
software modules, ìC/OS-II, The Real-Time Kernel. ìC/OS-II is a popular realtime
operating system (RTOS) that has
been proven effective in hundreds of products.
The module’s clean and consistent
source code, which is certifiable for use in
systems deemed safety-critical by the FAA
and FDA, is described in “MicroC/OS-II,
The Real-Time Kernel,” by Jean Labrosse.
This book describes ìC/OS-II’s efficient
implementation of semaphores, message timers, and other standard operating
system services.
As Labrosse’s book explains, ìC/OS-II’s
services are normally configured by manipulating
constants in a header file, os_cfg.h.
The MLD interface eliminates the need to
manually edit this file, instead letting you
configure the operating system from XPS’s
Software Platform Settings dialog box, as
shown in Figure 1. The contents of this
dialog box are determined by ìC/OS-II’s
MLD file, which defines configurable
parameters representing the constants normally
found in os_cfg.h. Because ìC/OS II’s Tcl file has access to the values specified
for each of these configurable parameters,
it can generate os_cfg.h whenever LibGen
is run. This automatic generation of the
configuration file gives you a custom version
of ìC/OS-II each time you build your
project, making the operating system
instantly amendable to the changing needs
of an application.
An Example Application
Although the benefits of the MLD interface
are apparent even when considering a
single module like ìC/OS-II, they are
more pronounced in a large,
multi-faceted application such as
a Web server. A Web server has
many responsibilities, and from a
design perspective, it is convenient
to view each of these responsibilities
as a separate component,
as depicted in Figure 2. Once an
application has been logically
divided in this manner, you can
choose software modules to
implement each component.
A Web server might, for example,
use modules to handle the
various protocols, such as HTTP
and TCP, involved in serving Web
pages. It might also take advantage
of a module capable of interqueues,
facing with a storage device, allowing Web
pages to be saved as files. The Web server
could rely on an RTOS to coordinate the
tasks performed by each of these modules.
The use of these types of software
modules as “building blocks” for constructing
large applications, such as Web
servers, significantly reduces the time and
effort needed to develop such applications,
provided that you can easily incorporate
the modules in your design. Many
software modules, though, are unwieldy,
and they introduce unnecessary complexities
into projects that use them. Our
example Web server could encompass
hundreds of source files, requiring the
inclusion of a comparable amount of
header files. Adding these files to an
application in XPS would result in a cumbersome
project, teeming with files that
shouldn’t be of concern to application
developers. To avoid such a confusing
muddle of files, you could create an
object code library, but this would force
you to learn the compilation procedures
for several software modules, and the
resultant library would have to be rebuilt
for different configurations and versions
of the modules.
The MLD interface obscures these
compilation details, resulting in organized
and efficient applications running on
highly configurable software platforms. A
Web server designed on such a platform
would be outwardly simple, with the
multitude of files composing the server’s
modules invisible to designers. The Web
server would appear to consist only of the
files directly implicated in the application’s
primary task of serving Web pages,
so it could be debugged quickly, even by
developers unfamiliar with the project
and its modules. Updating or revising the
Web server would be similarly painless,
because well-documented and dependable
software modules, such as those provided
by Micrium, could be added to the
application without needing to understand
the mechanics of configuring and
compiling the modules.
The Micrium Software Modules
Micrium’s software modules are readily
adaptable to most applications. The
process of adding such high-quality software
to a project is expedited in XPS, as
Micrium offers an assortment of modules
that comply with the MLD interface. You
can add any of these modules to a project
by using the Software Platform Settings
dialog box, as shown in Figure 3. This
dialog box gives you the ability to rapidly
deploy practical software platforms to
support complex applications, including
Web servers. In fact, you can construct a
Web server entirely of software from
Micrium simply by specifying the appropriate
modules in XPS.
The centerpiece of such a Web server
would be ìC/TCP-IP, Micrium’s TCP/IP
protocol stack. ìC/TCP-IP was meticulously
developed using stringent coding
standards. The module’s completely original
design, which was not derived from
any existing protocol stacks, supports an
extensive array of network options that
are presented to XPS users, along with a
selection of useful add-on modules. You
can use these modules in conjunction
with ìC/TCP-IP to accommodate the
needs of a variety of applications. At least
one such module, ìC/HTTPs (which
offers a consistent means of serving Web
pages), would be an integral part of a
Web server based on Micrium’s modules.
Another key component of a Micrium
Web server would be ìC/FS, Micrium’s
embedded file system. ìC/FS is a compact
and versatile module, with an API
similar to that available from the standard
C library. The files accessed through
this API can reside on storage devices
implementing any of the numerous formats
that ìC/FS recognizes, including
CompactFlash, Secure Digital (SD), and
SmartMedia. The files themselves can
also be of varying formats, because
ìC/FS is compatible with both the
Microsoft FAT file system and a
proprietary file system. Support
for either of these formats is one
of the many features reflected in
the module’s MLD file, allowing
ìC/FS, like Micrium’s other
modules, to be configured in XPS
and seamlessly included in a Web
server or any other application.
Conclusion
By offering a convenient way of configuring
useful software modules, such as
ìC/FS, ìC/TCP-IP, and ìC/OS-II, the
MLD interface accelerates the process of
constructing complex applications from
these embedded building blocks. The
benefits afforded by the interface may be
unintentionally relinquished, however, if
poorly documented, unreliable modules
are selected.
To avoid the headaches that can result
from the use of such modules, you should
choose dependable and easy-to-use modules.
Micrium’s software modules complement
the valuable tools provided with
the EDK, enabling the efficient development
of powerful applications.
For more information about
Micrium’s modules, please visit
www.micrium.com/microblaze/.
Printable PDF version of this article with graphics. (12/1/05) 280 KB
|