Sie sind auf Seite 1von 21

c 2015 Mihai SIMA

SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Lesson 1: Introduction
Characteristics and design of embedded systems an introduction
Quality & performance metrics measurable features of an ES implementation
Processors for embedded systems
Custom embedded processor design
Comparison between ARM, Nios (Altera), MicroBlaze (Xilinx), 8051, 68HC11
Emphasize on ARM
Software optimization techniques
What is wrong with plain software
Profile driven compilation
Efficient C programming

38

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Outline
Embedded system definition
Embedded systems common characteristics
Examples of embedded systems
The desktop computer (PC)
Embedded system design process
Formalisms for embedded system design
Design metrics

39

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Embedded system definition


Hard to define. Nearly any computing system other than a desktop computer
A device that includes a programmable computer but is not itself a generalpurpose computer
U.S. Supreme Court Justice Potter Stewarts famous quote about obscenity:
I know it when I see it
is a useful, if incomplete, guideline about embedded system.
Despite the difficulty in strictly defining embedded system, an observer can
usually tell when a subject is an embedded system based on a number of
common characteristics

40

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Michael Barrs Embedded Systems Glossary


An embedded system is a special-purpose computer system designed to perform
a dedicated function
Unlike a general-purpose computer, an embedded system performs one or a few
pre-defined tasks, usually with very specific requirements, and often includes
task-specific hardware and mechanical parts not usually found in a generalpurpose computer
Since the system is dedicated to specific tasks, design engineers can optimize it,
reducing the size and cost of the product
Embedded systems are often mass-produced, benefiting from economies of scale.

41

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Embedded systems common characteristics


Single-functioned: repetitive execution of a specific task
Reactive and real time: continuously interaction with an environment, at a
speed imposed by the environment
Tightly constrained: very tight constraints on various design metrics
Programmable, but usually not user programmable
Usually low power, low size, and low weight
Low cost
An embedded system is not always a separate block - very often it is physically
built-in to the device it is controlling
42

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Examples of embedded systems


Simple appliances, such as washers and dryers
An appliance for a computationally intensive task, such as laser printing
A hand-held device, such as a cellular phone
An industrial controller in a factory
Telecommunications devices, such as modems
A safety-critical controller, such as an anti-lock brake controller in a car

43

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

The desktop computer (PC)


Provides medium performance for a large number of applications
PC is user programmable, thus the end user can adapt it to do virtually anything
Price is on the order of hundreds of dollars
Size and weight (much) larger than the ES counterpart
Power consumption is still significant
Operating systems running on PC are typically not real-time

44

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

The embedded world


The programmer is exposed to hardware itself
Floating-point operations are typically not supported in hardware
Floating-point constructs translate into whole routines
Fixed-point operations are highly recommended
Data-level parallelism is typically supported in hardware
Single Instruction Multiple Data (SIMD)
Instruction-level parallelism may also be supported
Pipelined processors
Specialized computing blocks (peripherals) are widely used
C language is the necessary evil
45

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Embedded system design process


Encompasses different levels of abstraction: requirements, specification,
structure, components, and system integration formalism is needed
We seek for an implementation that fulfills desired functionality design metrics
We have to find good and cheap solutions (not necessarily the best and the
cheapest) in short time (not necessarily the shortest time)
We have to look at the embedded systems from an engineering point of view:
adapt existing projects, use previous experience, and do not reinvent the wheel
We have to be able to speak a multitude of languages in order to describe
efficiently the complex ordering and causality relations between the inputs and
the corresponding outputs

46

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Formalisms for embedded system design


Why do we need a formalism for (embedded) system design?
Different design tasks at different level of abstraction
Usually is a complex task carried out by a heterogenous team
The members of the team should speak the same (formal) language
Unified Modeling Language (UML) (object-oriented)
The design is described as a number of interacting objects, rather than a few
large monolithic blocks of code
At least some of those objects will correspond to real pieces of hardware or
software in the system
Since UML is a language, it can be used for other design tasks as well, e.g.,
writing large software package
Using UML rather than presenting UML is of interest for the course You
have to read by yourselves: G. Booch, J. Rumbaugh, and I. Jacobson, The
Unified Modeling Language User Guide, Addison-Wesley, 1999
47

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Design metrics
Design metric = a measurable feature of a systems implementation
Common design metrics:

NRE cost
Size
Power consumption
Time-to-prototype
Maintainability
Safety

Unit cost
Performance
Flexibility
Time-to-market
Correctness
...

More details in F. Vahid and T. Givargis, Embedded System Design: A Unified


