Embedded System Introduction
Embedded System Introduction
Embedded Systems
What is an embedded system?
A physical system that employs computer control for a specific purpose,
rather than for general-purpose computation.
Embedded systems are application specific & single functioned; application is known
apriori, the programs are executed repeatedly.
They generally have minimal or no user interface.
Embedded Systems is a special purpose computer system/board, which covers all the
devices such as processor, memory, interface and control in single package or board to
perform only a specific application tasks.
A “Short List” of Embedded Systems
Anti-lock brakes Fingerprint identifiers
Auto-focus cameras Home security systems
Automatic teller machine Medical testing systems
Automatic toll systems Modems
Automatic transmission MPEG decoders
Avionic systems Network cards
Battery chargers Network switches/routers
Camcorders Pagers
Cell phones Photocopiers
Cell-phone base stations Printers
Cordless phones Scanners
Cruise control Stereo systems
Digital cameras TV
Disk drives VCR
Electronic card readers Video game controllers
Electronic toys/games Video phones
Fax machines Washers and dryers
Embedded Systems
Embedded systems
information processing systems
embedded into a larger product
Two types of computing
Desktop – produced millions/year
Embedded – billions/year
Non-Embedded Systems
PCs, servers, and notebooks
The future of computing!
Automobiles, entertainment,
communication, aviation, handheld
devices, military and medical
equipments.
Components of Embedded Systems
Components of Embedded Systems
Analog components
- Sensors, controllers,…
Digital components
- Processor, coprocessors
- Memories
- Controllers, busses
- ASIC: Application-Specific Integrated Circuit, a chip designed for a
particular application
Converters – A/D, D/A, …
Software
- Application programs
- Exception handlers
Hardware components of an Embedded
System
CPU: Microprocessor/ Microcontroller/DSP
• Non Volatile memory: EPROM, Flash
• Volatile memory: DRAM, SRAM
• System clocks: RTC circuitry, System clock
• Standard devices: I/O ports, peripherals,
• Custom devices: FPGA, PAL
• Communication devices and drivers: Ethernet, RS-232, USART
• Debug mechanism: Debug port, Watchdog timer, JTAG, ICE
• Buses for device networks: I2C, CAN, SPI, etc.
Characteristics
Application specific
- Optimize for cost, area, power, and performance
Digital signal processing
- Signals are represented digitally
Reactive
- Reacts to changes in the system’s environment
Real-time
- Compute certain tasks before deadline
Distributed, networked,…
Characteristics
Reliability
- Probability of system working correctly at fixed time
Maintainability
- Probability of system working correctly fixed time units after error
occurred
Safety
- Not harmful for user
Security
- Confidential and authentic communication
Essential Considerations
- Big Endian
- Little Endian
- Big Endian
Eg: SPARC, power PC
Little Endian
Intel processors
• Configurable Processors
some processors can be configured during boot up process as big or little
endian. Eg: ARM processors
Based of instruction set
RISC
CISC
RISC
• Only load/store instructions use the external memory.
• All instructions are same size and fixed length.
• Number of instructions available are less compared to CISC.
• Typically has less pipeline stages than CISC.
Eg ARM processor.
Based of instruction set
CISC
Most instructions can operate directly on external memory.
• Hence require less number of registers.
• Instructions are of different sizes. Hence they take varied clock cycle to
decode and execute each instruction
• Pipeline stages take varied times and hence pipeline is not so efficient as
the RISC processors.
More number of instructions since many complex operations are
implemented
Eg: Intel Pentium processors
Based on Bus Architecture
Harvard Architecture
Von Neumann
Network Processors
Used in routers. Multiple processors are pipelined to process the network
packets in a optimal way.
Each processor processes multiple packets concurrently in multiple
threads.
Eg : IXP1200 from Intel
Traditional Design Challenges
Design complexity
Ultra low power
- Highly adaptive
- Active power management (voltage scaling, etc.)
- Alternative energy source (solar, etc.)
Internet aware
- Incorporate RF (radio frequency) technologies
- Networking capabilities
* Larger OS, middleware, etc.
* Understanding of many/changing protocols
Verification
Security
Block Diagram of an Embedded
Parallel
To external Processor I/O ports
memory core
Serial
I/O ports
Internal
memory
Counter/Timer
Processor
Figure 9.3. A block diagram of an embedded processor.
Design Issues
Cost
I/O capability
Size
Power consumption
On-Chip memory
Performance
Software
Instruction set
Development tools
Testability and reliability
Various types of Memory
Flash memory
high density, low cost, nonvolatile, fast and electrically erasable.
Flash devices can be erased one sector at a time.
sector sizes range from 256 bytes to 16 KB
NVRAM
usually SRAM with a battery backup when power is turned on, operates
just like SRAM when power is turned off, NVRAM draws power from battery
to retain its data
The Embedded Software Development
Process
The Tools
Linker: Organizes the object files, necessary libraries, and other data and
produces a relocatable file.
The Tools
Relocatable file: an object file that holds code and data suitable for linking
with other object files to create an executable or a shared object file. In
other word, you can say that relocatable file is a foundation for creating
executables and libraries.
Locator: Takes the relocatable file and information about the memory of
the system and produces an executable file.(By the way: gcc takes care
of all of these functions at once)
The Tools: Embedded System
Specifics
All of the tools run on the host computer, not the embedded computer.
Compiler
Assembler
Linker
Locator
Cross Compiler
A compiler that generates machine language for a different type of
computer than the one the compiler is running in.
Cross-compiling doesn’t guarantee correct target code due to (e.g.,
differences in word sizes, instruction sizes, variable declarations, library
functions)
Cross Assembler
An assembler that generates machine language for a different type of
computer than the one the assembler is running in. It is used to develop
programs for computers on a chip or microprocessors
used in specialized applications that are either too small or are otherwise
incapable of handling the development software.
Moving the program onto the
embedded system
Remember, the program is written (and possibly run in an emulator) on a
host computer, but it still needs to get onto the embedded system.
Methods:
Build/burn the program into the hardware (firmware or other flash
memory)
Bootloader: a bootloader resides on the embedded system and facilitates
loading programs onto the system.
Debug Monitor: The debug monitor is a more robust program on an
embedded system that helps with debugging, and can include a
bootloader as well.
Debugging
Emulators can be used to test the system without utilizing the actual
hardware
Device
Any peripheral such as a graphics display, disk driver, terminal, or printer is a
device. A device is usually considered to be a piece of hardware that you
can connect to your computer system and that you wish to manipulate by
sending commands and data.
Device Drivers