You are on page 1of 47

DR.

UMAR SHAHBAZ KHAN


u.shahbaz@ceme.nust.edu.pk
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, Spartan 6), Introduction to Verilog
 Development of various applications  like Mux,
Demux, counters, registers, ALU etc
 Computer Architecture, A Quantitative approach by
Dr. David A. Patterson and Dr. Paul Hennessey, -
Digital Computer Electronics by Malvino & Brown.
 Embedded System Design: A unified
Hardware/Software Introduction. By Frank Vahid &
Tony D. Givarigis,
 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 / Projects : 10%

 Mid Exam: 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, PDA’s, toys and many other devices.
Digital camera chip
CCD

CCD preprocessor Pixel coprocessor D2A


A2D

lens

JPEG codec Microcontroller Multiplier/Accum

DMA controller Display ctrl

Memory controller ISA bus interface UART LCD ctrl

Single-functioned -- always a digital camera


Tightly-constrained -- Low cost, low power, small, fast
Reactive and real-time -- only to a small extent
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 one-time


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
 Detect aircraft, initiate launch, track target.... bang!

 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


 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 system’s desired functionality
Controller Datapath Controller Datapath Controller Datapath

Control index
Control Register Control logic and Registers
logic
logic and State file State register
total
register
Custom State register
+
ALU
General
ALU
IR PC IR PC

Data Data
memory memory

Program memory Data Program memory


memory

Assembly code for: Assembly code for:

total = 0 total = 0
for i =1 to … for i =1 to …

General-purpose (“software”) Application-specific Single-purpose (“hardware”)


 Programmable device used in a Controller Datapath
variety of applications Control Register
 Also known as “microprocessor” logic and file
State
 Features register
General
 Program memory IR PC ALU
 General datapath with large register
file and general ALU Program memory Data
 User benefits memory

Low time-to-market and NRE costs


Assembly code for:

total = 0
 High flexibility for i =1 to …

 “Pentium/Intel/AMD” the most


well-known, but there are
hundreds of others
 Digital circuit designed to execute
exactly one program
 a.k.a. coprocessor, accelerator or Controller Datapath
peripheral Control index
logic
 Features total
State
 Contains only the components needed register +
to execute a single program
 No program memory Data
memory
 Benefits
 Fast
 Low power
 Small size
 Programmable processor optimized for
a particular class of applications Controller Datapath

having common characteristics Control


logic and
Registers
 Compromise between general-purpose State
and single-purpose processors register Custom
ALU
 Features IR PC
 Program memory Data
memory
 Optimized datapath Program memory

 Special functional units Assembly code for:

 Benefits total = 0
for i =1 to …
 Some flexibility, good performance, size
and power
 The manner in which a digital (gate-level)
implementation is mapped onto an IC
 IC: Integrated circuit, or “chip”
 IC technologies differ in their customization to a
design
 IC’s consist of numerous layers (perhaps 10 or
more)
 ICtechnologies differ with respect to who builds each
layer and when

gate
IC package IC oxide
source 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 system’s
particular digital implementation
 Placing transistors
 Sizing transistors
 Routing wires
 Benefits
 Excellent performance, small size, low power
 Drawbacks
 High NRE cost (e.g., $300k), long time-to-market
29

 Very Large Scale Integration (VLSI)


 Placement
 Place and orient transistors
 Routing
 Connect transistors
 Sizing
 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
 Designers are left with routing of wires and maybe
placing some blocks
 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
31

 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
32

 Most popular design style

 Jack of all trade


 Good
 Power, time-to-market,
performance, NRE cost, per-unit
cost, area…
 Master of none
 Integrate with full custom for
critical regions of design
34

 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
 Connections on the IC are either created or destroyed to implement
 Benefits
 Very low NRE costs
 Great time to market
 Drawback
 High unit cost, bad for large volume
 Power
 Except special PLA 1600 usable gate, 7.5 ns
 slower $7 list price
 A layer of programmable AND gates are connected to
Programmable OR Gates to make a combinational Logic
Circuit
 The distinction between PLA and PAL is that, PAL have
programmable AND array and fixed or array (1978). On
the other hand, PLA have programmable AND array and
programming OR array (1970)
37
 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

Logic transistors 100


per chip 10
(in millions) 1
0.1
0.01
0.001
1983

1999
1981

1985

1987

1989

1991

1993

1995

1997

2001

2003

2005

2007

2009
 The manner in which we convert our concept of
desired system functionality into an
implementation Compilation/
Synthesis
Libraries/
IP
Test/
Verification

System System Hw/Sw/ Model simulate./


Compilation/Synthesis: Automates specification synthesis OS checkers
exploration and insertion of
implementation details for lower level.

Behavioral Behavior Cores Hw-Sw


specification synthesis co simulators
Libraries/IP: Incorporates pre-designed
implementation from lower abstraction
level into higher level.
RT RT RT HDL simulators
specification synthesis components

Test/Verification: Ensures correct


functionality at each level, thus reducing
costly iterations between levels. Logic Logic Gates/ Gate
specification synthesis Cells simulators

To final implementation

1981

1983

1985

1987

1989

1991

1993

1995

1997

1999

2001

2003

2005

2007

2009
1
10

0.1
100

0.01
1,000
10,000
100,000

Productivity
Exponential increase over the past few decades

(K) Trans./Staff – Mo.


 While designer productivity has grown at an
impressive rate over the past decades, the rate of
improvement has not kept pace with chip capacity

10,000 100,000
1,000 10,000

Logic transistors 100 1000


per chip 10 Gap 100 Productivity
IC capacity (K) Trans./Staff-Mo.
(in millions) 1 10
0.1 1
productivity
0.01 0.1
0.001 0.01
1981

1983

1985

1987

1989

1991

1993

1995

1997

1999

2001

2003

2005

2007

2009
 In the past: Sequential program code (e.g., C, VHDL)

Behavioral synthesis
Compilers
 Hardware and software design (1960's,1970's)
(1990's)

technologies were very Assembly instructions


Register transfers
RT synthesis
different Assemblers, linkers
(1980's, 1990's)

Logic equations / FSM's


 Recent maturation of synthesis (1950's, 1960's)
Logic synthesis
enables a unified view of Machine instructions (1970's, 1980's)
Logic gates
hardware and software
 Hardware/software “co Microprocessor plus
Implementation
VLSI, ASIC, or PLD
program bits: “software” implementation: “hardware”
design”

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- Single-
purpose ASIP purpose
General, processor processor Customized,
providing improved: providing improved:

Flexibility Power efficiency


Maintainability Performance
NRE cost Size
Time- to-prototype Cost (high volume)
Time-to-market
Cost (low volume)

PLD Semi-custom Full-custom


 Adaptive Cruise Control  In-vehicle entertainment
 Drive by wire  Generation II ABS
 XM Satellite Radio  Heads-up display
 Telematics (OnStar)  Night Vision
 Software drive train  Back-up collision sensor
 Software body control  Navigation
 Rain-sensing Wipers
 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