27-09-2012, 01:54 PM
Computers as Components
Computers.pdf (Size: 2.25 MB / Downloads: 34)
INTRODUCTION
In this chapterwe set the stage for our study of embedded computing system design.
In order to understand the design processes,we first need to understand how and
why microprocessors are used for control, user interface, signal processing, and
many other tasks. The microprocessor has become so common that it is easy to
forget how hard some things are to do without it.
We first review the various uses of microprocessors and then review the major
reasons why microprocessors are used in system design–delivering complex behaviors,
fast design turnaround, and so on. Next, in Section 1.2, we walk through the
design of an example system to understand the major steps in designing a system.
Section 1.3 includes an in-depth look at techniques for specifying embedded systems—
we use these specification techniques throughout the book. In Section 1.4,
we use a model train controller as an example for applying the specification techniques
introduced in Section1.3 that we use throughout the rest of the book.
Section 1.5 provides a chapter-by-chapter tour of the book.
COMPLEX SYSTEMS AND MICROPROCESSORS
What is an embedded computer system? Loosely defined, it is any device that
includes a programmable computer but is not itself intended to be a general-purpose
computer.Thus,a PC is not itself an embedded computing system,although PCs are
often used to build embedded computing systems. But a fax machine or a clock
built from a microprocessor is an embedded computing system.
This means that embedded computing system design is a useful skill for many
types of product design. Automobiles, cell phones, and even household appliances
make extensive use of microprocessors. Designers in many fields must be able to
identify where microprocessors can be used, design a hardware platform with I/O
devices that can support the required tasks, and implement software that performs
the required processing. Computer engineering, like mechanical design or thermodynamics,
is a fundamental discipline that can be applied in many different domains.
But of course, embedded computing system design does not stand alone. Many of
the challenges encountered in the design of an embedded computing system are
not computer engineering—for example,they may be mechanical or analog electrical
problems. In this book we are primarily interested in the embedded computer
itself, so we will concentrate on the hardware and software that enable the desired
functions in the final product.
Embedding Computers
Computers have been embedded into applications since the earliest days of computing.
One example is the Whirlwind, a computer designed at MIT in the late
1940s and early 1950s. Whirlwind was also the first computer designed to support
real-time operation and was originally conceived as a mechanism for controlling
an aircraft simulator. Even though it was extremely large physically compared to
today’s computers (e.g., it contained over 4,000 vacuum tubes), its complete design
from components to system was attuned to the needs of real-time embedded computing.
The utility of computers in replacing mechanical or human controllers was
evident from the very beginning of the computer era—for example,computerswere
proposed to control chemical processes in the late 1940s [Sto95]
Why Use Microprocessors?
There are many ways to design a digital system: custom logic, field-programmable
gate arrays (FPGAs), and so on.Why use microprocessors? There are two answers:
■ Microprocessors are a very efficient way to implement digital systems.
■ Microprocessors make it easier to design families of products that can be built
to provide various feature sets at different price points and can be extended
to provide new features to keep up with rapidly changing markets.
The paradox of digital design is that using a predesigned instruction set processor
may in fact result in faster implementation of your application than designing your
own custom logic. It is tempting to think that the overhead of fetching, decoding,
and executing instructions is so high that it cannot be recouped.
But there are two factors that work together to make microprocessor-based
designs fast. First,microprocessors execute programs very efficiently. Modern RISC
processors can execute one instruction per clock cycle most of the time, and highperformance
processors can execute several instructions per cycle. While there is
overhead that must be paid for interpreting instructions, it can often be hidden by
clever utilization of parallelism within the CPU.
The Physics of Software
Computing is a physical act.Although PCs have trained us to think about computers
as purveyors of abstract information, those computers in fact do their work by
moving electrons and doing work. This is the fundamental reason why programs
take time to finish,why they consume energy, etc.
A prime subject of this book is what we might think of as the physics of
software. Software performance and energy consumption are very important properties
whenwe are connecting our embedded computers to the realworld.We need
to understand the sources of performance and power consumption if we are to be
able to design programs that meet our application’s goals. Luckily,we don’t have to
optimize our programs by pushing around electrons. In many cases,we can make
very high-level decisions about the structure of our programs to greatly improve
their real-time performance and power consumption.As much as possible,we want
to make computing abstractions work for us as we work on the physics of our
software systems.