You are on page 1of 43

DR.

UMAR SHAHBAZ KHAN


umarshahbaz@gmail.com

Digital Logic Design


Computer Architecture
Programming
Microcontrollers

Introduction to Embedded Systems


Processor Technology
Single purpose and General purpose
processors
Embedded Systems Hardware and
Software
Interfacing
IC Technology
Design Technology

Programmable logic devices like,


Programmable array logic (PAL)
Programmable logic array (PLA), complex
Programming logic device (CPLD), Application
Specific Integrated Circuits (ASIC) and Field
Programmable Gate Arrays (FPGA)
Software for embedded systems: Introduction
to development environment: FPGA
development kit (Spartan-III), Introduction to
Verilog
Development of various applicationslike
Mux, Demux, counters, registers, ALU etc

Embedded System Design: A unified


Hardware/Software Introduction. By Frank
Vahid & Tony D. Givarigis
Computer Architecture, A Quantitative
approach by Dr. David A. Patterson and
Dr. Paul Hennessey, - Digital Computer
Electronics by Malvino & Brown.
Embedded System Design. Hardware/
Software System, by P. Marwedel
FPGA prototyping by VHDL examples:
Xilinx Spartan-3 version, By Pong P. Chu Wiley-Interscience.

Quiz :
10%
Assignment:
05%
Projects :
05%
2 x Sessional Exams:
30%
Final Exam :
50 %

An electronic device that includes a programmable


computer, but is not itself intended to be a
general-purpose computer
It is not your desktop PC or portable PC. Some
examples are

Fax machines
Digital cameras
Mobile phones etc.

Millions of desktop PCs are manufactured every


year
Billions of embedded computer systems are
manufactured every year

A combination of hardware and software


which together form a component of a
larger machine. An embedded system is
designed to run on its own without human
intervention, and may be required to
respond to events in real time. Embedded
systems are used in industrial machines,
automobiles, medical equipment, cameras,
household appliances, airplanes, vending
machines, cellular phone, PDAs, toys and
many other devices.

Digital camera chip


CCD
CCD preprocessor

Pixel coprocessor

D2A

A2D
lens
JPEG codec

Microcontroller

Multiplier/Accum

DMA controller

Memory controller

Display ctrl

ISA bus interface

UART

LCD ctrl

Single-functioned -- always a digital camera


Tightly-constrained -- Low cost, low power, small,
fast

This top of the range car may contain more than 200 dedicated
embedded systems

Definition: Mechatronics
is the synergistic
combination of precision
mechanical engineering,
electronic controls and
systems engineering in the
design of products and
processes
Embedded
Sensors/actuators/
processors are integral
parts of mechatronic
systems

Dedicated to specific tasks


Real-time constraints
Cost sensitive
Power sensitive
Short design times
Harsh operating environments
Fail-safe operations

Restricted design and development tools


Sophisticated algorithms
Complex and reactive user interfaces
Complex testing requirements

How much hardware do we need?


How much software do we need?
What is the optimum balance between
hardware and software?
How do we meet operational deadlines?
How do we minimize power consumption?
How do we design for upgradeability?
How do we convince people that the
system works properly?

Unit cost: the monetary cost of manufacturing each


copy of the system, excluding NRE cost

NRE cost (Non-Recurring Engineering cost): The onetime monetary cost of designing the system.

Size: the physical space required by the system.

Performance: the execution time or throughput of the


system.

Power: the amount of power consumed by the system.

Flexibility: the ability to change the functionality of


the system without incurring heavy NRE cost

Time-to-prototype: the time needed to build a working


version of the system.

Time-to-market: the time required to develop a system


to the point that it can be released and sold to
customers.

Maintainability: the ability to modify the system after


its initial release

Correctness, safety, many more

Improving one design metric may worsen


other

The hardware and software are


normally developed together in order
to satisfy the system requirements:
Correct functionality
Cost
Size
Performance
Power consumption
Time-to-Market etc.

Real Time Systems are typically


