1-embedded systems an introduction-r

Upload: ahsankhan01

Post on 09-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 1-Embedded Systems An Introduction-R

    1/41

    Embedded SystemsInstructor: Shaftab Ahmed

    Lecture # 1

    Reference

    Embedded System DesignVahid / Givargis

  • 8/7/2019 1-Embedded Systems An Introduction-R

    2/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 2

    An embedded system is a special-purposecomputer system designed to perform one or a fewdedicated functions, often with real-time computingconstraints.

    It is usually a part of complete device includinghardware and mechanical parts.On the other hand a general-purpose computer likePersonal Computer, can do many different tasks

    depending on programming.Embedded systems control many of the commondevices in use today e.g. Washing Machine, Camera,Mobile and Microwave Oven etc.

    What is an Embedded System

  • 8/7/2019 1-Embedded Systems An Introduction-R

    3/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 3

    More Examples of Embedded Systems

    Air conditioner ATM machineBattery charger

    Digital cameraDVD player Fax machineHome security systemMobile phone

    Modem

    Navigation systemPDAPhotocopier Printer Router Scanner TVVideo game consoleWearable computer

  • 8/7/2019 1-Embedded Systems An Introduction-R

    4/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 4

    History

    In the earliest years of computers in 1930 40s,computers were sometimesdedicated to a single purposetask.

    One of the first recognizablymodern embedded systemwas the Apollo GuidanceComputer

    Developed by Charles StarkDraper at the MITInstrumentation Laboratory .

  • 8/7/2019 1-Embedded Systems An Introduction-R

    5/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 5

    Characteristics (1/4)

    Special-purposeTypically designed toexecute a single programsequence repeatedly

    Washing Machines

    Microwave Oven

  • 8/7/2019 1-Embedded Systems An Introduction-R

    6/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 6

    Characteristics (2/4)

    Tightly constrainedLow costSimple systemsFewer components based

    Performs functions fastenoughMinimum power

  • 8/7/2019 1-Embedded Systems An Introduction-R

    7/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 7

    Characteristics (3/4)

    Reactive and real-timeReactive: Continually reacts to external eventsReal-time: Must compute certain results in real-time

  • 8/7/2019 1-Embedded Systems An Introduction-R

    8/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 8

    Characteristics (4/4)

    Hardware and software co-exist

    The software written for embedded systems isoften called firmware

    Is stored in read-onlymemory or Flash memorychips rather than a diskdrive

  • 8/7/2019 1-Embedded Systems An Introduction-R

    9/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 9

    Differences from usual computer programs

    Several components of vastlydifferent functionalities are found inembedded system softwareEach software component executionspeed must be optimumSoftware must have controlledcomplexity and must be thoroughlytested and debugged for errorsResponse time constraint and strictdeadlinesAll components must use the

    memory optimally

  • 8/7/2019 1-Embedded Systems An Introduction-R

    10/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 10

    Real-Time Operating System

    RTOS is essential for large scale embedded systems.It is an Operating System for response time-controlled and event-controlled processes.

  • 8/7/2019 1-Embedded Systems An Introduction-R

    11/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 11

    Real-Time Operating System

    Modules of a RTOS include:1. Basic OS function2. Time Management3. Predictability4. Priorities Management5. IPC Synchronization6. Time slicing7. Hard and soft real-time operability

  • 8/7/2019 1-Embedded Systems An Introduction-R

    12/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 12

    Embedded OS players

    Mentor Graphics VRTXPalm Computing PalmOSSymbian SymbianOSReal-time control Embedded NT/XPInternet devices Windows CE (CE.NET)Handheld PCs and PDAs Pocket PC 2002Open Software RTLinuxTiny Operating System TOS

  • 8/7/2019 1-Embedded Systems An Introduction-R

    13/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 13

    System on chip (SoC)

    SoC Integrates all components of a computer or other electronic system into a single integrated circuit (chip).It may contain digital, analog, mixed-signal, and oftenradio-frequency functions all on one chip.Typical application of SOC is embedded systems likeMicrowave oven controller.SiP (System in Package) contains a SoC in anapplication package to perform intelligent functions

  • 8/7/2019 1-Embedded Systems An Introduction-R

    14/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 14

    Software Development

    The software development process can berepresented by lifecycle e.g.SDLC System Development Life CycleWaterfall or Linear incremental modelFour stages of developing an embedded system

    AnalysisDesign

    ImplementationMaintenance

  • 8/7/2019 1-Embedded Systems An Introduction-R

    15/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 15

    U ser Interface

    Embedded systems range fromNo user interface at allDedicated only to one taskFull user interfaces similar todesktop operating systems indevices such as PDAs.

  • 8/7/2019 1-Embedded Systems An Introduction-R

    16/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 16

    Digital Camera Functional Block Diagram

  • 8/7/2019 1-Embedded Systems An Introduction-R

    17/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 17

    Challenges and Opportunities

    ChallengesDiversity of operating environments and platformsposes a real challenge in deploying software acrossmultiple platforms and configurations.Portability and reusability of the applications.

    OpportunitiesOpen Software Development i.e. U se of embeddedoperating systems providing POSIX interface.

  • 8/7/2019 1-Embedded Systems An Introduction-R

    18/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 18

    Implementation Issues

    Computing performanceIn a real time embedded control environment is not simply aninstructions- per-second rating.

    While raw computational performance is important, other factors which are vital to system performance include interruptresponse characteristics, context switching over head, and I/Operformance.Since real time tasks are characterized by frequent, oftenunpredictable events, the performance of a processor athandling interrupts is crucial to its suitability for real time

    processing.Since a control application usually involves a reasonableamount of communication with the outside world (such asreading sensors and activating control circuits), good I/Operformance is also important.

  • 8/7/2019 1-Embedded Systems An Introduction-R

    19/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 19

    Implementation Issues:

    The same resource must be shared betweendifferent tasks.

    Sharing As a result of this competition for the CP U use, thetiming of the tasks is not fully determined and thetime delays should be taken into account.

    Alternative control algorithms should be ready to get the control of the process.

    Adaptation:Working in a changeable environment, the controlgoals and options may change and the controlalgorithms should be adequate to new scenarios.

  • 8/7/2019 1-Embedded Systems An Introduction-R

    20/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 20

    Working conditions, such as priority, allocated timeand memory or signals availability may change.

    Thus, complexity, structure and basic propertiesof the control system will change.

    V ariable delays should be considered .The synchronicity of signals cannot be ensuredanymore.

    V alidation and certification. Any embedded control system should be provedto be reliable and safety operation should beensured.

    Implementation Issues:

  • 8/7/2019 1-Embedded Systems An Introduction-R

    21/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 21

    General Purpose Processors

    Data Path consists of thecircuitry for transforming dataand for storing temporary data.

    It contains AL U and Register File

    The functionality available inGeneral Purpose Processorsinclude:

    Control U nitCP U Register files

    On-Chip Multi level CachesInstruction Set ArchitectureOn-Chip peripheralsPipeline RequirementsMultiplicity of CP U coresArithmetic Computation

  • 8/7/2019 1-Embedded Systems An Introduction-R

    22/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed 22

    Single-purpose processors (SPP)

    Single-purpose processors containdigital circuits designed to executeexactly one program e.g. coprocessor,accelerator or peripheralFeatures

    Contains only the componentsneeded to execute a single programNo program memory

    BenefitsFastLow power Small sizeSmall Datapath

  • 8/7/2019 1-Embedded Systems An Introduction-R

    23/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed23

    Digital Signal Processor (DSP)

    DSP is an example of single purpose processor that is highlyoptimized to process large amounts of dataIt usually contains many registers, memory blocks, multipliersand other arithmetic units

    DSPs are used for filtering, transformation etc using functions likeMultiply and Accumulate etcThe source for such data may be a digital camera, voice packet or an audio clip

  • 8/7/2019 1-Embedded Systems An Introduction-R

    24/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed24

    Application-specific processors (ASP)

    Programmable processor optimized for a particular class of applications having common characteristicsCompromise between general-purpose and single-purpose processors

    FeaturesProgram memoryOptimized datapathSpecial functional units

    BenefitsSome flexibilityGood performance, size and power

  • 8/7/2019 1-Embedded Systems An Introduction-R

    25/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed25

    Embedded Processors

    An Embedded Processor is a special purpose processor whichwhen used in an embedded system design can perform onlydedicated one or few tasks.It differs from the normal general purpose computers likeservers and personal computers in the sense that later can beprogrammed to perform diverse range of tasks.Why design an embedded processor when the general purposecan serve the same purpose?

    Cost reductionEnergy efficiencySize reduction (Such as SmartDust in MEMS/mote)Tailored for almost anything depending upon requirementssuch as specialized Signal Processing capability

  • 8/7/2019 1-Embedded Systems An Introduction-R

    26/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed26

    Embedded Processors

    Some of the areas of application for Embedded Processorsinclude:

    Portable Devices: PDAs, Digital Cameras, MP3 players,Mobile phones

    Automotives: automobile engine control systems,Tracking systems, Functionality check systemsNetworking: Ethernet switches, routersMedical Equipment: Medical Imaging and video of insideof body, U ltrasounds etcIndustrial Controls: Nuclear Reactor Control, LatheMachine Controls etc

  • 8/7/2019 1-Embedded Systems An Introduction-R

    27/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed27

    Comparison of GPP and Embedded Processor

    Functional Block Diagram of theembedded processor

    Functional Block Diagram of theGeneral purpose CISC processor.

    In addition to differences abovethe instruction set architecture is also different

  • 8/7/2019 1-Embedded Systems An Introduction-R

    28/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed28

    Embedded Processing Areas

    The latest application and research areas for embeddedprocessor architectures include:

    Wearable ComputingU biquitous ComputingSystem On ChipMultiprocessor System On ChipNetwork on Chip

  • 8/7/2019 1-Embedded Systems An Introduction-R

    29/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed29

    Full-custom IC

    All layers are optimized for an embedded systemsparticular digital implementation like:

    Placing transistorsSizing transistorsRouting wires

    BenefitsExcellent performance, smallest size, low power DrawbacksHigh Non-Recurring Engineering (NRE) cost (e.g.,$300k), long time-to-market, high risk

  • 8/7/2019 1-Embedded Systems An Introduction-R

    30/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed30

    Gate Array

    FeaturesLower layers are fully or partially builtDesigners are left with routing of wires and maybeplacing some blocks

    BenefitsGood performance, good size, less NRE cost than afull-custom implementation (perhaps $10k to $100k)

    Drawbacks

    Still require weeks to months to develop

  • 8/7/2019 1-Embedded Systems An Introduction-R

    31/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed31

    Standard Cell

    FeaturesInstead of designing the actual silicon, the designer uses pre-built blocks that have already been testedand proven.

    BenefitsGood performance, good size, less NRE cost than afull-custom implementation (perhaps $10k to $100k)

    Drawbacks

    Still require weeks to months to develop

  • 8/7/2019 1-Embedded Systems An Introduction-R

    32/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed32

    PLD (Programmable Logic Device)

    All layers already existDesigners can purchase an ICConnections on the IC are either created or destroyed to implement desired functionality

  • 8/7/2019 1-Embedded Systems An Introduction-R

    33/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed33

    PLD (Programmable Logic Device)

    Field-Programmable Gate Array (FPGA)Benefits

    Low NRE costs, almost instant IC availabilityDrawbacks

    Bigger, expensive (perhaps $30 per unit), power hungry, slower

  • 8/7/2019 1-Embedded Systems An Introduction-R

    34/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed34

    Independence of processor & IC technologies

    Basic tradeoff General vs. customProcessor technology or IC technology

  • 8/7/2019 1-Embedded Systems An Introduction-R

    35/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed35

    ES development methodology

    Classical development was done through separatehardware and software developer teams whointegrated their work towards the end which lacked indesired optimization levels and turn around time etc.

    Recent trend is to use a U nified view of the designprocess for Hardware and SoftwareHardware synthesis tools have changed the role of hardware designers essentially to write sequentialprograms through HDLHardware / Software Co-Design is a field thatemphasizes a unified view of hardware and softwarefor which synthesis tools and simulators are used

  • 8/7/2019 1-Embedded Systems An Introduction-R

    36/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed36

    U nified View of Design Process

    Co Design Ladder

  • 8/7/2019 1-Embedded Systems An Introduction-R

    37/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed37

    Conclusion Revisiting

  • 8/7/2019 1-Embedded Systems An Introduction-R

    38/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed38

    Embedded Processor Architecture

    Factors influencing embedded processor architecture:R eal-time processing:Some computation must be done within a certain time frame, or else the system would fail. Consider the following example:

    A system fetching/compressing/sending voice dataTiming constraint:

    It must fetch the voice data after every specified interval, it must compress/decompress/send the audio data within acertain time frame (e.g. 22.5 msec in a MELP algorithm), and then transmit it to a remote end or human ear in that

    particular time, or else there may be un-acceptable voicequality degradation.

  • 8/7/2019 1-Embedded Systems An Introduction-R

    39/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed39

    Embedded Processor Architecture

    The real-time processing can further be divided into two categories:Hard real-time system:

    It is the one in which there is an absolute maximum time inwhich a certain processing has to complete.

    F or example voice compression/processing must complete within

    a certain dead line always.Dynamic branch predictions and cache mechanisms of thegeneral purpose processors are advantageous for the non-real- time applications, but would result in a catastrophe in the hard real-time requirements.

    Soft real-time system:It is the one in which the average time of a particular task andthe number of instances may exceed by a limited time

    F or example nullifying the effect of the varying inter-arrival timesof voice packets through jitter buffers over a digital voicecommunication link.

  • 8/7/2019 1-Embedded Systems An Introduction-R

    40/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed40

    Embedded Processor Architecture

    Special signal processing capabilitiesDSPs are used for filtering, transformation etc usingfunctions like Multiply and Accumulate etcThey usually require many registers, memory

    blocks, multipliers and other arithmetic units

  • 8/7/2019 1-Embedded Systems An Introduction-R

    41/41

    2/18/2011 Embedded Systems Spring 2011 Shaftab Ahmed41

    Embedded Processor Architecture

    Power consumption:(i) These are mostly battery operated systems so long operationlife before recharging.

    (ii) virtually no special cooling arrangement required decreasingcost as well as size

    (iii) The application code also has to dictate the power consumption: least instruction + more work by processor =least power consumption

    Limited memory:The memory size is always less in an embedded application asonly few or only one program would be required to run on it. This

    factor is determined by many things.(i) size would become smaller (ii) Overall system cost would be reduced(iii) System would consume much less power