Professional Documents
Culture Documents
2
➢ Third, synthesis technology has advanced to the point that
synthesis tools have become commonplace in the design of digital
hardware. they allow the designer to describe desired processing in
a high-level programming language, and they then automatically
generate an efficient (in this case custom-hardware) processor
implementation.
➢ The second and third trends enable their unified design, by turning
embedded system design, at its highest level, into the problem of
selecting (for software), designing (for hardware), and integrating
processors.
5
Embedded systems overview
6
Embedded systems overview
7
A “short list” of embedded systems
Anti-lock brakes Modems
Auto-focus cameras MPEG decoders
Automatic teller machines Network cards
Automatic toll systems Network switches/routers
Automatic transmission On-board navigation
Avionic systems Pagers
Battery chargers Photocopiers
Camcorders Point-of-sale systems
Cell phones Portable video games
Cell-phone base stations Printers
Cordless phones Satellite phones
Cruise control Scanners
Curbside check-in systems Smart ovens/dishwashers
Digital cameras Speech recognizers
Disk drives Stereo systems
Electronic card readers Teleconferencing systems
Electronic instruments Televisions
Electronic toys/games Temperature controllers
Factory control Theft tracking systems
Fax machines TV set-top boxes
Fingerprint identifiers VCR’s, DVD players
Home security systems Video game consoles
Life-support systems Video phones
Medical testing systems Washers and dryers
9
An embedded system example -- a digital camera
Digital camera chip
CCD
lens
12
This example illustrates some of the embedded system
characteristics described above.
➢ First, it performs a single function repeatedly. The system
always acts as a digital camera, wherein it captures,
compresses and stores frames, decompresses and displays
frames, and uploads frames.
➢ Second, it is tightly constrained. The system must be low
cost. It must be small so that it fits within a standard-sized
camera. It must be fast so that it can process numerous
images in milliseconds. It must consume little power so that
the camera’s battery will last a long time.
➢ However, this particular system does not possess a high
degree of the characteristic of being reactive and real-time, as
it only needs to respond to the pressing of buttons by a user, 13
Design challenge – optimizing design metrics
14
Design challenge – optimizing design metrics
1. Unit cost: The cost of manufacturing each copy of the
system, excluding NRE cost.
2. NRE cost (Non-Recurring Engineering cost): The cost of
designing the system. Once the system is designed, any
number of units can be manufactured without incurring any
additional design cost (hence the term “non-recurring”).
3. Size: The physical space required by the system, often
measured in bytes for software, and gates or transistors for
hardware.
4. Performance: The execution time or throughput of the
system.
15
5. Power: The amount of power consumed by the system,
which determines the lifetime of a battery, or the cooling
requirements of the IC
6. Flexibility: The ability to change the functionality of the
system without incurring heavy NRE cost. Software is typically
considered very flexible.
7. Time-to-market: The amount of time required to design and
manufacture the system to the point the system can be sold to
customers.
8. Time-to-prototype: The amount of time to build a working
version of the system, which may be bigger or more expensive
than the final system implementation, but can be used to verify
the system’s usefulness and correctness and to refine the
system's functionality.
16
9. Correctness: Check the functionality throughout the process
of designing the system, and we can insert test circuitry to
check that manufacturing was correct.
10. Safety: The probability that the system will not cause
harm.
17
Design metric competition -- improving one
may worsen others
Power • Expertise with both software
and hardware is needed to
Performance Size
optimize design metrics
– Not just a hardware or
software expert, as is common
NRE cost – A designer must be
comfortable with various
CCD
Digital camera chip technologies in order to choose
A2D
CCD preprocessor Pixel coprocessor D2A the best for a given application
lens
and constraints
JPEG codec Microcontroller Multiplier/Accum
18
19
Time-to-market: a demanding design metric
20
Losses due to delayed market entry
delayed entry
On-time triangle, representing market
Market rise Market fall penetration
Delayed – Triangle area equals revenue
• Loss
D W 2W – The difference between the on-
On-time Delayed Time time and delayed triangle areas
entry entry
21
Losses due to delayed market entry (cont.)
On-time
delayed entry
• Percentage revenue loss =
Market rise Market fall (D(3W-D)/2W2)*100%
Delayed • Try some examples
– Lifetime 2W=52 wks, delay D=4 wks
D W 2W
– (4*(3*26 –4)/2*26^2) = 22%
On-time Delayed Time – Lifetime 2W=52 wks, delay D=10 wks
entry entry – (10*(3*26 –10)/2*26^2) = 50%
– Delays are costly!
22
NRE and unit cost metrics
• Costs:
– Unit cost: the monetary cost of manufacturing each copy of the system,
excluding NRE cost
– NRE cost (Non-Recurring Engineering cost): The one-time monetary
cost of designing the system
– total cost = NRE cost + unit cost * # of units
– per-product cost = total cost / # of units
= (NRE cost / # of units) + unit cost
• Example
– NRE=$2000, unit=$100
– For 10 units
– total cost = $2000 + 10*$100 = $3000
– per-product cost = $2000/10 + $100 = $300
23
NRE and unit cost metrics
• Compare technologies by costs -- best depends on quantity
– Technology A: NRE=$2,000, unit=$100
– Technology B: NRE=$30,000, unit=$30
– Technology C: NRE=$100,000, unit=$2
25
Three key embedded system technologies
• Technology
– A manner of accomplishing a task, especially using technical
processes, methods, or knowledge
• Three key technologies for embedded systems
– Processor technology
– IC technology
– Design technology
26
EMBEDDED PROCESSOR TECHNOLOGY
Processor technology involves the architecture of the computation
engine used to implement a system’s desired functionality. While
the term “processor” is with programmable software processors,
nonprogrammable, digital systems also called as processors.
27
The application requires a specific embedded functionality,
represented as a cross, such as the summing of the items in an array,
as shown in Figure. Several types of processors can implement this
functionality.
• Processors vary in their customization for the problem at hand
total = 0
for i = 1 to N loop
total += M[i]
end loop
Desired
functionality
28
General-purpose processors
• Programmable device used in a variety of
Controller Datapath
applications
Control
– Also known as “microprocessor” logic and
Register
file
• Features State register
general ALU
• User benefits Program
memory
Data
memory
– Low time-to-market and NRE costs
Assembly code
– High flexibility for:
29
Design-metric benefits in using a general-purpose processor in an
embedded system
➢ Design time and NRE cost are low, because the designer must
only write a program, but need not do any digital design.
➢ Flexibility is high, because changing functionality requires only
changing the program.
➢ Unit cost may be relatively low for small quantities, since the
processor manufacturer sells large quantities to other customers and
hence distributes the NRE cost over many units.
➢ Performance may be fast for computation-intensive applications,
if using a fast processor, due to advanced architecture features and
leading edge IC technology.
Design-metric drawbacks in using General purpose processors.
➢ Unit cost may be too high for large quantities.
➢ Performance may be slow for certain applications.
➢ Size and power may be large due to unnecessary processor
hardware. 30
Single-purpose processors
• Benefits
– Fast
– Low power
– Small size
31
Design metric benefits
➢ Performance may be fast
➢ Size and power may be small,
➢ Unit-cost may be low for large quantities
32
Application-specific processors
• Features Data
Program memory
– Program memory memory
– Optimized datapath Assembly code
– Special functional units for:
• Benefits total = 0
for i =1 to …
33
Design metric benefits
➢ Using an ASIP in an embedded system can
provide the benefit of flexibility while still achieving
good performance, power and size.
34
IC technology
• The manner in which a digital (gate-level) implementation
is mapped onto an IC
– IC: Integrated circuit, or “chip” is a semiconductor device
consisting of a set of connected transistors and other devices.
– IC technologies differ in their customization to a design
– IC’s consist of numerous layers (perhaps 10 or more)
➢The bottom layers form the transistors.
➢The middle layers form logic gates.
➢The top layers connect these gates with wires.
– IC technologies differ with respect to who builds each layer
and when
35
One way to create these layers is by depositing photo-sensitive
chemicals on the chip surface and then shining light through
masks to change regions of the chemicals. The narrowest line
that we can create on a chip is called the feature size, which is
well below one micrometer (sub-micron).
36
IC technology
• Three types of IC technologies
– Full-custom/VLSI
– Semi-custom ASIC (gate array and standard cell)
– PLD (Programmable Logic Device)
Full-custom/VLSI
All layers are optimized for an embedded system’s
particular digital implementationin which includes
➢ Placing the transistors to minimize interconnection
lengths,
➢ Sizing the transistors to optimize signal transmissions
➢ Routing wires among the transistors.
37
➢ After completing all the masks, the mask specifications
will be sent to a fabrication plant that builds the actual IC.
➢ Full-custom IC design, often referred to as VLSI (Very
Large Scale Integration) design.
➢ Usually used only in high-volume or extremely
performance-critical applications.
Benefits:
Excellent performance with small size and power.
Draw backs:
High NRE cost and long turnaround times (typically
months) before the IC becomes available
38
Semi-custom ASIC (gate array and standard cell)
• In an ASIC technology Lower layers are fully or partially
built
– Designers are left with routing of wires and maybe placing
some blocks. In a gate array technology, the masks for the
transistor and gate levels are already built (i.e., the IC
already consists of arrays of gates). The remaining task is
to connect these gates to achieve our particular
implementation
• Benefits
– Good performance, good size, less NRE cost than a full-
custom implementation (perhaps $10k to $100k)
• Drawbacks
– Still require weeks to months to develop
39
PLD (Programmable Logic Device)
• All layers already exist
– Designers can purchase an IC
– Connections on the IC are either created or destroyed to
implement desired functionality
– Field-Programmable Gate Array (FPGA) very popular
• PLD's are divided into two types, simple and complex.
• One type of simple PLD is a PLA (Programmable Logic Array),
which consists of a programmable array of AND gates and a
programmable array of OR gates.
• Another type is a PAL (Programmable Array Logic), which
uses just one programmable array to reduce the number of
expensive programmable components.
40
• One type of complex PLD, is the FPGA (Field Programmable
Gate Array), which offers more general connectivity among
blocks of logic, rather than just arrays of logic as with PLD
and PALs, and are thus able to implement far more complex
designs.
• Benefits
– Low NRE costs, almost instant IC availability
• Drawbacks
– Bigger, expensive (perhaps $30 per unit), power hungry,
slower.
41
42
➢ In general a company marketing a commercial general-purpose
processor might first market a semi-custom implementation to
reach the market early, and then later introduce a full-custom
implementation.
➢ They might also first map the processor to an older but more
reliable technology, like 0.2 micron, and then later map it to a
newer technology, like 0.08 micron.
➢ These two evolutions of mappings explain why a processor’s
clock speed improves on the market over time.
➢ Furthermore, we often implement multiple processors of different
types on the same IC. The IC designed for digital camera
included a microcontroller (general-purpose processor) plus
numerous single-purpose processors on the same IC and this is
known as system on chip (SoC).
43
Moore’s law
44
Moore’s law
• Wow
– This growth rate is hard to imagine, most people
underestimate
– How many ancestors do you have from 20 generations ago
• i.e., roughly how many people alive in the 1500’s did it take to make
you?
• 220 = more than 1 million people
– (This underestimation is the key to pyramid schemes!)
45
Graphical illustration of Moore’s law
10,000 150,000,000
transistors transistors
46
Design Technology
• The manner in which we convert our concept of desired system
functionality into an implementation
47
The designer refines the system through several abstraction levels.
➢ At the system level, the designer describes the desired
functionality in some language, preferably an executable
language like C; and this is the system specification.
➢ The designer refines this specification by distributing portions of
it among chosen processors (general or single purpose), yielding
behavioural specifications for each processor.
➢ The designer refines these specifications into register-transfer
(RT) specifications by converting behaviour on general-purpose
processors to assembly code (software), and by converting
behaviour on single-purpose processors to a connection of
register-transfer components and state machines.
48
➢ The designer then refines the register-transfer-level
specification of a single-purpose processor into a logic
specification consisting of Boolean equations.
➢ Finally, the designer refines the remaining specifications
into an implementation, consisting of machine code for
general-purpose processors, and a gate-level net list for
single-purpose processors.
The following three approaches are used to improve the
design process for increased productivity.
Compilation/Synthesis
Libraries/IP
Test/Verification
49
Compilation/Synthesis
Compilation/Synthesis allows the designer to specify desired
functionality in an abstract manner, and automatically generates
lower-level implementation details.
➢ System synthesis tool converts an abstract system specification
into a set of sequential programs on general and single-purpose
processors.
➢ A behavioural synthesis tool converts a sequential program into
finite-state machines and register transfers.
➢ A register-transfer (RT) synthesis tool converts finite-state
machines and register-transfers into a datapath of RT
components and a controller of Boolean equations
➢ A logic synthesis tool converts Boolean expressions into a
connection of logic gates (called a netlist). 50
➢ The recent RT and behavioural synthesis tools has enabled a
unified view of the design process for single-purpose
(“hardware design,”) and general-purpose processors
(“software design”).
➢ In the past, the design processes were radically different –
software designers wrote sequential programs, while
hardware designers connected components.
➢ But today, synthesis tools have converted the hardware
design process essentially into one of writing sequential
programs with some knowledge of how the hardware will be
synthesized.
51
52
Libraries/IP
Libraries involve reuse of pre-existing implementations. Using
libraries of existing implementations can improve productivity
if the time it takes to find, acquire, integrate and test a library
item is less than that of designing the item oneself.
➢ A logic-level library may consist of layouts for gates and
cells.
➢ An RT-level library may consist of layouts for RT
components, like registers, multiplexors, decoders, and
functional units.
➢ A behavioural-level library may consist of commonly used
components, such as compression components, bus
interfaces, display controllers, and even general purpose
processors. 53
➢ Rather than these components being IC’s, they now available in
a form, called cores, (Intellectual Property (IP), exist in a “soft”
form) and we can implement them on just one portion of an IC.
➢ Finally, a system-level library might consist of complete systems
solving particular problems, such as an interconnection of
processors with accompanying operating systems and programs to
implement an interface to the Internet over an Ethernet network.
Test/Verification
Test/Verification involves ensuring that functionality is correct.
Simulation is the most common method of testing for correct
functionality.
➢ At the logic level, gate level simulators provide output signal
timing waveforms for a given input signal waveforms.
➢ Likewise, general-purpose processor simulators execute machine
code. 54
➢ At the RT-level, HDL simulators execute RT-level descriptions
and provide output waveforms for a given input waveforms.
➢ At the behavioural level, HDL simulators simulate sequential
programs, and co-simulators connect HDL and general purpose
processor simulators to enable hardware/software co-verification.
➢ At the system level, a model simulator simulates the initial
system specification using an abstract computation model,
independent of any processor technology, to verify correctness
and completeness of the specification.
55
Design productivity exponential increase
100,000
10,000
Productivity
100
10
0.1
0.01
2001
2005
1993
2003
1983
1985
1987
1991
1989
1997
1999
2007
1995
2009
• Exponential increase over the past few decades
56
The co-design ladder
• Hardware/software
“codesign”
Implementation
Microprocessor plus VLSI, ASIC, or PLD
program bits: “software” implementation: “hardware”
The choice of hardware versus software for a particular function is simply a tradeoff among various
design metrics, like performance, power, size, NRE cost, and especially flexibility; there is no
fundamental difference between what hardware or software can implement.
57
Independence of processor and IC
technologies
• Basic tradeoff
– General vs. custom
– With respect to processor technology or IC technology
– The two technologies are independent
General- Single-
purpose ASIP purpose
General, processor processor Customized,
providing improved: providing improved:
58
Design productivity gap
59
Design productivity gap
60
The mythical man-month
61
Summary