4/10/2010

Paper Presentation.

EMBEDDED SYSTEMS

4/10/2010

AN APPROACH TOWARDS TOPIC

4/10/2010

Section I

I TRODUCTION OF TOPIC

4/10/2010

INTRODUCTION OF TOPIC
´

´

pproximately 3 billion embedded CPUs are sold each year, with smaller (4-, 8-, and 16-bit) CPUs dominating by quantity and aggregate dollar amount. Yet, most research and tool development seems to be focused on the needs of high-end desktop and military/aerospace embedded computing. This paper seeks to expand the area of discussion to encompass a wide range of embedded systems. The extreme diversity of embedded applications makes generalizations difficult. Nonetheless, there is emerging interest in the entire range of embedded systems (and the related field of hardware/software code sign

4/10/2010

INTRODUCTION OF TOPIC
´

´

This paper and the accompanying tutorial seek to identify significant areas in which embedded computer design differs from more traditional desktop computer design. They also present "design challenges" encountered in the course of designing several real systems. These challenges are both opportunities to improve methodology and tool support as well as impediments to deploying such support to embedded system design teams. In some cases research and development has already begun in these areas -- and in other cases it has not. The observations in this paper come from the author's experience with commercial as well as military applications, development methodologies, and life-cycle support. All characterizations are implicitly qualified to indicate a typical, representative, or perhaps simply an anecdotal case rather than a definitive statement about all embedded systems. While it is understood that each embedded system has its own set of unique requirements, it is hoped that the generalizations and examples presented here will provide a broad-brush basis for discussion and evolution of CAD tools and design methodologies

4/10/2010

BASIC CONCEPTS: A OVERLOOK
´

´

´

´ ´

´

Digital electronics are electronics systems that use digital signals. Digital electronics are representations of Boolean algebra and are used in computers, mobile phones, and other consumer products. Digital electronics or any digital circuit are usually made from large assemblies of logic gates, simple electronic representations of Boolean logic functions. To most electronic engineers, the terms "digital circuit", "digital system" and "logic" are interchangeable in the context of digital circuits. The usual advantages of digital circuits when compared to analog circuits are: Digital systems interface well with computers and are easy to control with software. New features can often be added to a digital system without changing hardware. Often this can be done outside of the factory by updating the product's software. So, the product's design errors can be corrected after the product is in a customer's hands. Information storage can be easier in digital systems than in analog ones. The noiseimmunity of digital systems permit data to be stored and retrieved without degradation. In an analog system, noise from aging and wear degrade the information stored. In a digital system, as long as the total noise is below a certain level, the information can be recovered perfectly.

4/10/2010

BASIC CONCEPTS: A OVERLOOK
´

A kind of computer architecture that has a large number of instructions hard coded into the cpu chip.

´
´

CISC
Computer architecture that uses a limited number of instructions. RISC became popular in microprocessors in the 1980s. The traditional CISC (Complex Instruction Set Computing) architecture uses many instructions that do long, complex operations. Each RISC instruction is executed much more quickly than a CISC instruction, and most computational tasks can be processed faster. Modern instruction sets combine attributes of CISC and RISC

´
´

RISC
RISC processor [Reduced Instruction Set Computer], computer arithmetic-logic unit that uses a minimal instruction set, emphasizing the instructions used most often and optimizing them for the fastest possible execution. Software for RISC processors must handle more operations than traditional CISC [Complex Instruction Set Computer] processors, but RISC processors have advantages in applications that benefit from faster instruction execution, such as engineering and graphics workstations and parallel-processing systems. They are also less costly to design, test, and manufacture. In the mid-1990s RISC processors began to be used in personal computers instead of the CISC processors that had been used since the introduction of the microprocessor

4/10/2010

BASIC CONCEPTS: A OVERLOOK
´ ´

´ ´

´ ´

Preemptive Multitasking Preemptive multitasking is task in which a computer operating system uses some criteria to decide how long to allocate to any one task before giving another task a turn to use the operating system. The act of taking control of the operating system from one task and giving it to another task is called preempting. A common criterion for preempting is simply elapsed time (this kind of system is sometimes called time sharing or time slicing). In some operating systems, some applications can be given higher priority than other applications, giving the higher priority programs control as soon as they are initiated and perhaps longer time slices. Semaphore A hardware or software flag. In multitasking systems, a semaphore is a variable with a value that indicates the status of a common resource. It's used to lock the resource that is being used. A process needing the resource checks the semaphore to determine the resource's status and then decides how to proceed. Kernel The kernel is the essential center of a computer operating system, the core that provides basic services for all other parts of the operating system. A synonym is nucleus. A kernel can be contrasted with a shell, the outermost part of an operating system that interacts with user commands. Kernel and shell are terms used more frequently in Unix operating systems than in IBM mainframe or Microsoft Windows systems.

4/10/2010

BASIC CONCEPTS: A OVERLOOK
´
´

Exokernels
An exokernels eliminates the notion that an operating system should provide abstractions on which applications are built. Instead, it concentrates solely on securely multiplexing the raw hardware: from basic hardware primitives, application-level libraries and servers can directly implement traditional operating system abstractions, specialized for appropriateness and speed.

Flash Memory
´

Flash memory (sometimes called "flash RAM") is a type of constantly-powered nonvolatile memory that can be erased and reprogrammed in units of memory called blocks. It is a variation of electrically erasable programmable read-only memory (EEPROM) which, unlike flash memory, is erased and rewritten at the byte level, which is slower than flash memory updating. Flash memory is often used to hold control code such as the basic input/output system (BIOS) in a personal computer. When BIOS needs to be changed (rewritten), the flash memory can be written to in block (rather than byte) sizes, making it easy to update. On the other hand, flash memory is not useful as random access memory (RAM) because RAM needs to be addressable at the byte (not the block) level.

4/10/2010

BASIC CONCEPTS: A OVERLOOK
´ ´

Co-operative Multitasking A type of multitasking in which the process currently controlling the CPU must offer control to other processes. It is called cooperative because all programs must cooperate for it to work. If one program does not cooperate, it can hog the CPU

´
´

Microkernel
A microkernel (abbreviated 5K or uK) can be considered a compact kernel as it performs only the basic functions universal to all computers. Designed to be integrated into different operating systems, a microkernel works with OS-specific servers that provide higher level functions. A microkernel is a component-based structure which improves portability at the expense of performance

´
´

Monolithic Kernel
A monolithic kernel is a kernel architecture where the entire kernel is run in kernel space in supervisor mode. In common with other architectures (microkernel, hybrid kernels), the kernel defines a high-level virtual interface over computer hardware, with a set of primitives or system calls to implement operating system services such as process management, concurrency, and memory management in one or more modules

4/10/2010

BASIC CONCEPTS: A OVERLOOK
´

A microprocessor incorporates the functions of a central processing unit (CPU) on a single integrated circuit (IC). The first microprocessors used a word size of only 4 bits, so that the transistors of its logic circuits would fit onto a single part. One or more microprocessors typically serve as the processing elements of a computer system, embedded system, or handheld device. Microprocessors made possible the advent of the microcomputer in the mid1970s. Before this period, CPUs were typically made from small-scale integrated circuits containing the equivalent of only a few transistors. By integrating the processor onto one or a very few large-scale integrated circuit packages (containing the equivalent of thousands or millions of discrete transistors), the cost of processing capacity was greatly reduced. Since the advent of the microprocessor in the mid 1970's, it has now become the most prevalent implementation of the CPU, almost completely replacing all other forms.

4/10/2010

Section II

WHAT IS EMBEDDED SYSTEM

4/10/2010

WHAT IS EMBEDDED SYSTEM
´Science
´

and Technology View

Computer systems that cannot be programmed by the user because they are preprogrammed for a specific task and are buried within the equipment they serve. The term derives from the military, where computer systems are generally activated by the flip of a switch or the push of a button. The continual increase in the densities of ever-smaller microprocessors, on silicon chips that fit on a thumbnail, and the attendant decreases in their costs, has pushed the concept of embedded systems well beyond the original military applications. Embedded systems are also used in industrial, automotive, consumer, and medical applications. Most embedded microprocessors are of the CISC (complex-instruction-set computer) type, and most of these are used in applications where low cost is paramount and performance is secondary microprocessors of the RISC (reduced-instruction-set computer) type have appeared, with much greater computational capability and at greater cost. RISC processors are used mostly in those embedded applications where performance is primary and low cost is secondary

´

´

4/10/2010

WHAT IS EMBEDDED SYSTEM
´ Computer
´

Technology View

´

´

Any electronic system that uses a CPU chip, but that is not a general-purpose workstation, desktop or laptop computer. Such systems generally use microprocessors, or they may use custom-designed chips or both. They are used in automobiles, planes, trains, space vehicles, machine tools, cameras, consumer electronics, office appliances, cell phones, PDAs and other handhelds as well as robots and toys. The uses are endless, and billions of microprocessors are shipped every year for a myriad of applications. In embedded systems, the software typically resides in firmware, such as a flash memory or ROM chip, in contrast to a general-purpose computer that loads its programs into RAM each time. Sometimes, single board and rack mounted general-purpose computers are called "embedded computers" if used to control a single printer, drill press or other such device. A specialized computer system that is part of a larger system or machine. Typically, an embedded system is housed on a single microprocessor board with the programs stored in ROM. Virtually all appliances that have a digital interface -- watches, microwaves, VCRs, cars -- utilize embedded systems. Some embedded systems include an operating system, but many are so specialized that the entire logic can be implemented as a single program.

4/10/2010

EXAMPLE OF EMBEDDED SYSTEM

4/10/2010

EXAMPLE OF EMBEDDED SYSTEM
´

´ ´ ´

´

In addition to the CPU and memory hierarchy, there are a variety of interfaces that enable the system to measure, manipulate, and otherwise interact with the external environment. Some differences with desktop computing may be: The human interface may be as simple as a flashing light or as complicated as real-time robotic vision. The diagnostic port may be used for diagnosing the system that is being controlled -- not just for diagnosing the computer. Special-purpose field programmable (FPGA), application specific (ASIC), or even non-digital hardware may be used to increase performance or safety. Software often has a fixed function, and is specific to the application.

4/10/2010

4 MAIN TYPES OF EMBEDDED DESI NS

4/10/2010

Section III

EMBEDDED SYSTEM DESIGN REQUIREMENTS

4/10/2010

EMBEDDED SYSTEM DESIGN REQUIREMENTS Real time/Reactive operation ´ Small size, Low weight ´ Safe and Reliable ´ Harsh environment ´ Cost sensitivity
´

4/10/2010

REAL TIME/REA TIVE OPERATION
´

´

´ ´

Real time system operation means that the correctness of a computation depends, in part, on the time at which it is delivered. In many cases the system design must take into account worst case performance. Predicting the worst case may be difficult on complicated architectures, leading to overly pessimistic estimates erring on the side of caution. The Signal Processing and Mission Critical example systems have a significant requirement for real time operation in order to meet external I/O and control stability requirements. Reactive computation means that the software executes in response to external events. These events may be periodic, in which case scheduling of events to guarantee performance may be possible. On the other hand, many events may be a periodic, in which case the maximum event arrival rate must be estimated in order to accommodate worst case situations. Most embedded systems have a significant reactive component. Design challenge: Worst case design analyses without undue pessimism in the face of hardware with statistical performance characteristics.

4/10/2010

SMALL SIZE, LOW WEIGHT
´

Many embedded computers are physically located within some larger artifact. Therefore, their form factor may be dictated by aesthetics, form factors existing in pre-electronic versions, or having to fit into interstices among mechanical components. In transportation and portable systems, weight may be critical for fuel economy or human endurance. Among the examples, the Mission Critical system has much more stringent size and weight requirements than the others because of its use in a flight vehicle, although all examples have restrictions of this type. Design challenges: Non-rectangular, non-planar geometries. Packaging and integration of digital, analog, and power circuits to reduce size

´ 1. 2.

4/10/2010

. SA E AND RELIABLE
´

´

Some systems have obvious risks associated with failure. In missioncritical applications such as aircraft flight control, severe personal injury or equipment damage could result from a failure of the embedded computer. Traditionally, such systems have employed multiply-redundant computers or distributed consensus protocols in order to ensure continued operation after an equipment failure However, many embedded systems that could cause personal or property damage cannot tolerate the added cost of redundancy in hardware or processing capacity needed for traditional fault tolerance techniques. This vulnerability is often resolved at the system level as discussed later. Design challenge: Low-cost reliability with minimal redundancy.

´ ´

4/10/2010

HARSH ENVIRONMENT
´

´

Many embedded systems do not operate in a controlled environment. Excessive heat is often a problem, especially in applications involving combustion (e.g., many transportation applications). Additional problems can be caused for embedded computing by a need for protection from vibration, shock, lightning, power supply fluctuations, water, corrosion, fire, and general physical abuse. For example, in the Mission Critical example application the computer must function for a guaranteed, but brief, period of time even under nonsurvivable fire conditions. Design challenges: Accurate thermal modeling. De-rating components differently for each design, depending on operating environment

´ ´ ´

4/10/2010

COST SENSITIVITY
´

´

Even though embedded computers have stringent requirements, cost is almost always an issue (even increasingly for military systems). Although designers of systems large and small may talk about the importance of cost with equal urgency, their sensitivity to cost changes can vary dramatically. A reason for this may be that the effect of computer costs on profitability is more a function of the proportion of cost changes compared to the total system cost, rather than compared to the digital electronics cost alone. For example, in the Signal Processing system cost sensitivity can be estimated at approximately $1000 (i.e., a designer can make decisions at the $1000 level without undue management scrutiny). However, with in the Small system decisions increasing costs by even a few cents attract management attention due to the huge multiplier of production quantity combined with the higher percentage of total system cost it represents. Design challenge: Variable "design margin" to permit tradeoff between product robustness and aggressive cost optimization.

´ ´

4/10/2010

Section IV

SYSTEM-LEVEL REQUIREMENTS

4/10/2010

SYSTEM-LEVEL REQUIREMENTS
End-product utility ´ System safety & Reliability ´ Controlling physical systems ´ ower management
´

4/10/2010

END-PRODUCT UTILITY
´

´

´ ´

The utility of the end product is the goal when designing an embedded system, not the capability of the embedded computer itself. Embedded products are typically sold on the basis of capabilities, features, and system cost rather than which CPU is used in them or cost/performance of that CPU. One way of looking at an embedded system is that the mechanisms and their associated I/O are largely defined by the application. Then, software is used to coordinate the mechanisms and define their functionality, often at the level of control system equations or finite state machines. Finally, computer hardware is made available as infrastructure to execute the software and interface it to the external world. While this may not be an exciting way for a hardware engineer to look at things, it does emphasize that the total functionality delivered by the system is what is paramount. Design challenge: Software- and I/O-driven hardware synthesis (as opposed to hardwaredriven software compilation/synthesis).

4/10/2010

SYSTEM SA ETY
´

RELIABILITY

´

´ ´ ´ ´

An earlier section discussed the safety and reliability of the computing hardware itself. But, it is the safety and reliability of the total embedded system that really matters. The Distributed system example is mission critical, but does not employ computer redundancy. Instead, mechanical safety backups are activated when the computer system loses control in order to safely shut down system operation. A bigger and more difficult issue at the system level is software safety and reliability. While software doesn't normally "break" in the sense of hardware, it may be so complex that a set of unexpected circumstances can cause software failures leading to unsafe situations. This is a difficult problem that will take many years to address, and may not be properly appreciated by non-computer engineers and managers involved in system design decisions. Design challenges: Reliable software. Cheap, available systems using unreliable components. Electronic vs. non-electronic design tradeoffs.

4/10/2010

CONTROLLING PHYSICAL SYSTEMS
´

´

´ ´

The usual reason for embedding a computer is to interact with the environment, often by monitoring and controlling external machinery. In order to do this, analog inputs and outputs must be transformed to and from digital signal levels. Additionally, significant current loads may need to be switched in order to operate motors, light fixtures, and other actuators. All these requirements can lead to a large computer circuit board dominated by non-digital components. In some systems "smart" sensors and actuators (that contain their own analog interfaces, power switches, and small CPUS) may be used to off-load interface hardware from the central embedded computer. This brings the additional advantage of reducing the amount of system wiring and number of connector contacts by employing an embedded network rather than a bundle of analog wires. However, this change brings with it an additional computer design problem of partitioning the computations among distributed computers in the face of an inexpensive network with modest bandwidth capabilities. Design challenge: Distributed system tradeoffs among analog, power, mechanical, network, and digital hardware plus software.

4/10/2010

POWER MANAGEMENT
´ ´

´ ´

Power management A less pervasive system-level issue, but one that is still common, is a need for power management to either minimize heat production or conserve battery power. While the push to laptop computing has produced "low-power" variants of popular CPUs, significantly lower power is needed in order to run from inexpensive batteries for 30 days in some applications, and up to 5 years in others. Design challenge: Ultra-low power design for long-term battery operation.

4/10/2010

Section V

EMBEDDED SOFTWARE ARCHITECTURES

4/10/2010

EMBEDDED SOFTWARE ARCHITECTURES
Simple control loop ´ Interrupt controlled system ´ Cooperative multitasking ´ reemptive multitasking or multithreading ´ Microkernel's and exokernels ´ Monolithic kernels ´ Exotic custom operating systems
´

4/10/2010

SIMPLE CONTROL LOOP
´

In this design, the software simply has a loop. The loop calls subroutines, each of which manages a part of the hardware or software

4/10/2010

INTERRUPT CONTROLLED SYSTEM
´

´ ´

´

Some embedded systems are predominantly interrupt controlled. This means that tasks performed by the system are triggered by different kinds of events. An interrupt could be generated for example by a timer in a predefined frequency, or by a serial port controller receiving a byte. These kinds of systems are used if event handlers need low latency and the event handlers are short and simple. Usually these kinds of systems run a simple task in a main loop also, but this task is not very sensitive to unexpected delays. The tasks performed in the interrupt handlers should be kept short to keep the interrupt latency to a minimum. Sometimes the interrupt handler will add longer tasks to a queue structure. Later, after the interrupt handler has finished, these tasks are executed by the main loop. This method brings the system close to a multitasking kernel with discrete processes.

4/10/2010

COOPERATIVE MULTITASKING
´

´

A nonpreemptive multitasking system is very similar to the simple control loop scheme, except that the loop is hidden in an API. The programmer defines a series of tasks, and each task gets its own environment to "run" in. Then, when a task is idle, it calls an idle routine (usually called "pause", "wait", "yield", "nop" (Stands for no operation), etc.). The advantages and disadvantages are very similar to the control loop, except that adding new software is easier, by simply writing a new task, or adding to the queue-interpreter.

PREEMPTIVE MULTITASKING OR MULTITHREADING
´

4/10/2010

´

´

In this type of system, a low-level piece of code switches between tasks or threads based on a timer. This is the level at which the system is generally considered to have an "operating system", and introduces all the complexities of managing multiple tasks or threads running seemingly at the same time. Any piece of task or thread code can damage the data of another task or thread; they must be precisely separated. Access to shared data must be controlled by some synchronization strategy, such as message queues, semaphores or a non-blocking synchronization scheme. Because of these complexities, it is common for organizations to buy a real-time operating system, allowing the application programmers to concentrate on device functionality rather than operating system services.

4/10/2010

MICROKERNELS AND EXOKERNELS
´

´

´

A microkernel is a logical step up from a real-time OS. The usual arrangement is that the operating system kernel allocates memory and switches the CPU to different threads of execution. User mode processes implement major functions such as file systems, network interfaces, etc. In general, microkernel's succeed when the task switching and intertask communication is fast, and fail when they are slow. Exokernels communicate efficiently by normal subroutine calls. The hardware, and all the software in the system are available to, and extensible by application programmers.

4/10/2010

MONOLITHIC KERNELS
´

´ ´

´ ´ ´

In this case, a relatively large kernel with sophisticated capabilities is adapted to suit an embedded environment. This gives programmers an environment similar to a desktop operating system like Linux or Microsoft Windows, and is therefore very productive for development; on the downside, it requires considerably more hardware resources, is often more expensive, and because of the complexity of these kernels can be less predictable and reliable. Common examples of embedded monolithic kernels are Embedded Linux and Windows CE. Despite the increased cost in hardware, this type of embedded system is increasing in popularity, especially on the more powerful embedded devices such as Wireless Routers and GPS Navigation Systems. Here are some of the reasons: Ports to common embedded chip sets are available. They permit re-use of publicly available code for Device Drivers, Web Servers, Firewalls, and other code. Development systems can start out with broad feature-sets, and then the distribution can be configured to exclude unneeded functionality, and save the expense of the memory that it would consume.

4/10/2010

MONOLITHIC KERNELS
´

´

´ ´ ´

Many engineers believe that running application code in user mode is more reliable, easier to debug and that therefore the development process is easier and the code more portable. Many embedded systems lack the tight real time requirements of a control system. A system such as Embedded Linux has fast enough response for many applications. Features requiring faster response than can be guaranteed can often be placed in hardware. Many RTOS systems have a per-unit cost. When used on a product that is or will become a commodity, that cost is significant.

4/10/2010

EXOTIC CUSTOM OPERATING SYSTEMS
´

A small fraction of embedded systems require safe, timely, reliable or efficient behavior unobtainable with the one of the above architectures. In this case an organization builds a system to suit. In some cases, the system may be partitioned into a "mechanism controller" using special techniques, and a "display controller" with a conventional operating system. A communication system passes data between the two.

4/10/2010

CHARACTERS OF SYSTEM
1.

2.

3.

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 reason such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs. Embedded systems are not always separate devices. Most often they are physically built-in to the devices they control.[ The software written for embedded systems is often called firmware, and is stored in read-only memory or Flash memory chips rather than a disk drive. It often runs with limited computer hardware resources: small or no keyboard, screen, and little memory.

4/10/2010

CONCLUSION OF PRESENTATION
1)

2)

3)

Many embedded systems have requirements that differ significantly both in details and in scope from desktop computers. In particular, the demands of the specific application and the interface with external equipment may dominate the system design. Also, long life-cycles and in some cases extreme cost sensitivity require more attention to optimization based on these goals rather than maximizing the computational throughput. The business and cultural climates in many embedded system design situations are such that traditional simulation-based computer design techniques may not be viable in their current form. Such methodologies may not be cost-effective given constraints on categories of expenditures, may not be seen as worthwhile by non-computer-trained professionals, or may simply be solving the wrong problems. Recent interest in hardware/software code sign is a step in the right direction, as it permits tradeoffs between hardware and software that are critical for more cost-effective embedded systems. However, to be successful future tools may well need to increase scope even further to include life-cycle issues and business issues

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.