monitoring and/or control systems
The external environment (system or
machine) is often termed the Controlled
System
The Real Time System (including its
hardware/OS) is known as the Controlling
System

Surface to air missiles

Cardiac Pacemaker

Sense heartbeat
Deliver electrical stimulus to heart on basis of sensed
heart events
Rate of stimulation and duration of stimulus controlled
by the system

Digital cellular telephony

Detect aircraft, initiate launch, track target.... bang!

Compress/ decompress speech, error coding, manage


radio transmission, manage power consumption

Like many Real Time Systems, above are all


embedded in some larger system that they control

Processor technology

IC technology

Design technology

The architecture of the computation


engine used to implement a systems
desired functionality

Controller

Datapath

Controller

Control
logic and State
register

Register
file

Control logic and


State register

IR

General
ALU

PC

Datapath
Registers

Data
memory

Assembly code for:

Control
logic

index

State register

PC
Data
memory

Program memory

Datapath

total
Custom
ALU

IR

Controller

Data
memory

Program memory
Assembly code for:
total = 0
for i =1 to

total = 0
for i =1 to

General-purpose (software)

Application-specific

Single-purpose (hardware)

Programmable device used in


a variety of applications

Features

Program memory
General datapath with large
register file and general ALU

User benefits

Also known as microprocessor

Low time-to-market and NRE


costs
High flexibility

Pentium the most wellknown, but there are


hundreds of others

Controller

Datapath

Control
logic and
State
register

Register
file

IR

PC

Program
memory
Assembly code
for:
total = 0
for i =1 to

General
ALU

Data
memory

Digital circuit designed to


execute exactly one program

Features

a.k.a. coprocessor, accelerator or


peripheral
Contains only the components
needed to execute a single
program
No program memory

Benefits

Fast
Low power
Small size

Controller

Datapath

Control
logic

index

total
State
register

Data
memory

Programmable processor
optimized for a particular class of
applications having common
characteristics

Datapath

Control
logic and
State
register

Registers

IR

PC

Features

Compromise between generalpurpose and single-purpose


processors

Controller

Program memory
Optimized datapath
Special functional units

Benefits

Some flexibility, good performance,


size and power

Program
memory
Assembly code
for:
total = 0
for i =1 to

Custom
ALU
Data
memory

The manner in which a digital (gatelevel) implementation is mapped onto


an IC
IC: Integrated circuit, or chip
IC technologies differ in their customization
to a design
ICs consist of numerous layers (perhaps
10 or more)

IC

technologies differ with respect to who builds


each layer and when
IC package

IC

source

gate
oxide
channel

drain
Silicon substrate

Full-custom/VLSI

Semi-custom ASIC (gate array and


standard cell)

PLD (Programmable Logic Device)

Full custom IC design often referred to as Very


Large Scale Integration (VLSI) design.
All layers are optimized for an embedded
systems particular digital implementation

Benefits

Placing transistors
Sizing transistors
Routing wires
Excellent performance, small size, low power

Drawbacks

High NRE cost (e.g., $300k), long time-to-market

28

Very Large Scale Integration (VLSI)


Placement

Routing

Connect transistors

Sizing

Place and orient transistors

Make fat, fast wires or thin, slow wires


May also need to size buffer

Design Rules

simple rules for correct circuit function

Metal/metal spacing, min poly width

Also referred to as Application-specific IC (ASIC).


Lower layers are fully or partially built

Benefits

Designers are left with routing of wires and maybe


placing some blocks
Good performance, good size, less NRE cost than a
full-custom implementation (perhaps $10k to $100k)

Drawbacks

Still require weeks to months to develop

30

Gate Array

Array of prefabricated gates


place and route
Higher density, faster time-to-market
Does not integrate as well with full-custom

Standard Cell

A library of pre-designed cell


Place and route
Lower density, higher complexity
Integrate great with full-custom

31

Most popular design style

Jack of all trade

Good
Power,

time-to-market,
performance, NRE cost, perunit cost, area

Master of none

Integrate with full custom


for critical regions of design

33

Programmable Logic Device

Programmable Logic Array, Programmable Array Logic, Field


