Professional Documents
Culture Documents
SUSHMA RAWAL
SUSHMA RAWAL
SUSHMA RAWAL
Definition
An embedded system is a computer system designed to perform one or a few dedicated functions often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs.
SUSHMA RAWAL
Definition
Embedded systems control many devices in common use today. Since the embedded system is dedicated to specific tasks, design engineers can optimize it to reduce the size and cost of the product and increase the reliability and performance. Some embedded systems are mass-produced, benefiting from economies of scale. User could select the functionality but cannot define the functionality. Embedded system is designed to perform one or limited number of functions, may be with choices or options.
SUSHMA RAWAL
5
An embedded system is a computer system with higher quality and reliability requirements than other types of computer systems.
SUSHMA RAWAL
Embedding a computer
output analog
CPU
input
analog
embedded computer
mem
SUSHMA RAWAL
Real time system A real time system is one in which the correctness of the computations not only depends on the logical correctness of the computations but also on the time at which the result is produced. If the timing constraints are not met, system failure is said to have occurred.
SUSHMA RAWAL
Real-Time systems
Realtime systems are those which can guarantee the completion of certain tasks within a predefined period of time with expected results.
SUSHMA RAWAL
Application areas
Automotive: Ignition System, Engine Control, Brake System Industrial Control: Robotics and Control Systems Networking: Routers, Hubs Office Automation: Fax Machine, Printers, Scanners
SUSHMA RAWAL
11
Application areas
Embedded systems range from portable devices such as digital watches and MP3 players, to large stationary installations like traffic lights, factory controllers, or the systems controlling nuclear power plants
SUSHMA RAWAL
12
SUSHMA RAWAL
13
Embedded systems are designed to do some specific task, rather than be a general-purpose computer for multiple tasks. Some also have real-time performance constraints that must be met, for reasons such as safety and usability. Others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs
SUSHMA RAWAL
14
SUSHMA RAWAL
15
SUSHMA RAWAL
16
SUSHMA RAWAL
17
SUSHMA RAWAL
19
SUSHMA RAWAL
20
Why do we care?
Estimated 98% of 8 Billion CPUs produced in 2000 used for embedded applications
Where Are the Processors?
Direct 2% Robots Vehicles 6% 12%
SUSHMA RAWAL
21
SUSHMA RAWAL
22
Increasingly networked
to eliminate host, and remotely monitor/debug embedded Web servers
e.g. Mercedes car with web server
SUSHMA RAWAL
24
Machine instructions
SW/HW codesign
Implementation Microprocessor plus program VLSI, ASIC, or PLD bits: software implementation: hardware
The choice of hardware versus software for a particular function is simply a tradeoff among various design metrics, like performance, power, size, and especially flexibility; there is no fundamental difference between what hardware or software can implement.
SUSHMA RAWAL
25
Essential Considerations
Response Time -- Real Time Systems Area Cost Portability Low Power (Battery Life) Fault Tolerance-continue operation despite hardware and software faults
SUSHMA RAWAL
27
SUSHMA RAWAL
28
Processor Classifications
Based on register size
-8 bit -32 bit
Based on Endianness
- Big Endian - Little Endian
Processor Classifications
Based on Bus Architecture
-Von Neumann Architecture -Harvard Architecture
Based on Functionality
-General purpose Processors -Special purpose Processors-DSP, Network
SUSHMA RAWAL
30
SUSHMA RAWAL
31
Based on Endianness
Big Endian Eg: SPARC, power PC Little Endian Intel processors Configurable Processors some processors can be configured during bootup process as big or little endian. Eg: ARM processors
SUSHMA RAWAL
32
SUSHMA RAWAL
35
Harvard Architecture refers to a memory structure where the processor is connected to two different memory banks via two sets of buses This is to provide the processor with two distinct data paths, one for instruction and one for data Through this scheme, the CPU can read both an instruction and data from the respective memory banks at the same time This inherent independence increases the throughput of the machine by enabling it to always prefetch the next instruction The cost of such a system is complexity in hardware Commonly used in DSPs
SUSHMA RAWAL
37
SUSHMA RAWAL
38
Based on Functionality
General purpose processors: - All the regular processors Special purpose processors: - Digital Signal Processors
DSP processors are microprocessors designed for efficient mathematical manipulation of digital signals. They are optimized for doing intense addition and multiplication operations.
SUSHMA RAWAL
39
Based on Functionality
-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
SUSHMA RAWAL
40
SUSHMA RAWAL
42
SUSHMA RAWAL
43
SUSHMA RAWAL
44
SUSHMA RAWAL
45
SUSHMA RAWAL
46
The Tools
Compiler: Translates human readable code into assembly language or opcodes for a particular processor. Produces an object file. Assembler: Translates assembly language into opcodes. Also produces an object file. Linker: Organizes the object files, necessary libraries, and other data and produces a relocatable file.
SUSHMA RAWAL
47
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)
SUSHMA RAWAL
48
SUSHMA RAWAL
49
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.
SUSHMA RAWAL
50
Debugging
Debugging embedded systems can be facilitated with a Debug Monitor, or through a remote debugger on the host computer. A serial link is normally set up. Emulators can be used to test the system without utilizing the actual hardware A complete emulator provides a simulation of all aspects of the hardware, allowing all of it to be controlled and modified, and allowing debugging on a normal PC.
SUSHMA RAWAL
52
Debugging
An in-circuit debugger (ICD), a hardware device that connects to the microprocessor via a JTAG or Nexus interface. This allows the operation of the microprocessor to be controlled externally, but is typically restricted to specific debugging capabilities in the processor An in-circuit emulator (ICE) is a hardware device used to debug the software of an embedded system. An in-circuit emulator replaces the microprocessor with a simulated equivalent, providing full control over all aspects of the microprocessor. In-circuit emulation can also refer to the use of hardware emulation, when the emulator is plugged into a system (not always embedded) in place of a yet-to-be-built chip (not always a processor). These in-circuit emulators provide a way to run the system with "live" data while still allowing relatively good SUSHMA debugging capabilities. RAWAL
53
Debugging
Software Simulators allow the programmer to debug completely on the host system, which can be quicker . When it comes down to it, an oscilloscope and a multimeter can be your best friend for debugging.
SUSHMA RAWAL
54
Device Drivers
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.
SUSHMA RAWAL
55
Device Drivers
Three Classes of Device Character Devices ex: Key board, mouse, monitor, printer, Tape, etc., Block Devices Ex: CD-ROM, floppy, Hard disk, etc., Network Interfaces ex: Ethernet card, etc.,
SUSHMA RAWAL
56
Device Drivers
The OS interacts with devices through a program known as Device Driver A device driver is a specific type of computer software developed to allow interaction with hardware devices. Typically this constitutes an interface for communicating with the device, through the specific computer bus or communications subsystem that the hardware is connected to, providing commands to and/or receiving data from the device, and on the other end, the requisite interfaces to the operating system and software applications
SUSHMA RAWAL
57
Device Drivers
Structure of Device Driver is OS specific Some RTOS allow device drivers to be installed and removed dynamically. Statically linked driver, whose object code is linked with the kernel. The code of such device driver is physically contained in the kernel and therefore loaded in memory when the system boots. Dynamically linked driver, whose object code is NOT linked with the kernel. The code of such device driver is NOT contained in the kernel, and the device driver is loaded and unloaded as and when required.
SUSHMA RAWAL
58
SUSHMA RAWAL
59
Characteristics of an Embedded OS
Small footprint Memory Resident: size is important consideration
Data structure optimized Kernel optimized and usually in assembly language
Modular & extendible Provide efficient methods for resource management Real-time scheduling
tight-coupled scheduler and interrupts
SUSHMA RAWAL Power management capabilities
60
SUSHMA RAWAL
61
SUSHMA RAWAL
62