EmbeddedSystemDesignECM IA1
EmbeddedSystemDesignECM IA1
EmbeddedSystemDesignECM IA1
DESIGN
•Based on Generations
•Based on Triggering
( Reactive Systems can be event or Time Triggered)
Generation
Event Triggered
Activities within the system are dynamic
e.g. Task run-times
Depend upon the occurrence of different events
Time triggered
Activities within the system follow a statically computed schedule e.g.
Allocated time slots during which they can take place
By nature are predictable.
Stand alone embedded systems
Do not require a host system like a computer
It works by itself
It takes the input from the input ports either analog or digital
processes, calculates and converts the data
gives the resulting data through the connected Device
Which either controls, drives and displays the connected devices
Examples:
Mp3 players
Digital cameras
Video game consoles
Microwave ovens and temperature measurement systems
Real Time Embedded Systems
A system which gives a required o/p in a particular time
These systems follow the time deadlines for completion of a task
They are classified as
Soft real time
Hard real time systems
Networked Embedded Systems
Connected to a network to provide output to other systems
Resources are Network accessed
Network can be LAN, WAN or the Internet
Connection can be any wired or wireless
Fastest growing area in embedded system applications
The Embedded web server is a type of system
wherein
All embedded devices are connected to a web server
Accessed and controlled by a web browser
Example
LAN networked embedded system
Home security system
wherein all sensors are connected and run on the protocol TCP/IP
Mobile Embedded Systems
•Data Communication
•Data(Signal) Processing
•Monitoring
•Control
and transmission
analog signal
• whereas embedded systems with digital data collection mechanism converts the analog signal
to the digital signal using analog to digital (A/D) converters and then collects the binary
• If the data is digital, it can be directly captured without any additional interface by digital
embedded systems.
collection/storage/representation of data.
• Images are captured and the captured image may be stored within the memory of the camera.
Data Communication
Embedded systems communicate with the outside world via peripherals
Data Packetizing,
quantities collected by embedded systems may be used for various kinds of data
processing.
A silicon chip
Control Unit
Working registers
Dependant unit
Requires the combination of other hardware like Memory, Timer Unit,
and Interrupt Controller etc for proper functioning
Different Instruction Set and Architecture are available for
designing a Microprocessor
1. Von-Neumann architecture
2. Harvard architecture
Von-Neumann architecture
Shares a single common bus for fetching both instructions and data.
Harvard architecture
Data memory can be read and written while the program memory is being
accessed
Suppose the word length is two byte then data can be stored in
memory in two different ways
Big-endian V/s Little-endian processors
Little-endian
Lower-order byte of the data is stored in memory at the lowest
address
The higher-order byte at the highest address
Big-endian
Higher-order byte of the data is stored in memory at the lowest
address
The lower-order byte at the highest address
Load Store Operation & Instruction Pipelining:
Fetch
Fetches the instruction from program memory or code memory
Decode
Decodes the instruction to generate the necessary control signal
Execute
Reads the operands, perform ALU operations and stores the result
Instruction pipelining
Refers to the overlapped execution of instructions
Application Specific Integrated Circuits
A microchip designed to perform a specific or unique application
Integrates several functions into a single chip
Thereby reduces the system development cost
Proprietary products
As a single chip,
ASIC consumes very small area in the total system,
Thereby helps
In the design of smaller systems with high capabilities/functionalities
Pre-fabricated for a special application
Custom fabricated by using the components from a re-usable
building block library of components for a particular customer
application
Fabrication of ASICs requires a non-refundable initial investment
Non Recurring Engineering (NRE) charges
Costs for IP (Intellectual property),
masks, package design,
Test development, Debugging, and Hardware.
When the Non-Recurring Engineering Charges (NRE) are born by a third
party And
The Application Specific Integrated Circuit (ASIC) is made openly
available in the market
Then
ASIC is referred as Application Specific Standard Product (ASSP)
The ASSP is marketed to multiple customers just as a general-purpose
product ,
But to a smaller number of customers since it is for a specific application
Programmable Logic Devices (PLDs)
Logic devices provide specific functions, Including
Device-to-device interfacing,
Data communication,
Signal processing,
Data display,
Timing and control operations,
Almost every other function a system must perform
Logic devices can be classified into Two broad categories
Fixed
Programmable
The circuits in a fixed logic device are permanent
They perform one function or set of functions
once manufactured, they cannot be changed
Programmable logic devices (PLDs) offer customers a wide range of
Logic capacity,
Features,
Speed,
Voltage characteristics
These devices can be re-configured to perform any number of functions at any time
Designers can use inexpensive software tools to quickly
Develop,
Simulate,
Test their logic designs in PLD based design
The design can be
Quickly programmed into a device
Immediately tested in a live circuit
PLDs are based on re-writable memory technology
The device is reprogrammed to change the design
Programmable Logic Devices (PLDs) - CPLDs and FPGA
Field Programmable Gate Arrays
Complex Programmable Logic Devices
FPGA is an IC designed to be configured by a designer after
manufacturing
FPGAs offer the highest amount of logic density
The most features,
The highest performance
Logic gate is Medium to high density ranging from 1K to 500K system
gates
Advanced FPGA devices also offer features such as
Built-in hardwired processors
Substantial amounts of memory
Clock management systems
Support for many of the latest
Very fast device-to-device signaling technologies
FPGAs are used in a wide variety of applications ranging from
Data processing
Data storage,
Instrumentation
Telecommunication
Digital signal processing
Complex programmable logic device (CPLD)
It is a programmable logic device with complexity between that of PALs
and FPGAs
And Architectural features of both
CPLDs, by contrast, offer much smaller amounts of logic - up to about
10,000 gates
CPLDs offer
Very predictable timing characteristics
Are therefore ideal for critical control applications
CPLD consists of
Configurable Logic Block (CLB)
which consists of AND gate arrays and Interconnects
Logic Blocks are programmable AND, fixed OR devices
Macrocells
Flip-flop
Multiplexer
Tri-state buffer
Advantages of PLDs
They offer customer much
More flexibility during design cycle
• PLDSs do not require
Long lead times for prototype or production
PLDs are already on a distributor's self and ready for shipment
• PLDs do not require customers to pay for
Large NRE costs
Purchase expensive mask sets
• PLDs allow customers to order
Just the number of parts required when they need them
• PLDs are reprogrammable
Even after a piece of equipment is shipped to a customer
• The manufacturers are able to
add new features
or upgrade the PLD based products
That are in the field by uploading new programming file
Commercial off-the-shelf (COTS) product
It can be used “As-Is”
Designed to provide easy Integration and Interoperability with
existing system components
Remote Controlled Toy Car control unit
High performance, high frequency microwave electronics(2 to 200 GHz) High
bandwidth analog-to-digital converters,
Off-Chip Memory
‘Device ON’,
‘Battery low’ or
‘Charging of battery’
R
GND
The I/O Subsystem – I/O Devices – 7-Segment LED Display
Common anode
Common cathode
Optocoupler combines
An LED
LED
I/O interface
I/O interface
Photo-transistor
In electronic circuits,
Active high
The processor undergoes reset when the reset pin of the processor is
at logic high
Active low
The processor undergoes reset when the reset pin of the processor is
at logic low
Other System Components – Real Time Clock (RTC)
Watchdog Reset
System Clock
Communication Interface
Two wire serial interface bus ; Developed by Philips Semiconductors in the early 1980’s.
Master device pulls the data line (SDA) “LOW”, when the SCL line
is at logic “HIGH”
This is the “Start” condition for data transfer
Master sends - Address (7 bit or 10 bit wide) of the
The data in the bus is valid during the “HIGH‟ period of the clock
signal
In normal data transfer, the data line only changes state when the
clock is low
Master waits for the acknowledgement bit from the slave device
whose address is sent on the bus along with the Read/Write
operation command.
Slave devices connected to the bus compares the address received
with the address assigned to them
The Slave device with the address requested by the master device
responds by
Sending an acknowledge bit (Bit value =1) over the SDA line
Upon receiving the acknowledge bit, master sends the 8bit data to
the slave device over SDA line, if the requested operation is “Write to
device‟.
If the requested operation is “Read from device”, the slave device
sends data to the master over the SDA line.
Master waits for the acknowledgement bit from the device upon byte
transfer complete for a write operation and sends an acknowledge bit
to the slave device for a read operation
Master terminates the transfer by pulling the SDA line “HIGH‟ when
the clock line SCL is at logic “HIGH‟ (Indicating the “STOP‟ condition)
The Serial Peripheral Interface Bus (SPI)
A synchronous
Bi-directional
Full duplex
Four wire
Serial interface bus
The concept of SPI is introduced by Motorola
SPI is a single master multi- slave system
SPI requires four signal lines for communication,
They are: Master Out Slave In (MOSI):
Signal line carrying the data from master to slave device
Also known as
Slave Input/Slave Data In (SI/SDI)
Master In Slave Out (MISO):
Signal line carrying the data from slave to master device.
It is also known as
Slave Output (SO/SDO)
The data out line (MISO) of all the slave devices by default floats at
high impedance
The serial data transmission through SPI Bus is fully configurable.
Set of registers : Hold these configurations
SPI Control Register holds the various configuration parameters
It makes use of only a single signal line (wire) called DQ for
communication
4.7K
DQ Slave 1
Port Pin
1-Wire Device
(Eg: DS2760 Battery
GND
monitor IC )
Master
(Microprocessor/
Controller) DQ Slave 2
1-Wire Device
(Eg: DS2431 1024
GND GND
Bit EEPROM )
The sequence of operation for communicating with a 1-Wire slave device is:
3.Master device sends a ROM Command (Net Address Command followed by the
64 bit address of the device). This addresses the slave device(s) to which it wants
to initiate a communication
5.Master initiates a Read data /Write data from the device or to the device
All communication over the 1-Wire bus is Master initiated
The communication over the 1-Wire bus is divided into timeslots of 60
microseconds
The ‘Reset’ pulse occupies 8 time slots.
For starting a communication,
The master asserts the reset pulse by pulling the 1-Wire bus ‘LOW’ for at least 8
time slots (480µs)
If a ‘Slave’ device is present on the bus and is ready for communication
It should respond to the master with a ‘Presence’ pulse, within 60µs of the release
of the ‘Reset’ pulse by the master
The slave device(s) responds with a ‘Presence’ pulse by pulling the 1-Wire bus
‘LOW’ for a minimum of 1 time slot (60µs)
For writing a bit value of 1 on the 1-Wire bus, the bus master pulls the bus for 1 to
15µs and then releases the bus for the rest of the time slot
A bit value of ‘0’ is written on the bus by master pulling the bus for a minimum
of 1 time slot (60µs) and a maximum of 2 time slots (120µs)
To Read a bit from the slave device, the master pulls the bus ‘LOW’ for 1 to 15µs
If the slave wants to send a bit value ‘1’ in response to the read request from the
slave, it simply releases the bus for the rest of the time slot
If the slave wants to send a bit value ‘0’, it pulls the bus ‘LOW’ for the rest of the
time slot.
On-board Communication Interface – Parallel Interface
Parallel interface is normally used for communicating with peripheral
devices which are memory mapped to the host of the system
The host processor/controller of the embedded system contains a
parallel bus and the device which supports parallel bus can directly
connect to this bus system
The communication through the parallel bus is controlled by the
control signal interface between the device and the host
The ‘Control Signals’ for communication includes ‘Read/Write’ signal
and device select signal
The device normally contains a device select line and the device
becomes active only when this line is asserted by the host processor
The direction of data transfer (Host to Device or Device to Host) can
be controlled through the control signal lines for ‘Read’ and ‘Write’
Only the host processor has control over the ‘Read’ and ‘Write’ control
signals
D0 to Data Bus
Dx-1 Peripheral Device
RD\ RD\ (Eg: ADC)
WR\ WR\
Host Control Signals CS\
(Microprocessor/
Controller) Chip Select
Hardware level
It is used for finding the issues created by hardware problems
Software level
It is employed for finding the errors created by the flaws in the
software
Evolvability
• It is a term which is closely related to Biology
• It is referred as the non-heritable variation
Engineers from the software group take care of the software architecture development and implementation, and engineers from the hardware group are responsible for
building the hardware required for the product
There is less interaction between the two teams and the development happens either serially or in parallel and once the hardware and software are ready, the
integration is performed
The product requirements captured from the customer are converted into system level needs or processing requirements rather than partitioning them to either h/w
or s/w
The system level processing requirements are then transferred into functions which can be simulated and verified against performance and functionality
The Architecture design follows the system design. The partition of system level processing requirements into hardware and software takes place during the this phase
Each system level processing requirement is mapped as either hardware and/or software requirement