Hardware/Software Introduction, John Wiley & Sons 2001

48

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Design metrics (contd)


Non-Recurring Engineering (NRE) cost
One-time monetary cost of designing the system
Once the system is designed, any number of units can be manufactured
without incurring any additional design cost
Example: NRE cost for printing a book includes the typesetting cost
Time-to-market
The time required to develop a system to the point that it can be released
and sold to customers
Revenue

ise

Percent Revenue Loss =

D(3W D)
2W 2

100

ar

ke

tr

Market window = 2W
Delay = D

Beginning of
market
opportunity

End of
product
line
D
W

Example:
W = 6 months and D = 2 month
Percent Revenue Loss = 45%
49

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Design metrics (contd)


Performance and Flexibility

Assume a computing engine that cannot meet the performance requirements


Augment it with specialized computing units (e.g., MAC unit)
Specialized computing unit(s) means lower flexibility
Balance between performance and flexibility = fundamental trade-off in the
design of a computing engine

Power consumption
Specialized computing unit(s) means lower number of instructions
Lower number of instructions means use power for computation instead of
instruction issuing
Unit cost
Specialized computing units need additional silicon area
50

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Design metrics (contd)


There are so many design metrics
The design task is actually an optimization problem in a multi-dimensional space
Finding the optimum is a hot research/development area today
Given a problem (requirements and design tools), find the optimum solution
Given a problem build the design tools
Can the optimum solution be reached?
For our course we will assume a linear cost function of design metrics:
Cost function = K1 Performance + K2 Flexibility + K3 Power + ...
Modeling the system can be a complex task
51

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Performance metric
Performance = how long the system takes to execute a task
The most widely used design metric
Two main measures of performance:
Latency: the time between the start of the tasks execution and the end
Throughput: the number of tasks that can be processed per unit time
Speed-up: common method of comparing the performance of two systems:
speed-up of A over B =

speed of A
speed of B

To avoid confusion, say improve performance or improve execution time


(latency) instead of increase performance and decrease execution time
52

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Firmware Terminology
Firmware = executable software that is stored within a ROM
The software written for embedded systems is often called firmware
Not entirely correct
The term firmware was originally used for micro-programs written for micro
sequencers.
Later on, firmware was coined to indicate a functional replacement for hardware
on low cost microprocessors.
Firmware can be thought of as semi-permanent since it remains the same
unless it is updated by a firmware updater.

53

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

What we learned
Embedded systems are hard to define
Designing an embedded system is an engineering task
Embedded systems design process includes different levels of abstraction
A formalism for embedded systems design is most welcome
Many design metrics put a high pressure on the design
U.S. Supreme Court Justice Potter Stewarts quote about obscenity

54

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

About project
Why ARM processor?
It is widely used in embedded systems
There is a large amount of software
The ARM Company
It does not manufacture processor chips
It licenses an instruction set, that is, an architecture
There are many vendors that provide ARM chips
For ARM I can provide:
Cross-compiler (runs on an Intel-Linux box, generates ARM-Linux executable)
Simulator (runs on an Intel-Linux box)
Installing and using Linux is recommended for all students
55

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

List of available projects


My oppinion: the embedded systems market requires the following projects
Color Space Conversion (RGB-to-YCC and YCC-to-RGB)
Audio compression and decompression (A law, law)
Discrete Cosine Transform and Inverse Discrete Cosine Transform
Discrete Fourier Transform and Inverse Discrete Fourier Transform
RSA Cryptography based on Montgomery Multiplication
Matrix diagonalization and matrix inversion
FIR and IIR filtering
Hufmann encoding and decoding
Motion estimation
COordinate Rotation DIgital Computer (CORDIC)
56

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Project main goals


Write C code that implements a specific task using strictly fixed-point arithmetic
Fixed-point arithmetic requires a little bit of attention
Reduced dynamic range (example: with 8 bits we can represent at most 256
different values, so that the entire world is shrinked to 256 values)
Infinity cannot be mapped to a finite value, therefore it is the programmer
responsibility to determine the largest value to be represented within a
particular precision
Truncation and round-off errors should be of particular concern
Augment the ARM standard instruction set with a new instruction
Unfortunately, the compiler wont be able to detect the new instruction, and
therefore it is the programmer responsibility to explicitly instantiate the new
operation (for example, by means of assembly inlining constructs)
57

c 2015 Mihai SIMA


SENG 440 Embedded Systems. Copyright

Lesson 1: Introduction

Questions, feedbacks

?
58

Das könnte Ihnen auch gefallen