Programmable Gate Array

All layers already exist

Designers can purchase an IC


To implement desired functionality

Benefits

Connections on the IC are either created or destroyed to implement

Very low NRE costs


Great time to market

Drawback

High unit cost, bad for large volume


Power

Except special PLA

slower

1600 usable gate, 7.5 ns


$7 list price

34

The most important trend in embedded


systems

Predicted in 1965 by Intel co-founder Gordon


Moore

IC transistor capacity has doubled roughly


every 18 months for the past several decades
10,000
1,000
100
10
1
0.1
0.01

2009

2007

2005

2003

2001

1999

1997

1995

1993

1991

1989

1987

1985

0.001
1983

Logic transistors
per chip
(in millions)

1981

The manner in which we convert our


concept of desired system functionality
into an implementation
Compilation/
Synthesis

Compilation/Synthesis: Automates
exploration and insertion of
implementation details for lower level.

Libraries/
IP

Test/
Verification

System
specification

System
synthesis

Hw/Sw/
OS

Model simulate./
checkers

Behavioral
specification

Behavior
synthesis

Cores

Hw-Sw
co simulators

RT
specification

RT
synthesis

RT
components

HDL simulators

Logic
specification

Logic
synthesis

Gates/
Cells

Gate
simulators

Libraries/IP: Incorporates pre-designed


implementation from lower abstraction
level into higher level.

Test/Verification: Ensures correct


functionality at each level, thus reducing
costly iterations between levels.

To final implementation

2009

2007

2005

2003

2001

1999

1997

1995

1993

1991

1989

1987

1985

1983

1981

1,000

100

10

0.1

0.01

Productivity
(K) Trans./Staff Mo.

Exponential increase over the past few decades


100,000

10,000

In the past:

Hardware and software


design technologies
were very different
Recent maturation of
synthesis enables a
unified view of hardware
and software

Hardware/software co
design

Sequential program code (e.g., C, VHDL)


Behavioral synthesis
(1990's)

Compilers
(1960's,1970's)

Register transfers
Assembly instructions

RT synthesis
(1980's, 1990's)

Assemblers, linkers
(1950's, 1960's)

Logic equations / FSM's

Machine instructions

Logic synthesis
(1970's, 1980's)
Logic gates

Microprocessor plus
program bits: software

Implementation

VLSI, ASIC, or PLD


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.

Basic tradeoff

General vs. custom


With respect to processor technology or IC technology
The two technologies are independent

General,
providing improved:

Generalpurpose
processor

ASIP

Singlepurpose
processor

Flexibility
Maintainability
NRE cost
Time- to-prototype
Time-to-market
Cost (low volume)

Customized,
providing improved:
Power efficiency
Performance
Size
Cost (high volume)

PLD

Semi-custom

Full-custom

While designer productivity has grown


at an impressive rate over the past
decades, the rate of improvement has
not kept pace with chip capacity
100,000

1,000

10,000

100

1000

Gap

10

100

IC capacity

10

0.1

productivity

0.01

0.1

0.001
2009

2007

2005

2003

2001

1999

1997

1995

1993

1991

1989

1987

1985

0.01
1983

Logic transistors
per chip
(in millions)

10,000

1981

Productivity
(K) Trans./Staff-Mo.

Adaptive Cruise Control


Drive by wire
XM Satellite Radio
Telematics (OnStar)
Software drive train
Software body control
Rain-sensing Wipers

In-vehicle entertainment
Generation II ABS
Heads-up display
Night Vision
Back-up collision sensor
Navigation
Tire Pressure Monitor

Gasoline to hybrid to fuel cell


Mechanical connection to Drive-by-wire
Proprietary electrical/hardware/software system to
standardized architectures
Adoption and implementation of IT standards in the
technology of the car (XML, Web Services, etc.)
On-demand to Always-on vehicle connectivity to the
Internet

Measuring physical variables (sensing)


Storing data
Processing sensor signals and data
Influencing physical variables
(actuating)
Monitoring, Supervision
Enable manual and automatic
operation

You might also like