Вы находитесь на странице: 1из 45

Introduction to Mixed-Signal,

Embedded Systems Design

Alex Doboli, Ph.D.

Department of Electrical and Computer Engineering
State University of New York at Stony Brook
Email: adoboli@ece.sunysb.edu

©Alex Doboli 2006

An Overview on the Design of
Embedded Mixed-Signal Systems

The chapter introduces embedded mixed-signal systems and

explains the top-down design flow for developing performance
efficient implementations

• Types of embedded applications and their characteristics

(interfaces, functionality, and design requirements)
• CPUs used in embedded systems (microprocessors and
microcontrollers, DSP, VLIW processors, and reconfigurable
• Top-down design flow based on design refinement and circuit
• The evolution of the embedded systems market
• Illustrating example for a embedded mixed-signal system design

©Alex Doboli 2006

Sensing and actuation devices in
embedded applications

©Alex Doboli 2006

Embedded Applications

Signal sensing/data acquisition – data processing & data storing

– actuation – data communication (networking)

©Alex Doboli 2006

Embedded Applications

• Networking, intelligent control

©Alex Doboli 2006

Embedded Applications

• Networking

©Alex Doboli 2006

Types of Embedded Applications (1)

• A. Embedded controllers
– Supervise and adjust the behavior of the monitored entities
– Fan controller, pacemakers, robot arm controller,
– Low/medium computational complexity, real-time, safety-
critical, accurate sensing, low cost

• B. Specialized interfaces
– Interfacing to powerful computers
• Supply the missing hardware
• Relieves the computer from interfacing jobs: data
conversion, encoding/decoding, encryption/decryption, etc.
– Small cost & size, low/medium computational complexity, fast
throughput, low energy consumption
– Data acquisition, networking cards, capacitive sensing, mouse

©Alex Doboli 2006

Types of Embedded Applications (2)

• C. Application-specific coprocessors
– Customized data intensive processing: DSP, multimedia,
graphic processors, image processing, video processing
– Relieves CPU from computationally intensive tasks
– High speed, low power consumption, low cost & size

• D. Networks of embedded systems

– Automotive applications: networked embedded
microcontrollers, sensors, actuators
– Wireless networks, sensor networks
– Low cost, small size, reduced memory, low energy
consumption, variety of sensors/actuators
– Communication protocols, data routing, data aggregation,
control, scalability, self-organizing, autonomous

©Alex Doboli 2006

Data Flow in an Embedded System

©Alex Doboli 2006

Summary of Embedded Systems
System Sensing Actuation Data Data Requirements
types communic. processing & constraints

Controllers Wide range Wide range - control Cost,

timing, safety
Specialized Wide range - Various Conversion,f Cost,size,accu
interfaces speed ormatting,en racy,timing,
coding power
Co- - - High-speed Data- Cost, size,
processors intensive speed, power
customized consumpt.
Networks of Wide range Wide range Various Control, Cost, size,
embedded speed conversion, safety, power
systems encoding consumpt.

©Alex Doboli 2006

I/O Interfaces

• Analog and digital signals

– Voltage, current, charge, frequency, phase
– Thermistors, theromocuples, pressure sensors, velocity sensors,
strain gauges, etc.

• Signal conditioning circuits, analog multiplexers, ADC, DAC,

comparators, filters, sampling circuits, amplitude detectors,
mixers, etc.

• Analog signals
– Sin waves, triangular,
– Range, bandwidth, precision, noise, speed of variation etc.

©Alex Doboli 2006


• Control dominated systems

• Data dominated systems

• Multi tasking systems

• Multi-mode systems

©Alex Doboli 2006

Types of functionality

©Alex Doboli 2006

Types of functionality

• Continuous time systems

• Discrete-time systems

• Event-driven systems

©Alex Doboli 2006

Design requirements

• Low cost

• Short time to market

• Small size & weight

• Real-time constraints, latency, throughput

• Low power & low energy consumption

• Safety

• Data accuracy

• Robustness

• Flexibility in developing new applications

©Alex Doboli 2006
Timing (real-time) constraints

©Alex Doboli 2006

Analog Circuit Nonidealities

©Alex Doboli 2006

System performance & requirements

• Global constraints
• Local constraints
• Constraint transformation

• Tightly coupled systems

• Loosely coupled systems

©Alex Doboli 2006

Embedded vs. other applications (1)

How do embedded applications differ from “non-embedded” ones

(e.g., desktop)?

A. Wide range of sensing & actuation necessities:

• The temperature sensor provides an output voltage proportional
to the measured temperature
• The fan is a DC brushless fan with a duty cycle (hence speed)
controlled by the output of the embedded controller
• The tachometer measures the rotational speed of the fan, and
generates an input signal used by the embedded system for
computing the fan speed

=> Knowledge required beyond EE & CE (physics, chemistry,

mechanics, material science, etc.)

©Alex Doboli 2006

Embedded vs. other applications (2)

B. Variety of design and performance requirements

• Cost
• Weight, size, number of I/O pins
• Latency, throughput, real-time constraints, response time,
• Energy/power consumption
• Safety-critical

C. Comprehensive design process

• System design (beyond CPU)
• Analog and mixed-signal circuit design
• Customized digital circuit design
• Software development: algorithms, drivers, firmware, ISR, API
=> Cross-disciplinary design expertise (EE & CE & CS)
©Alex Doboli 2006
PSoC Mixed-Signal Architecture

©Alex Doboli 2006

Other Embedded Architectures

• Microcontrollers


• Reconfigurable architectures

©Alex Doboli 2006

Tow-Down Design Flow (1)

©Alex Doboli 2006

Design Flow (2)

• Goal: customize the hardware and software according

to the specific functional, cost, and performance needs
of the application, as well as the characteristics of the
environment the design will operate in

• Customization allows achieving the performance requirements at

relatively low costs

• Customization leads to lesser flexibility in efficiently reusing an

embedded system design for a different kind of application

• Customization involves cost-size-performance trade-offs

©Alex Doboli 2006

Design Flow (3)

• Abstract system specification

– Functional, interfacing, cost, and performance
requirements of the system
• Incremental refinement during the top-down flow
– Adds successively implementation details to the design
– Early refinement steps decide the # of processing cores,
partitioning of the functionality to the cores, the structure
of the memory subsystem, the number of buses, etc.
– Late refinement steps implement the building blocks
• Each refinement step conducts design trade-off analysis
– Multiple solutions and impact on the system performance
• System performance evaluation
• Modeling procedure for the building blocks in the design
©Alex Doboli 2006
Design Flow (4)

• 1. System specification:
– Describing the interfacing, functionality, and performance
constraints of an embedded system
– Simulatable notation
– @ different levels of abstractions
• High level vs. low level specifications

• 2. Functional partitioning:
– Re-organizes a specification into modules with specialized
– The identified modules might undergo different design
– Might be performed multiple times

©Alex Doboli 2006

Design Flow (5)

• 3. System-level trade-off analysis:

– Maps (transforms) system-level performance and design
requirements into requirements for the building blocks
– Design trade-offs are analyzed during this step
• cost -speed, speed - power consumptions, etc.
– Whether a module is realized in hardware or software
– Deciding the main attributes of the memory
• memory size, # of memory modules, access time, etc.
– Number of I/O ports, their communication protocols, mapping
of I/O signals to ports, etc.
– Refining the OS or firmware level routines
• Task scheduling, arbitration of module access to buses
– Modules are individually designed
©Alex Doboli 2006
Design Flow (6)

• 4. Design of the individual modules:

– Implementing the system modules
• Interfaces, video and audio processors, memory
module, bus communication
– Hardware circuits
– Software routines
• Drivers, interrupt service routines (ISR), control and
data access routines
– Complex modules go through top-down design

©Alex Doboli 2006

Design Flow (7)

• 5. Analog and mixed-signal circuit design:

– OpAmp, OTA, comparator circuits, analog mux, integrator
circuits, S/H circuits, etc.
– Continuous-time or switched capacitor circuits
– Selecting the circuit topology, transistor sizing, and layout
• 6. Digital circuit design:
– Customized digital circuits
– Interfacing circuits, digital filters, decimator circuits,
encoders - like Huffman encoders for multimedia, etc.
– Complex digital sub-systems go through top-down design
– Simple circuits: logic design, mapping to basic circuits,
transistor sizing, and layout design
©Alex Doboli 2006
Design Flow (8)

• 7. Software development:
– Application software and system software
• Data processing, control, and graphical user interfaces
• Real-time OS, middleware, and networking.
• 8. Circuit modeling:
– Characterizing the behavior of hardware
– Electronic circuits have significant differences from ideal
– Nonidealities of analog and digital circuits
• propagation delay, power consumption, noise margins,
gain, poles, zeros, bandwidth, harmonic distortion, circuit
– Different kind of nonidealities have to contemplated at
different abstraction levels of a top-down design flow
©Alex Doboli 2006
Design Flow (9)

• 9. Software characterization:
– Prediction of the performance of software routines
• speed, memory, memory access patterns, power
consumption, and so on
– Difficult due to the dynamic nature of software performance
• if statements, case statements, loops
• 10. Performance evaluation:
– Performance attributes of the system and its modules
• Quality of different design options without actually
building, testing and measuring the designs
– Analytical expressions
• Simple to use, but require large development effort
• Prediction accuracy is not very high
– Simulation
• large simulation time
©Alex Doboli 2006
Embedded Systems Market

2003 2004 2009 % (2004-2009)

Embedded $1,4 bil $1,6 bil $3,4 bil 16


Embedded $34,6 bil $40 bil $78,7 bil 14


Embedded $3,4 bil $3,6 bil $5,9 bil 10


Total $39,4 bil $45,8 bil $88,1 bil 14

Source: BCC Research Group, “Future of Embedded Systems

Technology”, 2005

©Alex Doboli 2006

What is an embedded system? (1)

Fan controller:
• The controller adjusts the fan speed depending on the room

©Alex Doboli 2006

What is an embedded system? (2)

Functionality of the fan controller:

• The controller selects among four different predefined speed
values (e.g., off, low, ramp, and high):
– If the room temperature stays below 25C then the fan stays off
– If the temperature is in the range 25C - 35C then the fan rotates
at a low speed.
– For the temperature range 35C to 50C the speed of the fan
linearly increases with the temperature following a ramp law
Speedfan = room temperature / 10
– The fan speed is set to high, if room temperature exceeds 50C
• LCD displays the temperature & the fan speed set by the controller

Is that all?
©Alex Doboli 2006
What is an embedded system? (3)

Embedded control

Sensing actuation

Is that all?
©Alex Doboli 2006
Signal sensing/Data acquisition

• What signal (voltage, current)?

• Signal characteristics (range, frequency, noise, distortion)
• Signal loading characteristics (high impedance)

• Timing between pulses

• Interfacing (interrupts)
• Standards (I2C, RS232)
•Number of I/O Pins
©Alex Doboli 2006

• Control signals
• Drive frequency
• Drive polarity
• Spin up time

©Alex Doboli 2006

Fan Controller Design Process (1)

• A. System specification
– Description of interfaces, functionality and performance
– Specification notation/language
• B. Specification testing & debugging
– Specification debugging & validation (correctness &
• C. System implementation
– Analog & digital circuits
– Software (embedded control, drivers, ISR)
• D. Implementation testing and debugging

©Alex Doboli 2006

Fan Controller Specification (2)

• PSoC Express offers graphical interface for specification of

certain mixed-signal systems
Interconnect of
Library of
predefined modules

Temperature sensor Control algorithm

interface I/Os to pins

©Alex Doboli 2006

Controller Implementation (3)

©Alex Doboli 2006

Controller Implementation (4)

©Alex Doboli 2006

Implementation Debugging & Validation (1)

• Implementation Debugging
– Eliminate the faults in the implementation (e.g., system
does not work)
• Analog, digital, software, integration etc.
– What input data activates a fault and propagates it to the

• Implementation Validation
– Is the implementation equivalent to the specification?
– Are all possible input values handled correctly?
– Is the functionality correctly realized?
– Are performance requirements met?
– How does the system operate in exceptional situations?

©Alex Doboli 2006

Implementation Debugging & Validation (2)

• Fix the number of

bytes to be displayed
on the LCD, their
address, and amount
– Temperature & RPM

• Change Vref & monitor

data on LCD
• LCD can display only
limited amount of data
©Alex Doboli 2006
Implementation Debugging & Validation (3)

• HyperTerminal
• Connected through the
serial port
• Steps for monitoring:
– Reset the system
– Set the duty cycle to
– Define the I2C address
and count value to be
– HyperTerminal displays
the registers for Fan,
Tach, SPR, and Temp

©Alex Doboli 2006


©Alex Doboli 2006