Professional Documents
Culture Documents
R&D Prototype
pcb assembly
$50 in 3-Days
all smt parts machine-placed!
R&D assembly pRicing matRix
3-Day turn
Up to # smt parts 25 50 100 150 200 250 300 Over 300
1st board $50 $80 $100 $150 $200 $250 $300 Call
2nd board $25 $50 $60 $90 $120 $160 $180 for
Each additional board $20 $30 $40 $60 $90 $120 $150 Pricing
Stencil $50 $50 $50 $50 $50 $50 $50
FREE Tooling anD PRogRamming
How to Order: get the advanced advantage:
• Email boM file, XyrS file and gerber files • loose parts, cut tape or reels – oK
to order@aapcb.com • Machine-placed SMT parts
• Send parts and bare pcbs or we will order them • Assemblies shipped in days
• full turn-key available
ISO 9001:2000 Certified
www.aapcb.com/system • 1-800-838-5650
SmT Component gauge and Sizing Resource
Use the guidelines below to verify you have the correct parts before the assembly
process begins.
www.aapcb.com/system • 1-800-838-5650
SMT ASSEMbly for EnginEErS SM
VOLUME 22,
NUMBER 8
SEPTEMBER 2009
SENSORS RAISE
your system’s IQ
14
Cell processor revisited
22
Is virtualization
right for your project?
28
Ganssle on memory
37
THREE AIRCRAFT, A SINGLE MODEL,
AND 80% COMMON CODE.
TM
Accelerating the pace of engineering and science ©2008 The MathWorks, Inc.
The only operating system
certified to EAL6+ High Robustness.
www.ghs.com
Copyright © 2008 Green Hills Software, Inc. Green Hills, the Green Hills logo, and INTEGRITY are trademarks of Green Hills Software, Inc. in the
U.S.and/or internationally. All other trademarks are the property of their respective owners.
One Debugger/ Programmer
Microcontrollers
The Microchip name and logo, the Microchip logo, HI-TECH C, MPLAB, PIC and dsPIC are registered trademarks of Microchip Technology Incorporated in the USA and in other countries. PICkit is a registered trademark of Microchip Technology Incorporated in the USA and in other
A CD that includes:
– PICkit™ 3 User’s Guide
Digital Signal
Controllers
– A series of 12 lessons on PIC® MCUs
with C source code
– A debugging tutorial PICkit 3
– Microchip’s MPLAB® IDE software debugger/
– Free MPLAB C Compiler for all programmer
PIC MCUs and dsPIC DSCs
Analog
– CCS compiler for the PIC18F45K20
– HI-TECH C® Compilers PRO for
PIC10/12/16/18/32 running in
Lite Mode
Serial
EEPROMs
A 44-pin demo
board with a
PIC18F45K20
microcontroller
countries. All other trademarks mentioned herein are property of their respective companies. ©2009, Microchip Technology Inc.
COLUMNS
programming
pointers 11
Allocating and deallocating
arrays, in detail
BY DAN SAKS
Deallocating array objects, not
just array storage, requires a little
advance planning.
EMBEDDED SYSTEMS DESIGN
VOLUME 22, NUMBER 8 break points 37
SEPTEMBER 2009 Thanks for the memories
BY JACK G. GANSSLE
From oral tradition and clay tablets all
the way to modern memory devices,
14 Cover Feature:
Jack Ganssle traces the history of
memory.
parity bit 6
EMBEDDED SYSTEMS DESIGN (ISSN 1558-2493 print; ISSN 1558-2507 PDF-electronic) is published monthly with the exception of a combined July/August issue by
TechInsights, 600 Harrison Street, 5th floor, San Francisco, CA 94107, (415) 947-6000. Please direct advertising and editorial inquiries to this address. SUBSCRIPTION
RATE for the United States is $55 for 12 issues. Canadian/Mexican orders must be accompanied by payment in U.S. funds with additional postage of $6 per year. All other
foreign subscriptions must be prepaid in U.S. funds with additional postage of $15 per year for surface mail and $40 per year for airmail. POSTMASTER: Send all changes
ONLINE
to EMBEDDED SYSTEMS DESIGN, P.O. Box 3404, Northbrook, IL 60065-9468. For customer service, telephone toll-free (877) 676-9745. Please allow four to six weeks
for change of address to take effect. Periodicals postage paid at San Francisco, CA and additional mailing offices. EMBEDDED SYSTEMS DESIGN is a registered trade-
www.embedded.com
mark owned by the parent company, TechInsights. All material published in EMBEDDED SYSTEMS DESIGN is copyright © 2009 by TechInsights. All rights reserved.
Reproduction of material appearing in EMBEDDED SYSTEMS DESIGN is forbidden without permission.
B
E
N
C
H
BUILD it [Reliably]
With Express Logic’s award-winning BenchX® IDE or use tools from
over 20 commercial offerings including those from ARM, Freescale,
Green Hills, IAR, Microchip, MIPS, Renesas, and Wind River.
RUN it [Fast]
With Express Logic’s small, fast, royalty-free and industry leading
ThreadX® RTOS, NetX™ TCP/IP stack, FileX® FAT file system, and USBX™
T H R E A D
USB stack.
ANALYZE it [Easily]
T
With Express Logic’s graphical TraceX® event analysis tool, and new
R
StackX™ stack usage analysis tool. See exactly what is happening in your
A
C
E
SHIP it [Confidently]
No matter what “it” is you’re developing, Express Logic’s solutions will
help you build it, analyze it, run it, and ship it better and in less time. Join
the success of over 600,000,000 deployed products using
Express Logic’s ThreadX!
B E N C H T H R E A D T R A C E S T A C K
Newnes
ion
Second Edit
E
REAL-TIM
ED
EMBEDD ADING
RE
MULTITH dX
With Threa
re,
ARM, Coldfi
CD-R OM
INCL UDED
ThreadX
Containing
ThreadX, BenchX, TraceX and FileX are a registered trademarks of Express Logic, Inc. All other trade-
n system
demonstratio
examples
and C code
L. Lamie
Edward
EMBEDDED SYSTEMS DESIGN
Director of Content/Media,
BY Richard Nass#include
TechInsights
Richard Nass
(201) 288-1904
rnass@techinsights.com
Managing Editor
3G is passé; 4G is the
Susan Rambo
srambo@techinsights.com
Contributing Editors
Michael Barr, John Canosa,
real deal
Jack W. Crenshaw, Jack G. Ganssle,
N
Dan Saks, Larry Mittag
ow that we’re all pretty a nominal 100-Mbit/s data rate while
Art Director
Debee Rommel sure we understand what the client (handset) physically moves
drommel@techinsights.com 3G stands for (or repre- at high speeds relative to the base sta-
European Correspondent sents), it’s time to move on to 4G. To tion, and 1 Gbit/s while the client and
Colin Holland
colin.holland@techinsights.com review, the “real” definition for 3G is station are in relatively fixed posi-
Embedded.com Site Editor
384 kbits/s. That’s the speed for a tions; a smooth handoff across het-
Bernard Cole mobile device. That high rate results erogeneous networks (wouldn’t that
bccole@acm.org
in a host of applications/features that be nice); seamless connectivity and
Production Director are more like what a consumer global roaming across multiple net-
Donna Ambrosino
dambrosino@ubm-us.com would equate with 3G. The more works (again, sounds good, but is
Subscription Customer Service widely recognized definition by con- quite difficult to implement); and
P.O. Box 2165, Skokie, IL 60076 sumers is that the bandwidth is high support for next generation multi-
(800) 577-5356 (toll free)
Fax: (847) 763-9606 enough to permit voice calls, video media applications, such as HDTV
embeddedsystemsdesign@halldata.com calls, and wireless data, all in a mo- video content, mobile TV.
www.customerserviceesp.com
bile environment. What got me to thinking about
Article Reprints, E-prints, and
Permissions For a long time, I would tell peo- this 3G-4G stuff is a couple of visits
Mike O’Brien ple who may not have understood I’ve made recently with two of the
Wright’s Reprints
(877) 652-5295 (toll free) the technical definition for 3G that it cellular power-amplifier (PA) ven-
(281) 419-5725 ext.117 was really the melding of cellular and dors. One, Anadigics is recognized by
Fax: (281) 419-5712
www.wrightsreprints.com/reprints/index.cfm WiFi. That’s obviously not technically some to be the leader in PA technolo-
?magid=2210 correct, but it lets people understand gy. They offer a really low-power de-
Publisher that a 3G handset is one that allows vice in a small package. The second is
David Blaza
(415) 947-6929
you to access the Internet as well as a vendor with a soon to be an-
dblaza@techinsights.com make phone calls. nounced part that—if it meets the
Editorial Review Board It’s somewhat ironic that 4G can claims the company is making—is
Michael Barr, Jack W. Crenshaw, be described by a similar definition, further ahead than anything I’ve
Jack G. Ganssle, Bill Gatliff,
Nigel Jones, Niall Murphy, Dan Saks, with respect to features and applica- come across. If it’s true, you’ll see
Miro Samek tions. In addition to those previous- higher integration within your hand-
ly mentioned, it could include the set pretty soon.
addition of a WiFi/WiMax interface
TM
Corporate—UBM LLC
Marie Myers Senior Vice President,
Manufacturing
Pat Nohilly Senior Vice President, Strategic Richard Nass is the
Development and Business
Administration
director of content/
media at TechInsights.
You may reach him at
rnass@techinsights.com.
!
gram (astronomers/astrophysicists, tions. There is unquestionably high
sstructural engineers, civil engineers,
People use C because it is popularity for languages a level above C
mathematicians, chemists, biologists, the least evil option. For (I myself am a Perl fan and would hate
cryptographers, and so on), computer to be forced into C unless absolutely
professionals need to do better than
hack out code in “some high-level lan-
guage” to earn their daily bread. As ! embedded realtime sys-
tems, you really only have
necessary). But I observe there is con-
siderable fragmentation above the
C/C++ level—Perl, Ruby, Python,
>> Learn to maximize your multicore processor at ni.com/multicore 866 337 5041
©2009 National Instruments. All rights reserved. LabVIEW, National Instruments, NI, and ni.com are trademarks of National Instruments.
Other product and company names listed are trademarks or trade names of their respective companies. 2008-10525-821-101-D
The Newest
Embedded Technologies
Tower System
www.mouser.com/
freescale_tower_system
TM
Joule-Thief™ Module
www.mouser.com/
adaptivenergy_joule-thief
ZICM2410P0 MeshConnect™
ZI
Module
M
www.mouser.com/cel/a
w
www.mouser.com
Over A Million Products Online
(800) 346-6873
engineer coming out of school can go programs in it is not an option if you OS for 8-bit MCU
to Google et. al. and get a hefty salary, a want portable code. At the escalating The article (Dave Armour, “FLIRTing
very cool reputation and stock options, pace in which the silicon industry plops with 8-bit MCU OSes,” July/August
why are they going to go into a more out new processors, one can almost be 2009, p14, www.embedded.com/
meticulously demanding job that re- certain that the program will live longer 218600135) is very insightful and intu-
quires embedded design skills? Compa- than the processor. Portable code is a itive. Speaking of small footprint
nies that need embedded software engi- must in the embedded world, therefore RTOSes with round robin scheduling,
neers need to value them appropriately we need high-level languages. Private have you checked out µC/OS-III. Its
and make these jobs more attractive. encapsulation is another good reason press release (www.micrium.com/
—Susan McCord why. news/2009-03-24_Micrium-Expands-
Posted on Embedded.com’s forum I can come up with a few advan- RTOS-Family.html) in which they claim
tages of C++ over C in embedded sys- that the new kernel would be support-
We might want to consider adding a tems, namely stronger type enforce- ing tasks of equal priority and more-
new term to the embedded universe, ment, exception handling, standardized over the system promises near zero in-
something like, “Complex Embedded” inline asm, standardized inlining (C terrupt disable time—surprising!!
to describe systems or applications that does not have this because nobody but Apart from the article what also
require (or use) processors or other suf- the ISO C committee programs in caught my eye is the short biography at
ficiently complex logic that require or C99). the end of it saying “recently laid off
are best programmed by higher-level, But the disadvantages weight heav- firmware engineer with 15+ years of
perhaps OO languages. For example, ier in my opinion. experience with lots of time in hand.”
my Atmel 8-bit designs are all done in —Daniel Lundin Just goes to show the kind of talent that
C, not because it’s the only language Posted on Embedded.com’s forum is sitting idle...scary!!!
available for the Atmel AVR’s (assem- (Daniel Lundin’s comments continue —Saurabh Gandhi
bler and Forth are others of which I’m online in forum at bottom of the article Embedded Software Engineer
aware) but because it’s readily available, at www.embedded.com/218600142.) Posted on Embedded.com’s forum
has a high-enough level of abstraction
to make many functions easy to write Real men only program in two lan- I think that the brief critique of the ar-
but enough hardware manipulation to guages and they both begin with A, As- ticle “Build the Super Simple Tasker”
handle the basic peripherals of the de- sembler, and Ada. Why don’t you see (www.embedded.com/190302110) is not
vice. When I wrote a Windows GUI- more non-military systems developed fair. All preemptive, priority-based ker-
based configuration application for one in those languages? Cause there aren’t nels work the way described in the SST
of our electronic advance ignition sys- enough real men out there to go article, that is, the higher-priority tasks
tems, I used C#, because it was a good around. have always precedence in accessing the
fit for that kind of system. I think we’ve —William Thomas CPU before the lower-priority tasks.
reached the point where we need to Posted on Embedded.com’s forum Starvation is only a problem when
start differentiating the complexity/ high-priority tasks take up too much of
memory/cpu aspects of embedded sys- Maybe that should be “Real old men the CPU, but this means that the sys-
tems before asking the question about program in C.” Anybody suffering from tem is overloaded. Also, it is not true
what language we use in writing the the delusion that C is the only viable that the SST kernel requires state ma-
software. New terms, anyone? “high-level” language for embedded de- chines. In fact, the example code pro-
—David Telling velopment should have a good hard vided with the SST article (ftp://ftp.em-
Posted on Embedded.com’s forum look at Oberon-07. (www.inf.ethz.ch/ bedded.com/pub/2006/07samek/sst.zip)
personal/wirth/Articles/Oberon.html) did not use state machines at all. The
People don’t use C because it’s a good It is as powerful, if not more so, article merely mentions state machines
language, people use C because it is the than C but is much less prone to hu- because they are a natural fit for the
least evil option. For embedded real- man error. kernel of this type.
time systems, you really only have the —Chris Burrows —Miro Samek
choises listed: C, C++, or assembler. Development Manager (Read the rest of Miro Samek’s comments
Assembler will of course be used at CFB Software and the author’s response on the Embed-
some extent “inline”, but to write whole Posted on Embedded.com’s forum ded.com at www.embedded.com/forums.)
Microcontroller
Development Kits
C and C++ Compilers A/D I/O Parts Debug
Converter Run-Control
Examples and Templates
keil.com
1-800-348-8051
programming
By Dan Saks
pointers
Allocating and deallocating arrays, in detail
!
a program allocates an object, it not only allocates stor-
age for the object, but also initializes that storage with a not just
value appropriate for the type of object that will occupy
that storage. When a program just allocates storage, it
array storage,
leaves that storage uninitialized.
I followed those articles with one that explained the dis-
tinction between deallocating objects and deallocating stor-
age.3 When a program deallocates an object, it releases not
! requires a little
advance planning.
only the storage occupied by the object, but also any other Then a new-expression such as:
resources the object was using.
In each of those articles, I sketched out how C++ com- pw = new widget ();
pilers translate new-expressions into more primitive opera-
tions. I also showed how to write C code that emulates the translates more-or-less into something like:
behavior of new-expressions. However, I stalled out when I
got to array delete-expressions. I also left some details out pw = static_cast<widget *>
of the code for both the C++ implementation and the C (operator new(sizeof(widget)));
emulation of array new-expressions. This month, I’ll fill in pw->widget();
most of the missing pieces.
The first statement acquires storage for a widget object by
A RECAP calling operator new, and converts the address of that
New-expressions in C++ allocate objects. Each new-expres- storage from type void * to type widget *. The second
sion is conceptually, if not actually, a two-step process: (1) statement initializes the storage by applying widget’s de-
allocate storage for an object, and (2) initialize it. For ob- fault constructor. (That second statement—an explicit con-
jects of class types, initializing an object usually involves structor call—is not something you can actually write in
calling a constructor. C++.)
For example, suppose class widget is defined as: Delete-expressions in C++ deallocate objects. Each
delete-expression is also a two-step process: (1) release re-
class widget sources that the object was using, and (2) deallocate the
{ storage for the object. For objects of class types, releasing
public: resources involves calling a destructor.
widget(); // a constructor If pw is a pointer to an object of class type widget, a
~widget(); // a destructor delete-expression such as delete pw; translates more-or-
// ... less into something like:
};
if (pw != NULL)
{
pw->~widget();
Dan Saks is president of Saks & Associates,
a C/C++ training and consulting company. operator delete(pw);
For more information about Dan Saks, visit }
his website at www.dansaks.com. Dan also
welcomes your feedback: e-mail him at
dan@dansaks.com. A delete-expression applied to a null pointer does noth-
free(pw); inline
void delete_widget(widget *pw)
merely deallocates the storage for a widget, without any re- {
gard for any additional resources that the widget may have if (pw != NULL)
been using. {
Although C doesn’t have classes with constructors and widget_destroy(pw);
destructors, you can emulate them by using structs and func- free(pw);
tions.4,5 For example, you can implement a C++ widget class }
as a C struct: }
You can mimic the behavior of an array delete-expression and then compute the address of the first element in the ar-
as a function declared as: ray itself:
but the implementation isn’t as straightforward as it is for The allocated array is an array of widgets, but ps is a point-
new_widget_array. Whereas the array dimension appears er to a size_t, so new_widget_array needs a cast to obtain
explicitly in an array new-expression, it never appears in an a pointer it can use to access the array elements:
array delete-expression nor in the declaration of
delete_widget_array. Each array delete-expression speci- pw = (widget *)ps;
fies the address of (the initial element of) the array, but not
the array’s dimension. The delete-expression and Altogether, the new version of new_widget_array looks like:
delete_widget_array have to obtain the array dimension
another way. widget *new_widget_array(size_t n)
{
widget *pw = NULL;
Storage layout for a dynamically allocated array. size_t size = sizeof(size_t)
+ n * sizeof(widget);
The array new-expression places
the array dimension in this size_t size_t *ps = (size_t *)malloc(size);
location just before the first if (ps != NULL)
array element
{
widget
widget *p;
The array new-expression
returns the address of this *ps = n;
location as the address of pw = (widget *)++ps;
the initial (the 0th) array element widget
for (p = pw; p != pw + n; ++p)
widget_construct(p);
}
widget
return pw;
}
Figure 1
CONTINUED ON PAGE 38
Getting in touch
with capacitance
sensor algorithms
I
BY JOHN CAREY
Sensors are at the heart of these jected capacitive technology, and it’s
systems. They sense the environment used in the most advanced capacitive
and user behavior, enabling the prod- touchscreen solutions. Figure 1 shows
uct to respond in an intuitive but reli- and example of how a projected capaci-
able way. However, the sensor films tive touchscreen works.
themselves aren’t intelligent. They don’t This is not to say that the sensors
even collect data. They only sense. They themselves are not complex. On the
aren’t capable of differentiating be- contrary, a capacitive touchscreen sen-
tween useful and useless data or dis- sor consists of a large array of indium
criminating between the quality of dif- tin oxide (ITO) conductors on one or
ferent types of inputs. more layers of glass or polyethylene
Truth be told, these sensor films terephthalate (PET) plastic. Figure 2
hardly sense at all. They really just proj- presents an example of a touchscreen
ect an electric field created by an intel- sensor construction.
ligent capacitive sensing chip. This type The good optical clarity and low re-
of capacitive sensing is known as pro- sistivity of ITO make it the perfect con-
!
Farads (109 Farads). techniques leave
This situation makes
SNR by using a pair of the charge lines
the sensing environ- sensing electrodes for hot (sensitive to
ment challenging the touch) during
and mandates an ex-
ceptionally high
SNR. Charge trans- ! each capacitive channel.
One is a transmit elec-
signal conversion.
The current on
the sensor edge
fer technology is well
suited to high SNR
capacitive sensing
systems. It allows the
capacitive system to
! trode, the other the
receive electrode.
wiring can be in-
cluded as part of
the position cal-
culation, intro-
ducing positional
sense minute changes in capacitance— inaccuracy to the measurement.
even from a finger as it approaches the The contribution of the edge
phone before it touches it or from the wiring increases with the length of the
touch of a fingernail. routing between the sensor and the
Charge transfer technology enables driver chip and becomes seriously
Field coupling
Dielectric
front panel
Drive pulses
Figure 1
Join us September 15th for another chance to chat live, at our Don’t miss out on your chance to
chat with experts about Intel
FREE virtual trade show, with experts from all corners of technologies and innovation in
our industry. This is a great opportunity for you to get expert intelligent, connected devices.
advice and expand your resource network. If you are interested You’ll find:
• New videos and white papers
in embedded solutions, this is the show for you. • Two Intel executive keynotes
• Seven intriguing courses
• Unlimited networking opportunities
09.15.09
7 4
Learn more and register today at intelembeddedevent.com
Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and other countries. ©2009 Intel Corporation. All rights reserved.
cover feature
problematic if the distance exceeds a entire row or column for capacitive In contrast, mutual capacitance
few centimeters. change. measurement uses an orthogonal ma-
The charge transfer technique Self capacitance works OK for sin- trix of transmit and receive electrodes
holds the receive lines at zero potential gle-touch systems, but with multi- arranged as an array of multiple small-
during the charge acquisition process touch systems there is no way to re- er touch nodes created by the geome-
and solves this problem, effectively re- solve the positional ambiguity that try of the electrode structure.
stricting the transfer of charges to results from more than one simultane- In a mutual capacitance based sys-
those between the transmitter X and ous touch on different parts of the tem, each touch is uniquely detected as
receiver Y electrodes at the point of in- screen. an XY coordinate pair, whereas in a
terest in the main sensor area. For example, if a user touches on self capacitance system, the detection
This “charge-transfer” signal-acqui- the capacitive grid at locations X1, Y1 of X and Y coordinates of a touch is
sition technique uses individual resis- and X2, Y2, the energized lines simply independent.
tive one-dimensional stripes to create a tell the chip that X1, X2, Y1, Y2 lines If two touches are present in a mu-
touchscreen. These stripes can be read tual capacitance system, this would be
!
either in parallel or sequentially, since detected as (X1,Y1) and (X2,Y2),
the connections to these stripes are in- Charge-transfer signal whereas in a self-capacitance system
dependent of one another. There is an acquisition, combined with it would be detected as
interpolated coupling between adja- (X1,X2,Y1,Y2), leaving two potential
cent lumped electrode elements and
an object such as a finger.
The charge-transfer technique re- ! a mutual-capacitance meas-
urement, provides a superi-
combinations of coordinates. The
self-capacitance ghosting problem is
exponential and becomes impossible
!
stricts signal acquisition to the imme- or SNR and better tolerance to solve as you transition to three or
diate vicinity where a row and col- more touches.
umn electrode couple to each other. to parasitic capacitance A mutual capacitive array is inter-
This localized coupling means that all preted as a complete touch surface
other parts of the row and column that maintains the ability to resolve
are largely not touch sensitive at the have all been touched. It doesn’t know multiple touch points within each in-
time the signal is acquired, literally en- the combination thereof. It could be dividual “small” screen. Because the
abling true, unlimited multi-touch ca- that the chip reports X1, Y2 and X2, Y1 capacitive coupling at each point in
pability.1 Figure 3 shows an example of were the touch locations. This problem the matrix can be measured independ-
a charge transfer. is known as ghosting. ently, it means that there is no ambi-
Another problem with self-capaci- guity in the reported coordinates for
MUTUAL VS. SELF CAPACITANCE tance touchscreens is the snapping ef- multiple touches. It is then technically
There are two approaches to determin- fect. It happens when tracking two possible to have unlimited touch
ing finger position with a projected ca- touches moving towards a shared row recognition. Figure 4 compares mutu-
pacitive touchscreen: measuring self or column electrode; the reported co- al vs self capacitance.
capacitance and measuring mutual ca- ordinates tend to “snap” to that elec- Charge-transfer signal acquisition,
pacitance. Touchscreen solutions that trode causing a strong nonlinearity combined with a mutual-capacitance
measure self capacitance measure an and poor user feel. measurement technique, provides a
superior SNR and better tolerance to
Touchscreen sensor construction. parasitic capacitance, allowing weak
signals, such as capacitance conducted
through a fingernail, coin or stylus, to
be processed.
Layer1 ITO (Y)
SENSOR RESOLUTION
εr_panel Sensor resolution, the ability to a re-
Tpanel
εr_adhesive solve passive conductive stylus, can be
Tadhesive
εr_substrate Tsubstrate
directly linked to the electrode pattern
εr_adhesive Tadhesive
or ITO sensor design. A high-resolution
εr_substrate pattern can be formed by having an ar-
ray of vertical transmit bars separated
Layer2 ITO (X) by a dielectric to a second layer, which
Figure 2
Figure 4
Threshold
Reference
Output
Figure 5
!
1.6 GHz and 1 GB DDR2 SDRAM,
-40°C to +85°C – extreme reliability mands to the On its own, a capacitive curs.
for rugged and safety-critical phone by just Gesture pro-
applications. using it: grip- touchscreen sensor has no cessing algorithms
!
ping its edges or that calculate and
Highest Performance…XM2
pressing it to
idea what is touching it or interpret the XY
with Intel® CoreTM2 Duo up to
2.26 GHz and 4 GB DDR3 SDRAM, his/her ear or why. It cannot distinguish coordinates of a
face. stream of physical-
!
0 to +60°C – powerful graphics and
computing for demanding tasks. Some of the between a finger, ear, face, ly present data
“extra” touch from each of the
Robust ESMexpress® Standard
points in a true
elbow, or butterfly. 10 unique touch
EMC-proof housing for conduction
and convection cooling, shock and multi-touch so- points to execute
vibration resistant connectors and lution can be assigned to unintended gesture commands such as tap, drag,
the small 95 x 125 mm format touches. Suppressed touches must be drop, zoom, rotate, or flick—based on
(ANSI-VITA 59 in process).
tracked and stay suppressed even if the speed of the gesture and the XY po-
Rely on MEN for rugged computer
they stray into the active region. sitions in the data stream.
boards and systems in harsh, mobile This means the controller must be Another potential use of the under-
and mission-critical environments. able to uniquely and unambiguously lying many-touch data is to recognize
resolve, classify, and track many touch- shapes on the touch surface. This al-
es at once. This enables a user to com- lows all kinds of potentially useful in-
fortably hold a small product with terface enhancements. Basic shape
some amount of finger/screen overlap, recognition for a nose, cheek, or even
while also allowing the touchscreen to an ear allows further suppression of
operate normally. real-world situations that would other-
Face and grip suppression algo- wise falsely trigger the touchscreen.
MEN Micro, Inc.
24 North Main Street rithms can be used that identify and re- As more touches can be uniquely
Ambler, PA 19002 ject unintentional input from the user’s identified and reported to the host, the
Tel: 215.542.9575
E-mail: sales@menmicro.com
face or ear or from fingers gripping the applications will start making use of
www.ESM-express.com edges of the phone. Grip suppression is multiple touch data.
!
in the row to column coupling capaci- troller chips that can deliver high chan-
tance. The way the controller performs
sensors requires nel density, a high SNR, and a multi-
the measurement has a strong influence innovative algorithms . . . touch capability. ■
on the susceptibility of the controller to
external noise. John Carey, director of Marketing Touch
Technology at Atmel Corp., has a masters in electrical engi-
One common noise generator encountered with touch- neering from California State University, as well as a bachelors
screens is the LCD itself. It often has voltage transients meas- in electrical engineering from Arizona State University. You
ured as several volts with rise/fall times measured in mi- may reach him at John.Carey@atmel.com.
croseconds. Using the right type of capacitive-to-digital
conversion and noise suppression algorithms, it’s possible to ENDNOTES:
reject most of the noise at source. 1. “Charge Transfer Capacitive Position Sensor.” U.S. Pat. No. 7,148,704,
Another approach is to use a sensor electrode pattern December 12, 2006.
that uses two ITO layers but is self shielding from behind. 2. Capacative Position Sensor United States Patent Pending
This approach saves cost by eliminating the need for an extra 20080278178 , November 13, 2008.
shield layer of ITO while still renderings the sensor immune 3. Hybrid Capacitive Screen Element, United States Patent Pending
to the noisy LCD surface. 20070247443 October 25, 2007.
The second most problematic noise source is found with 4. Hybrid Capacitive Screen Element, Patent Pending 20070247443
“floating” power supplies that often capacitively couple several October 25, 200.7
hundred volts of distorted 50/60-Hz waveform relative to 5. Capacitive Position Sensor. U.S. Pat. No. 6,288,707, September 11,
earth, into the entire touchscreen device. When a user touches 2001.
the device, the sensor effectively becomes part of a capacitive 6. Adjacent Key Suppression—U.S Patent 6,993,607, January 31, 2006.
voltage divider, contaminating the measurements with huge
amounts of low-frequency noise. Again, with clever chip design
and noise suppression algorithms can eliminate this effect.
CALIBRATING TOUCH
Although many touchscreen solutions require the factory
and/or the end user to calibrate them before use, solutions are
available with self-calibration algorithms that allow the chip to
operate independently of any user or manufacturing calibration.
Signal drift can occur because of changes in the un-
known electrode capacitance and Cs sampling capacitors
over time, often resulting from changes in temperature or
humidity, and causing false detections, non-detections, and
sensitivity shifts.
Drift compensation algorithms compensate using a
slew-rate limited change to the reference level; the threshold
and hysteresis values are slaved to this reference. Once an
object is sensed, the drift compensation mechanism ceases
since the signal is legitimately high, and therefore should not
cause the reference level to change.4,5,6 Figure 5 illustrates
drift compensation.
Complex multicore processors are upon us. With the right open-source tools and
a commercial RTOS, they don’t have to be monsters to program.
T
BY JIM TURLEY
urn the clock back 10 years. Windows Vista was still on the
horizon; Intel’s processors were single-core Pentium designs;
Chrysler and General Motors were still going concerns; and
Google was just a moderately popular search engine. It was
also the time that hints of a rumored “super chip” first began
!
lines. Drop a data packet and you’re A NINE-HEADED BEAST
dead—just like first-person shooters. In At first blush, Cell looks like a big Pow- high-end CPU in its own
networks, there are no do-overs. erPC chip. Coming in part from IBM,
Both types of systems also consume that’s understandable. But the 3.2-GHz
right, on par with the
high-end processors and high-speed
memories at a surprising rate. While PC
performance has leveled off, game con-
soles and network boxes are still shoot-
ing up the performance charts. PC users
PowerPC processor core is the least in-
teresting part of Cell, and accounts for
barely 10% of the chip’s silicon and a
fraction of its massive computing pow-
er. In contrast, half the chip is dedicated
! PowerPC “master”
processor.
may swoon over dual-core processors to eight identical and oddly named have their own SPE instruction set
and multitasking operating systems, but Synergistic Processor Elements, or SPEs that’s unique to Cell. Each SPE is a
any kid with a PlayStation 3 can beat (see Figure 1). massive 128-bit single-instruction,
that with a 9-processor smackdown. No mere coprocessors these, each multiple-data (SIMD) vector-process-
Bring it on, Poindexter. SPE is a serious high-end CPU in its ing machine, meaning it executes one
That’s why video games and net- own right, on par with the PowerPC instruction at a time but can “broad-
work systems both lead the way in in- “master” processor. The SPEs don’t exe- side” multiple math operations across
teresting combinations of killer hard- cute the PowerPC instruction set; they wide data values. This is typical of vec-
ware and real-time software. Their
demand for performance is essentially
infinite: if you build a faster box, it will Block diagram of Cell Broadband Engine chip. The central 3.2-GHz
find a ready market. And the volumes PowerPC processor core is surrounded by eight identical SPE
are large enough to justify serious en- (synergistic processor element) vector processors, which provide
gineering expense and software-devel- most of the chip’s power.
opment time. That means developers
in both of these markets need to make
their systems (a) faster than last year’s
box; (b) cheap enough to build in high SPE1 SPE3 SPE5 SPE7 I/O
XDR MIC
volume; and (c) reliable enough that Mem
you don’t lose money on yield, recalls LS LS LS LS
XIO (265 KB) (265 KB) (265 KB) (265 KB)
or repair. In short, it’s just like every 25.6 GB/s
Memory
I/O
interface
other embedded-system development, controller
Flex
IO1
but with higher stakes. And cooler DMA DMA DMA DMA
prototypes.
This price/performance equation
also explains why IBM, Sony, and
Toshiba each spent hundreds of mil- Total
EIB is 4 ring buses up to 96B per clock, 2 in each direction
76.8 GB/s
lions of dollars and collaborated for
years to create Cell: a wickedly fast and
astonishingly complex multiprocessor
chip for . . . video games. I/O
PPE SPE0 SPE2 SPE4 SPE6 Flex
Actually, Cell is for more than just IO0
games. Its creators wouldn’t have spent L1 (32 KB I/D)
LS LS LS LS
all that time and money concocting a (265 KB) (265 KB) (265 KB) (265 KB)
chip that only Sony could use. Instead,
Cell was devised to handle all sorts of L2 (512 KB)
!
from shared clusion. In a paper
Powered by a
memory. With nine fully capable presented at an IEEE
250 MHz ARM9 CPU Instead, each conference on inter-
SPE fetches and
processors, an ambi- connects, a team of
!
Low power, fanless, < 2 watts
64MB DDR-RAM
executes code tious (or masochistic) Sony programmers
from its own local described an interest-
4MB NOR Flash
memory, staying programmer could ing embedded use of
!
Micro-SD Card slot - SDHC
off the internal the Cell processor.1 It
USB 2.0 480Mbit/s host (2) slave (1)
and external bus-
conceivably partition seems the company
10/100 Ethernet es as much as the Cell processor into wanted to add high-
!
Boots Linux in less than 3 seconds possible. Each speed Ethernet to one
Customizable FPGA - 5K LUT SPE can fill or nine different software of its upcoming con-
Power-over-Ethernet ready purge its local sumer-electronics
Optional battery backed RTC store to/from off-
environments. products.
Watchdog Timer chip memory The developers
8 TTL UART anytime it wants to. As long as each wanted to get as close to 10 Gbit/sec
33 DIO, SPI, I 2 C SPE’s program fits into 256K of code “wire speed” as possible, while still us-
and data space, life is good—but there- ing a TCP/IP stack for compatibility
Dev Kit provides out-of-box in lies the challenge. and overall ease of development.
development + extra features They’d initially planned to run Linux
IT’S FREE, BUT IT’S NOT CHEAP on Cell’s central PowerPC processor for
Over 20 years in business If you’re a numbers geek, Cell’s per- all the usual reasons: Linux is royalty-
Never discontinued a product formance numbers are impressive. free, it’s customizable, it supports net-
Engineers on Tech Support Adding it all up, the chip has a theoreti- working, and it’s already been ported to
Open Source Vision
cal peak computational arsenal of just PowerPC. PowerPC chips are common
over 230 billion floating-point opera- in networking so the whole process
Custom configurations and designs w/
excellent pricing and turn-around time tions per second. That’s mainframe or seemed pretty straightforward.
Most products ship next day supercomputer territory. Indeed, IBM’s Then the project hit its head on the
first uses of the chip were in its System low doorway of reality. First off, the
z9 mainframes and the $133 million Sony team discovered that the PowerPC
Roadrunner supercomputer. wasn’t fast enough to handle 10-Gbps
Technologic
S Y S T E M S
Surely a chip this awesome can run Ethernet traffic after all. At least, not
a heavyweight operating system? You while running Linux. So they decided
We use our stuff.
betcha—in fact, it can run several. to shift the networking stack onto one
visit our TS-7800 powered website at
There’s no rule that says the PowerPC of the chip’s eight SPEs. Clearly an SPE
www.embeddedARM.com
needs to run the same RTOS as the would be up to the task. If one SPE can
(480) 837-5200
SPEs, or that the SPEs all need to run crunch a billion floating-point opera-
!
maximum performance at minimum vantage of the SPE’s SIMD architecture,
cost. Performance would suffer because
Instead, the Sony team sticking with the standard scalar code.
the Linux code (running on the Power- abandoned Linux in favor After some performance tweaking (de-
PC) would need to load and unload tailed below), they came away quite
portions of the driver, performing
processor-mediated DMA transfers like
an awkward software cache. And cost ! of a royalty-free commer-
cial real-time operating
happy with the results.
The Linux distribution for Cell
treats the SPEs as virtualized resources,
would suffer because Sony’s engineers
would have to include more off-chip
memory to hold all that code.
Instead, the Sony team abandoned
Linux in favor of a royalty-free commer-
! system and TCP/IP stack
running on the SPE.
which means you can create more SPE
threads than there are SPEs. That’s a
nice feature, but it also means an SPE
thread might be swapped out while it’s
running. Such is the nature of context
cial real-time operating system and would, but for most embedded systems, switching. To prevent that from hap-
TCP/IP stack running on the SPE. that’s exactly the right tradeoff. The pening, the Sony team “pinned” the net-
Specifically, they chose ThreadX and its overall software structure is illustrated work stack to one SPE, effectively pro-
companion networking layer, NetX, in Figure 2. hibiting Linux from swapping it out and
both from Express Logic in San Diego. The only downside was porting. dedicating that SPE exclusively to net-
Like Linux, ThreadX is royalty-free but NetX wasn’t available for the SPE in- work processing.
unlike Linux, it fits easily within Cell’s struction set – but then again, neither Given the high packet rates Sony
256K memory constraint. was anything else. Sony’s engineers had was hoping for, frequent interrupts
Sony’s engineers decided to run Linux on the PowerPC processor core and use the ThreadX RTOS on the SPE
to handle networking. The combination of the two operating systems and processor architectures provided
better performance, and used less memory, than using a single operating system.
User space
Ring buffers
Communicate
Allocate via device file
RC-101 10-Gigabit Ethernet driver
Figure 2
!
pecially from the hardware interface space, as was the case here.
when it needs servicing. As data rates Given the high packet There’s never been a case where
climb, these interrupts (and their atten- rates Sony was hoping more code makes a processor run
dant context switching) become so fre- faster. Like racecars, high-performance
quent that the overhead overwhelms
the actual task. The faster it works, the
slower it goes. ! for, frequent interrupts
turned from being a
programs are tuned for light weight
and efficiency, with no extraneous fea-
tures. “Simplify and add lightness” is a
!
To fix this, the team decided to necessity to being a common phrase among racecar design-
switch from an interrupt-driven to a ers, and a similar philosophy prevails
software-polled design. They kept the problem. among embedded designers. “It can’t
same hardware components but just break if it’s not on the car,” might be
tweaked the network driver to poll the another useful axiom.
chip at regular timer-tick intervals. The WHEN LESS IS MORE Although richly appointed, fully
resulting efficiency was dramatic. Be- Sony was optimizing for speed, was featured network stacks are fine when
cause the SPE is dedicated to network- limited by hardware constraints, and you’re designing for “big iron,” they
ing and doesn’t have a plethora of sys- needed only a certain well-defined fea- only make sense if you need the full
tem-level functions to look after, it can ture set. Sound like a typical embedded repertoire of network operations. Oth-
focus on the task at hand without fear application? In situations like this, a erwise, all those other features are dead
of being interrupted and missing a smaller software TCP/IP stack with a weight. Most TCP/IP stacks assume the
packet. So paradoxically, this modern reduced feature set can process packets presence of, and rely on, an operating
high-speed network interface relies on and decode headers with minimal over- system scheduler to manage threads for
packet processing, buffer management,
and communication with the host
processor. That’s only natural, because
Your solution
network management is generally an
add-on to some existing operating sys-
tem. Whether it’s Unix, Linux, Vx-
Works, Windows, or whatever, the op-
!
in Sony’s case) team feels there’s a lot more perform-
As a side note, the same minimalist
As frightening as Cell ance and code efficiency still to be
philosophy also applies to graphics. Al- might appear, it’s actual- found in this combination of hardware
!
though Sony isn’t saying much about and software.
it, it’s safe to assume that this particu- ly an easy beast to tame. So as frightening as Cell might ap-
lar project includes some interesting pear, it’s actually an easy beast to tame.
graphics with some sophisticated num-
. . . Cell is proving itself Between its open-source development
ber-crunching. Cell is the ideal chip for
this, after all. But this tends to rule out
the “traditional” Linux approach, for
all the same reasons we just explored.
One or more SPEs running specialized
! as an unusually accom-
modating platform.
tools, commercial and open-source
RTOS options, and fearsome hardware
resources, Cell is proving itself as an
unusually accommodating platform for
networking, encryption, media pro-
code will probably do a far better job with unknown, non-network tasks. You cessing, gaming, floating-point acceler-
than dumping the task on the central can ignore interrupts, turn off task pre- ation, and even supercomputing. Com-
PowerPC processor. More and more, it emption, and eliminate mutexes and plex multicore processors are upon us;
looks like the right way to exploit Cell’s other exclusion processing. All of which it’s good to see that they don’t have to
massive processing power is to divide the Sony team did. be monsters to program. ■
and conquer, not to throw everything They also aligned the TCP/IP stack’s
at the chip and let it power its way data structures. Like most RISC proces- Jim Turley is an acknowledged authority
on microprocessor chips, embedded sys-
though. sors, the SPE has no instructions for ac- tems, semiconductors, and intellectual
cessing misaligned data; it assumes all property licensing. He is the author of
TWEAKING FOR FUN AND PROFIT operands are aligned on natural bound- seven books, was past editor of the Mi-
Once Sony’s engineers decided to dele- aries, which in this case is 128 bits. Ac- croprocessor Report, was editor in chief
of Embedded Systems Design magazine,
gate all the networking functions to a cessing misaligned operands requires and is currently publisher of Silicon Insid-
single SPE (as opposed to running multiple instructions, so code size can er. Contact him at http://jimturley.com.
some or all of it on the parent PowerPC bloat pretty quickly when you’re access-
processor), they could make some other ing lots of misaligned data structures— Endnotes:
1. “Network Processing on an SPE Core in
optimizations, too. For example, once exactly like the network stack would. A
Cell Broadband Engine,” 16th IEEE Sym-
you know your processor will handle quick application of the gcc alignment
posium on High Performance Intercon-
network traffic and only network traf- attributes shrunk the code size by 21%, nects, 2008; www.hoti.org/archive/2008pa-
fic, you no longer have to cooperate at a slight cost of data size. pers/2008_S4_3.pdf
A brief “no-bull” tutorial on how virtualization actually works and where it is most useful.
Is virtualization right
for your application?
A
BY CASEY WELTZIN
!
VMM cannot allow individual VMs to Instead, each operating system can
independently execute “privileged in- The basic goal of virtualization run independently as long as priv-
structions” such as accessing memory is to run multiple operating ileged instructions are not execut-
or I/O devices that could potentially ed. Next, by partitioning memory
conflict with other VMs accessing the
same resource.
Note that there are two basic cate- ! systems in parallel on one
computer such that no
between operating systems and
configuring individual operating
systems to access a certain block of
Bare-metal virtualization software enables Sharing I/O devices between operating systems
engineers to run multiple operating systems requires a VMM driver and can impact performance.
in parallel on one set of computing hardware.
General-purpose OS Real-time OS
OS 1 OS 2 OS n
VMM software
Figure 2
Figure 1
! Though virtualization is a
promising technology that
•
•
Combining real-time processing and a graphical user interface on
one set of hardware.
Incorporating a wide variety of communication protocols and pro-
Register Today.
embedded.com/boston
Use code ESCBPT
Proud sponsors of the Build Your Own Embedded System 2009 Hynes Convention Center
ESC paper
Seamless integration
of multicore
embedded systems
E
BY GIUSEPPE DE SIMONE, PAOLO PIERANI,
AND MASSIMO QUAGLIANI
!
ed at the end of the paper is a real should stop making faults at all!).
project where the multicore nature
deals with the same problem:
of the platform has been exploited the project finds too many System development in small steps
!
to address the fault localization with The solution is split into very small
a minimum human troubleshooting severe faults and undesired system changes (let’s call them deltas).
effort. A regression test is performed to
Editor’s note: The application
characteristics too late, lead- ensure that the changes implemented
case just mentioned is not included in
this printing but will be available in
the full article online at www.embed-
ded.com/219400429. This article is
! ing to off-control quality and
expensive re-engineering.
in all different system components are
working and not harming legacy
functions and thus avoiding the big
bang delivery at the end of the project.
an excerpt from the paper prepared The benefits are many:
for ESC Class 261 (Seamless Integration accuracy and efficiency.
of Multicore Embedded Systems), part of
the debugging tract at the Embedded Sys-
The suggested approach is then to
develop software with a tight control
• Get frequent feedback on product
quality.
tem Conference, Boston. Massimo
Quagliani will be teaching the class on
on system changes and pursuing an
early feedback on quality by using con-
• Reduce complexity: by implement-
ing a small chunk of code you re-
September 22. tinuous planning and small integration duce the number and the complexi-
steps, in order to achieve predictability ty of the faults potentially
SMALL STEPS APPROACH and efficiency. introduced in that step (less and
Generally speaking, development of a The main principles in this soft- simpler faults, much faster to solve
complex software system usually deals ware-engineering model are: and fix).
with the same problem: the project
finds too many severe faults and unde- (1) Quality first.
• Track progress: frequent deliveries
provide objective evidence of
sired characteristics too late, leading to (2) System development in small steps. progress in the project.
off-control quality and expensive re-
engineering.
(3) Continuous system integration.
(4) Regression test before verification.
• Achieve efficiency: by doing things
frequently, people can learn lessons
Most developers experience that af- (5) Parallel test phases. and improve project performances.
ter the code is developed and the sys-
tem is integrated, suddenly nothing Quality first The basic goal is then to setup a
seems to work anymore (even those To achieve the desired software quality, software factory that runs and verifies
parts that were working before). The the correction of faults should have frequent deliveries of new system ver-
time and effort needed to get the sys- higher priority than introducing addi- sions to get quality feedback early with
tem quality and performance back to tional system changes, so that backlog an efficient use of resources.
!
Build procedure must be automat- ing the code is difficult to predict, espe-
ed and a smoke test is needed to ensure And even if this were not cially if the volume of software to be
basic functionalities of the system, in true, it’s good anyway to optimized is large and the amount of
order to reject failed components and assembly code to write is critical.
not to harm the integrated system.
A project anatomy (as sketched in
Figure 1) is used to show all planned ! let testers “play” with
the system, even only to
In this scenario, it’s important to
monitor the optimization activity and
take the right corrective action at the
development steps and how they de-
pend on each other, from test, integra-
tion and design perspective: it is a very
important tool to find the most effi-
cient way to implement a given set of
! get rid of as many bugs
as possible.
right time in order to avoid any im-
pacts on the project deadline.
Profiling your code is another fea-
ture available to almost every real-time
debugger.
system changes. ed can be risky: the system stability The small-steps approach described
The dependencies define the order might not be mature enough, for in- here is well suited for this kind of activ-
in which the different deltas must be stance, to stand up to stress tests. That’s ity, where the metric can be measured
integrated and hence the implementa- not really the case: the assumption is at each step.
tion order: changes without dependen- that the two activities should find dif-
cies, for instance, can be developed in ferent faults. The problem of tracking progress
parallel with each other. And even if this were not true, it’s Estimating the final optimization grade
good anyway to let testers “play” with reached at the end of the project can be
Regression test before verification the system, even only to get rid of as done if you have access to historical
Once the code implementing a delta is many bugs as possible: it will be much data for assembly conversion and by
delivered, a regression test is run first to cheaper and faster to verify a less faulty studying algorithm-level optimization
secure that previous baseline has not system. techniques. It’s necessary to have access
been destroyed (whatever worked be- However, the whole model is really to a previous project’s information with
fore must keep on working), before ver- effective (and doesn’t risk becoming a a similar software application. For in-
ification of new functions starts. “nightmare” itself) only if it’s run on stance, optimizing estimations for the
A fully automated regression test each of the very small system changes, AMR-WB speech codec algorithm
suite is dynamically updated on system and quality gates are established before could be based upon the result ob-
growth, driven by project anatomy. The entering the different test phases in tained from the same activity on the
same approach is performed at every parallel. predecessor AMR-NB algorithm.
Solution
A solution of the tracking problem ex- ! to use techniques, such
as linear programming,
controlled development.
In this section, we have seen the
case of MIPS load optimization, but
!
ists. Of course, a linear law of the load similar considerations are valid also for
reduction is a wrong model and cannot
leads to a more con- memory optimization and, being a
be taken into account because the opti- trolled development. general approach, it could be applied to
mization degree depends on the kind of other kind of problems.
program flow in each function.
The correct model can be obtained amount of test at least in simulation CONTINUOUS INTEGRATION
solving a linear programming problem. environment in order to profile the op- As explained early, one of the key suc-
Let’s assume: timized functions as soon as they are cess factors of the method proposed in
ready to be integrated. this paper is a continuous integration
R = mean reduction factor (this is the of the step-wise delivered software to
estimated load reduction per chan- Iterative approach ensure an always-working system,
nel) The predicted curve of load reduction whereas verification activities at differ-
Y = clock cycles of the not optimized is measured at each step of the itera- ent levels are run in parallel, to get an
channel code after N frames tion. Deviations are allowed and the earliest and efficient quality feedback
yi = clock cycles of the i-th function ac- right actions are taken accordingly. As from different perspectives: coding, in-
cumulated after N frames (descents soon as the profiler returns the load re- terfaces, functionalities, robustness, and
excluded) duction of a released function, the esti- performances. ■
ri = reduction factor of the i-th function mated curve for the remaining steps is
(descents excluded) modified taking into account the meas- Giuseppe De Simone is a systems man-
ager, Paolo Pierani is a program man-
ures. The model is then updated with ager, and Massimo Quagliani is a sen-
So the following constraint is valid: the following constraints: ior software engineer, all with Ericsson
(Italy). The three authors joined forces in
the areas of embedded software design,
Σ (1 – ri) yi ≤ (1 – R)Y ri = ri* ∀ i∈ set of already systems, project engineering, and de-
optimized functions fined and implemented the strategy. You
Simplifying: 0 ≤ ri ≤ limit ∀ i∈ set of functions may reach the authors through massi-
mo.quagliani@ericsson.com.
to be optimized
Σ ri yi ≥ RY Note: This article is an excerpt of an ESC
With this approach, a feedback can class paper for ESC Boston, 2009. The full
The linear programming problem be received and evaluated upfront. Pos- article is available at www.embedded.
is obtained by minimizing the effort ex- sible corrective actions are: com/219400429
Photo: Tartaria Tablet (Amulet): Museum of: National Transylvanian History Museum di Cluj-Napoca, Period is
fingers, we’d count in hexadeci- The regular shapes of the
mal and non-geeks wouldn’t glyphs encoded in the clay sug-
puzzle over numbers that include gest that standardized writing
the letters A through F. But would had existed for some time. No
we still start at one instead of zero? one knows what the symbols
How often have you seen a mean, but a media that lasts
!
avoid the bad berries and saber- reduces the number of symbols need-
toothed tigers. Long before being From oral tradition and ed to express complex ideas from
committed to paper or papyrus, the clay tablets all the way thousands to 26. Fewer symbols
Bible was transmitted between genera- means more storage is needed to en-
tions by word of mouth. Matthew and
Luke’s begats most likely mirrored
how elders tracked their own family ! to modern memory
devices, Jack Ganssle
code an idea, but there’s no practical
limit to the things that can be de-
scribed. This remains a very diverse
!
text, which is fortunate as it has charged a buck a card, since they faded
the only known copy of the sage Computer centers used fan- away in the ’70s as other media became
of Syracuse’s The Method of Me- tastic quantities of punched more cost effective.
chanical Theorems. Paper tape, too, was initially used
I suppose one could make the
argument that the abacus was a
storage device, since, like the reg- ! cards. In the early 1970s,
the University of Maryland
for looms. Both Morse and Edison
worked on paper tape systems for teleg-
raphy, though their systems initially
!
isters in a CPU, it held numbers supplied unlimited quantities used marks made on the tape instead of
during a calculation. The Sumeri- holes. In the 1920s, various communi-
ans had this technology, in a to students for free. cations links using teletypewriters were
primitive form, nearly 5,000 years established. The infamous newsrooms
ago. The Romans called the limestone lating machine that used punched of yore with dozens of these clanking
pebbles used in their table abacuses cards, but he wasn’t the one to couple machines are an example. Prior to and
“calculi,” from which we derive the cards to computing. Russian Semen during World War II, the Teletype cor-
word “calculate.” Korsakov, a bureaucrat in a police sta- poration built some 200,000 of their
After the invention of paper in Chi- tistics department, anticipated Google model 15 teletypewriters (often called
na around the second century, not when he invented several machines that “teletypes,” just as copiers are referred
much happened to storage technology used punched cards to search though to as “xerox machines.”) These usually
for thousands of years. Paper remained data. But they remained a novelty in in- had a paper tape reader and punch at-
expensive and was hand-made until the formation processing until Herman tached with which to log and send
19th century, and indeed history Hollerith built machines to record data streams of messages. All of the model
records “rag pickers” who recycled old for the 1890 census. His company later 15 machines I have seen use a five-level
cloth for papermaking. morphed into IBM. That company sup- code derived from Baudot rather that
Most techies know that the ported a number of different kinds of the ASCII 8 or Unicode’s zillions com-
punched card long predated main- punched cards, but their 80-column mon today. Mechanical fingers probed
frames. Cards and paper tape were version remains the iconic image of the the holes across the tape and converted
originally adopted in France in the ear- technology. the pattern to a 5-bit parallel stream,
ly 18th century to control textile looms. My grandmother died years ago at which was sent to what looked exactly
(I would have thought that the idea of age 99, still furious at FDR (she couldn’t like a car’s distributor (for a five cylin-
punching holes in paper to store in- even say his name, always blurting out der car, that is). Five contacts were
structions and data stemmed from “that man!”) for creating Social Security swept by a rotor to convert the parallel
player pianos, but those didn’t come and other Depression-era programs. to serial.
around till over a century later.) She drew on Social Security for 34 years. Konrad Zuse in Germany used pa-
Charles Babbage designed a calcu- But FDR’s creation did drive a massive per tape to feed instructions to his Z1
!
emerging minicomputers. from the ’50s until superseded by
The machine had a built-in penny a bit, about seven orders of semiconductor memory in the
8-bit paper tape reader and magnitude more than what memory ’70s. Though early cores weren’t
punch that read tape at a blis- much smaller than a Cheerio,
tering 10 characters per sec-
ond. It’s interesting that the in-
credibly complex mechanical
mechanism of the ASR-33 was
! costs today. What other industry has
seen costs tumble so precipitously?
eventually sizes shrank tremen-
dously. Prices did too, falling to
about a penny a bit, about seven
orders of magnitude more than
much cheaper than the electronics Tape remained the mass storage of what memory costs today. Think about
needed to build a video terminal, so choice in the ’70s till supplanted by that—what other industry has seen
these machines were common in com- magnetic media. costs tumble so precipitously?
puter centers. The racket 50 of them Meanwhile, other forms of memory The Whirlwind machine men-
made in a terminal room cannot be were tried, used and abandoned. A tioned in the previous paragraph even-
imagined. ASR-33s were the first termi- complete list would take volumes, but tually had core memory, but initially re-
nals used by microprocessor develop- here are some of my favorites. lied on Williams-Kilburn tubes. These
ment systems. Today, we store programs and data were essentially CRTs that painted bits
in, among other things, active elements on the phosphor screen (some versions
Flash memory stick.
like transistors. That’s not a new con- didn’t bother with the phosphor coat-
cept. The vacuum tube is an active ele- ing). A metal plate on the front of the
ment as well, and was used in early screen sensed the charges. Typical
computers both as ALU and memory. Williams-Kilburn tubes could hold a
Of course, a tube is about the size of a few hundred to a thousand bits; those
skyscraper compared to 45-nm FETs, used in the Whirlwind stored 256 bits
and dissipates enormous amounts of each. Unfortunately, the tubes aged
heat. ENIAC stored twenty 10-digit poorly, couldn’t be scaled up to higher
numbers in ring counters. Every digit memory densities, and were very sub-
stored needed 36 tubes. ject to electronic noise.
Core memory came about either But they were a pretty cool idea.
from a paper by An Wang, whom old- And I’ve run out of room. More
timers recognize as the man behind next month! ■